Home
last modified time | relevance | path

Searched refs:image (Results 1 – 25 of 95) sorted by relevance

1234

/sdk/ninepatch/src/com/android/ninepatch/
DNinePatch.java20 import java.awt.image.BufferedImage;
66 BufferedImage image = null; in load() local
68 image = GraphicsUtilities.loadCompatibleImage(fileUrl); in load()
76 return load(image, is9Patch, convert); in load()
94 BufferedImage image = null; in load() local
96 image = GraphicsUtilities.loadCompatibleImage(stream); in load()
102 return load(image, is9Patch, convert); in load()
118 public static NinePatch load(BufferedImage image, boolean is9Patch, boolean convert) { in load() argument
121 image = convertTo9Patch(image); in load()
126 ensure9Patch(image); in load()
[all …]
DGraphicsUtilities.java20 import java.awt.image.BufferedImage;
21 import java.awt.image.Raster;
32 BufferedImage image = ImageIO.read(resource); in loadCompatibleImage() local
33 return toCompatibleImage(image); in loadCompatibleImage()
37 BufferedImage image = ImageIO.read(stream); in loadCompatibleImage() local
38 return toCompatibleImage(image); in loadCompatibleImage()
45 public static BufferedImage toCompatibleImage(BufferedImage image) { in toCompatibleImage() argument
47 return image; in toCompatibleImage()
50 if (image.getColorModel().equals(getGraphicsConfiguration().getColorModel())) { in toCompatibleImage()
51 return image; in toCompatibleImage()
[all …]
DNinePatchChunk.java22 import java.awt.image.BufferedImage;
73 public static NinePatchChunk create(BufferedImage image) { in create() argument
75 chunk.findPatches(image); in create()
79 public void draw(BufferedImage image, Graphics2D graphics2D, int x, int y, int scaledWidth, in draw() argument
101 draw(image, graphics2D, x, y, scaledWidth, scaledHeight); in draw()
107 draw(image, graphics2D, x, y, scaledWidth, scaledHeight); in draw()
111 private void draw(BufferedImage image, Graphics2D graphics2D, int x, int y, int scaledWidth, in draw() argument
123 g.drawImage(image, x, y, scaledWidth, scaledHeight, null); in draw()
162 g.drawImage(image, x, y, x + width, y + r.height, r.x, r.y, in draw()
167 g.drawImage(image, x, y, x + r.width, y + r.height, r.x, r.y, in draw()
[all …]
/sdk/eclipse/plugins/com.android.ide.eclipse.tests/unittests/com/android/ide/eclipse/adt/internal/editors/layout/gle2/
DImageUtilsTest.java26 import java.awt.image.BufferedImage;
35 BufferedImage image = new BufferedImage(100, 100, BufferedImage.TYPE_INT_ARGB_PRE); in testCropBlank() local
36 Graphics g = image.getGraphics(); in testCropBlank()
38 g.fillRect(0, 0, image.getWidth(), image.getHeight()); in testCropBlank()
41 BufferedImage crop = ImageUtils.cropBlank(image, null); in testCropBlank()
46 BufferedImage image = new BufferedImage(100, 100, BufferedImage.TYPE_INT_ARGB_PRE); in testCropBlankPre() local
47 Graphics g = image.getGraphics(); in testCropBlankPre()
49 g.fillRect(0, 0, image.getWidth(), image.getHeight()); in testCropBlankPre()
52 BufferedImage crop = ImageUtils.cropBlank(image, new Rect(5, 5, 80, 80)); in testCropBlankPre()
57 BufferedImage image = new BufferedImage(100, 100, BufferedImage.TYPE_INT_ARGB_PRE); in testCropNonblank() local
[all …]
/sdk/chimpchat/src/com/android/chimpchat/adb/
DAdbChimpImage.java19 import com.android.chimpchat.adb.image.ImageUtils;
22 import java.awt.image.BufferedImage;
28 private final RawImage image; field in AdbChimpImage
35 AdbChimpImage(RawImage image) { in AdbChimpImage() argument
36 this.image = image; in AdbChimpImage()
41 return ImageUtils.convertImage(image); in createBufferedImage()
45 return image; in getRawImage()
/sdk/draw9patch/src/com/android/draw9patch/graphics/
DGraphicsUtilities.java20 import java.awt.image.BufferedImage;
21 import java.awt.image.Raster;
31 BufferedImage image = ImageIO.read(resource); in loadCompatibleImage() local
32 return toCompatibleImage(image); in loadCompatibleImage()
39 public static BufferedImage toCompatibleImage(BufferedImage image) { in toCompatibleImage() argument
41 return image; in toCompatibleImage()
44 if (image.getColorModel().equals(getGraphicsConfiguration().getColorModel())) { in toCompatibleImage()
45 return image; in toCompatibleImage()
49 image.getWidth(), image.getHeight(), image.getTransparency()); in toCompatibleImage()
51 g.drawImage(image, 0, 0, null); in toCompatibleImage()
[all …]
/sdk/hierarchyviewer/src/com/android/hierarchyviewer/ui/util/
DIconLoader.java7 import java.awt.image.BufferedImage;
31 public static BufferedImage toCompatibleImage(BufferedImage image) { in toCompatibleImage() argument
33 return image; in toCompatibleImage()
36 if (image.getColorModel().equals( in toCompatibleImage()
38 return image; in toCompatibleImage()
42 image.getWidth(), image.getHeight(), image.getTransparency()); in toCompatibleImage()
44 g.drawImage(image, 0, 0, null); in toCompatibleImage()
DPsdFile.java21 import java.awt.image.BufferedImage;
56 public void addLayer(String name, BufferedImage image, Point offset) { in addLayer() argument
57 addLayer(name, image, offset, true); in addLayer()
60 public void addLayer(String name, BufferedImage image, Point offset, boolean visible) { in addLayer() argument
61 mLayersInfo.addLayer(name, image, offset, visible); in addLayer()
62 if (visible) mGraphics.drawImage(image, null, offset.x, offset.y); in addLayer()
95 private static void writeImage(BufferedImage image, DataOutputStream out, boolean split) in writeImage() argument
100 int width = image.getWidth(); in writeImage()
101 int height = image.getHeight(); in writeImage()
106 image.getData().getDataElements(0, 0, width, height, pixels); in writeImage()
[all …]
/sdk/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/editors/layout/gle2/
DImageUtils.java35 import java.awt.image.BufferedImage;
36 import java.awt.image.DataBufferInt;
50 public static boolean containsDarkPixels(BufferedImage image) { in containsDarkPixels() argument
51 for (int y = 0, height = image.getHeight(); y < height; y++) { in containsDarkPixels()
52 for (int x = 0, width = image.getWidth(); x < width; x++) { in containsDarkPixels()
53 int pixel = image.getRGB(x, y); in containsDarkPixels()
127 public static BufferedImage cropBlank(BufferedImage image, Rect initialCrop) { in cropBlank() argument
136 return crop(image, filter, initialCrop); in cropBlank()
152 public static BufferedImage cropColor(BufferedImage image, in cropColor() argument
159 return crop(image, filter, initialCrop); in cropColor()
[all …]
DSwtUtils.java28 import java.awt.image.BufferedImage;
29 import java.awt.image.DataBuffer;
30 import java.awt.image.DataBufferByte;
31 import java.awt.image.DataBufferInt;
32 import java.awt.image.WritableRaster;
95 private static BufferedImage convertToCompatibleFormat(BufferedImage image) { in convertToCompatibleFormat() argument
96 BufferedImage converted = new BufferedImage(image.getWidth(), image.getHeight(), in convertToCompatibleFormat()
99 graphics.drawImage(image, 0, 0, null); in convertToCompatibleFormat()
250 public static Image drawRectangles(Image image, in drawRectangles() argument
257 ImageData srcData = image.getImageData(); in drawRectangles()
[all …]
/sdk/chimpchat/src/com/android/chimpchat/adb/image/
DImageUtils.java16 package com.android.chimpchat.adb.image;
21 import java.awt.image.BufferedImage;
22 import java.awt.image.DataBuffer;
23 import java.awt.image.DataBufferByte;
24 import java.awt.image.PixelInterleavedSampleModel;
25 import java.awt.image.Raster;
26 import java.awt.image.WritableRaster;
46 public static BufferedImage convertImage(RawImage rawImage, BufferedImage image) { in convertImage() argument
49 return rawImage16toARGB(image, rawImage); in convertImage()
88 private static BufferedImage rawImage16toARGB(BufferedImage image, RawImage rawImage) { in rawImage16toARGB() argument
DSixteenBitColorModel.java16 package com.android.chimpchat.adb.image;
22 import java.awt.image.ColorModel;
23 import java.awt.image.DataBuffer;
24 import java.awt.image.Raster;
/sdk/chimpchat/src/com/android/chimpchat/core/
DChimpImageBase.java19 import java.awt.image.BufferedImage;
98 BufferedImage image = convertSnapshot(); in writeToFile() local
107 writer.write(image); in writeToFile()
120 BufferedImage image = getBufferedImage(); in getPixel() local
121 return image.getRGB(x, y); in getPixel()
125 BufferedImage image = getBufferedImage(); in convertSnapshot() local
128 BufferedImage argb = new BufferedImage(image.getWidth(), image.getHeight(), in convertSnapshot()
131 g.drawImage(image, 0, 0, null); in convertSnapshot()
182 private final BufferedImage image; field in ChimpImageBase.BufferedImageChimpImage
184 public BufferedImageChimpImage(BufferedImage image) { in BufferedImageChimpImage() argument
[all …]
/sdk/traceview/src/com/android/traceview/
DColorController.java78 Image image = imageCache.get(key); in requestColorSquare() local
79 if (image == null) { in requestColorSquare()
80 image = new Image(display, 8, 14); in requestColorSquare()
81 GC gc = new GC(image); in requestColorSquare()
84 gc.fillRectangle(image.getBounds()); in requestColorSquare()
86 imageCache.put(key, image); in requestColorSquare()
88 return image; in requestColorSquare()
98 Image image = requestColorSquare(display, rgb); in assignMethodColors() local
100 md.setImage(image); in assignMethodColors()
108 image = requestColorSquare(display, faded); in assignMethodColors()
[all …]
/sdk/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/ui/
DResourcePreviewHelper.java44 import java.awt.image.BufferedImage;
125 BufferedImage image = null; in updatePreview() local
133 image = ImageUtils.createColoredImage(WIDTH, HEIGHT, color); in updatePreview()
152 image = ImageIO.read(file); in updatePreview()
153 int width = image.getWidth(); in updatePreview()
154 int height = image.getHeight(); in updatePreview()
159 image = ImageUtils.scale(image, scale, scale); in updatePreview()
167 if (image == null) { in updatePreview()
170 image = renderService.renderDrawable(drawable); in updatePreview()
184 if (image != null) { in updatePreview()
[all …]
/sdk/assetstudio/tests/src/com/android/assetstudiolib/
DGeneratorTest.java21 import java.awt.image.BufferedImage;
56 BufferedImage image = entry.getValue(); in checkGraphic() local
74 ImageIO.write(image, "PNG", fileName); in checkGraphic()
78 assertImageSimilar(relativePath, goldenImage, image, 5.0f); in checkGraphic()
92 BufferedImage image, float maxPercentDifferent) throws IOException { in assertImageSimilar() argument
94 - image.getWidth()) < 2); in assertImageSimilar()
96 - image.getHeight()) < 2); in assertImageSimilar()
98 assertEquals(BufferedImage.TYPE_INT_ARGB, image.getType()); in assertImageSimilar()
108 int imageWidth = Math.min(goldenImage.getWidth(), image.getWidth()); in assertImageSimilar()
109 int imageHeight = Math.min(goldenImage.getHeight(), image.getHeight()); in assertImageSimilar()
[all …]
/sdk/draw9patch/src/com/android/draw9patch/ui/
DImageEditorPanel.java37 import java.awt.image.BufferedImage;
38 import java.awt.image.RenderedImage;
78 private BufferedImage image; field in ImageEditorPanel
98 ImageEditorPanel(MainFrame mainFrame, BufferedImage image, String name) { in ImageEditorPanel() argument
99 this.image = image; in ImageEditorPanel()
316 int width = image.getWidth(); in ensure9Patch()
317 int height = image.getHeight(); in ensure9Patch()
319 int pixel = image.getRGB(i, 0); in ensure9Patch()
321 image.setRGB(i, 0, 0); in ensure9Patch()
323 pixel = image.getRGB(i, height - 1); in ensure9Patch()
[all …]
/sdk/eclipse/plugins/com.android.ide.eclipse.gldebugger/src/com/android/ide/eclipse/gldebugger/
DMessageData.java30 private Image image = null; // texture field in MessageData
84 if (image != null) in getImage()
85 return image; in getImage()
93 return image = new Image(Display.getCurrent(), imageData); in getImage()
98 return image = new Image(Display.getCurrent(), imageData); in getImage()
103 return image = new Image(Display.getCurrent(), imageData); in getImage()
108 return image = new Image(Display.getCurrent(), imageData); in getImage()
115 return image = new Image(Display.getCurrent(), imageData); in getImage()
123 return image = new Image(Display.getCurrent(), imageData); in getImage()
/sdk/hierarchyviewer2/libs/hierarchyviewerlib/src/com/android/hierarchyviewerlib/ui/util/
DPsdFile.java21 import java.awt.image.BufferedImage;
59 public void addLayer(String name, BufferedImage image, Point offset) { in addLayer() argument
60 addLayer(name, image, offset, true); in addLayer()
63 public void addLayer(String name, BufferedImage image, Point offset, boolean visible) { in addLayer() argument
64 mLayersInfo.addLayer(name, image, offset, visible); in addLayer()
66 mGraphics.drawImage(image, null, offset.x, offset.y); in addLayer()
99 private static void writeImage(BufferedImage image, DataOutputStream out, boolean split) in writeImage() argument
105 int width = image.getWidth(); in writeImage()
106 int height = image.getHeight(); in writeImage()
111 image.getData().getDataElements(0, 0, width, height, pixels); in writeImage()
[all …]
/sdk/sdkmanager/libs/sdkuilib/src/com/android/sdkuilib/internal/repository/icons/
DImageFactory.java60 Image image = mImages.get(imageName); in getImageByName() local
61 if (image != null) { in getImageByName()
62 return image; in getImageByName()
68 image = new Image(mDisplay, stream); in getImageByName()
77 mImages.put(imageName, image); in getImageByName()
79 return image; in getImageByName()
/sdk/chimpchat/test/com/android/chimpchat/
DImageUtilsTest.java19 import com.android.chimpchat.adb.image.CaptureRawAndConvertedImage;
20 import com.android.chimpchat.adb.image.ImageUtils;
21 import com.android.chimpchat.adb.image.CaptureRawAndConvertedImage.ChimpRawImage;
25 import java.awt.image.BufferedImage;
26 import java.awt.image.WritableRaster;
/sdk/hierarchyviewer2/libs/hierarchyviewerlib/src/com/android/hierarchyviewerlib/
DHierarchyViewerDirector.java298 public Image image; in getScreenshotImage() field in HierarchyViewerDirector.ImageContainer
308 imageContainer.image = new Image(Display.getDefault(), imageData); in getScreenshotImage()
311 return imageContainer.image; in getScreenshotImage()
352 Image image = new Image(Display.getDefault(), fileName); in loadOverlay()
353 PixelPerfectModel.getModel().setOverlayImage(image); in loadOverlay()
365 final Image image = loadCapture(viewNode); in showCapture()
366 if (image != null) { in showCapture()
370 CaptureDisplay.show(shell, viewNode, image); in showCapture()
379 final Image image = DeviceBridge.loadCapture(viewNode.window, viewNode); in loadCapture() local
380 if (image != null) { in loadCapture()
[all …]
/sdk/hierarchyviewer/src/com/android/hierarchyviewer/ui/
DScreenViewer.java30 import java.awt.image.BufferedImage;
58 private BufferedImage image; field in ScreenViewer
283 if (image != null) { in paintComponent()
288 g2.drawImage(image, 0, 0, null); in paintComponent()
291 g2.drawImage(overlay, 0, image.getHeight() - overlay.getHeight(), null); in paintComponent()
333 if (image != null) { in paintComponent()
335 g.clipRect(0, 0, image.getWidth() * zoom + 1, image.getHeight() * zoom + 1); in paintComponent()
343 int x = Math.max(0, Math.min((event.getX() + left) / zoom, image.getWidth() - 1)); in moveToPoint()
344 int y = Math.max(0, Math.min((event.getY() + top) / zoom, image.getHeight() - 1)); in moveToPoint()
449 int pixel = image.getRGB(x, y); in showPixel()
[all …]
/sdk/ide_common/src/com/android/ide/common/rendering/
DStaticRenderSession.java23 import java.awt.image.BufferedImage;
43 public StaticRenderSession(Result result, ViewInfo rootViewInfo, BufferedImage image) { in StaticRenderSession() argument
46 mImage = image; in StaticRenderSession()
/sdk/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/editors/
DIconFactory.java181 Image image = mUrlMap.get(url); in getIcon() local
182 if (image == null) { in getIcon()
184 image = descriptor.createImage(); in getIcon()
185 mUrlMap.put(url, image); in getIcon()
188 return image; in getIcon()
220 Image image = new Image(display, SX, SY); in getImageData() local
222 GC gc = new GC(image); in getImageData()
298 ImageData data = image.getImageData(); in getImageData()
299 image.dispose(); in getImageData()

1234