Home | History | Annotate | Download | only in optimize

Lines Matching defs:source

5  *  Redistribution and use in source and binary forms, with or without
9 * * Redistributions of source code must retain the above copyright
271 private void drawImage(Image source, int x, int y, String mapName) {
281 ByteBuffer sourceData = source.getData(0);
282 int height = source.getHeight();
283 int width = source.getWidth();
288 if (source.getFormat() == Format.ABGR8) {
294 } else if (source.getFormat() == Format.BGR8) {
300 } else if (source.getFormat() == Format.RGB8) {
306 } else if (source.getFormat() == Format.RGBA8) {
312 } else if (source.getFormat() == Format.Luminance8) {
318 } else if (source.getFormat() == Format.Luminance8Alpha8) {
327 newImage = convertImageToAwt(source);
329 source = newImage;
330 sourceData = source.getData(0);
337 throw new UnsupportedOperationException("Cannot draw or convert textures with format " + source.getFormat());
340 throw new UnsupportedOperationException("Cannot draw textures with format " + source.getFormat());
347 private Image convertImageToAwt(Image source) {
354 Image newImage = new Image(format, source.getWidth(), source.getHeight(), BufferUtils.createByteBuffer(source.getWidth() * source.getHeight() * 4));
355 clazz.getMethod("convert", Image.class, Image.class).invoke(clazz.newInstance(), source, newImage);