Home
last modified time | relevance | path

Searched refs:width (Results 1 – 25 of 96) sorted by relevance

1234

/sdk/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/editors/draw9patch/graphics/
DGraphicsUtilities.java34 ImageData result = new ImageData(image.width + 2, image.height + 2, image.depth, in convertToNinePatch()
37 final int[] colors = new int[image.width]; in convertToNinePatch()
38 final byte[] alpha = new byte[image.width]; in convertToNinePatch()
43 image.getPixels(0, y, image.width, colors, 0); in convertToNinePatch()
44 result.setPixels(1, y + 1, image.width, colors, 0); in convertToNinePatch()
47 image.getAlphas(0, y, image.width, alpha, 0); in convertToNinePatch()
48 result.setAlphas(1, y + 1, image.width, alpha, 0); in convertToNinePatch()
61 int width = imageData.width; in clearImageData() local
64 for (int x = 0; x < width; x++) { in clearImageData()
79 ImageData result = new ImageData(image.width, image.height, image.depth, in copy()
[all …]
DNinePatchedImage.java96 return mBaseImageData.width; in getWidth()
252 int width = mBaseImageData.width; in ensure9Patch() local
259 for (int x = 0; x < width; x++) { in ensure9Patch()
276 if (!ensureVerticalPixel(width -1, y, mVerticalContentPixels)) { in ensure9Patch()
287 mHorizontalPatchPixels = initArray(new int[mBaseImageData.width]); in createPatchArray()
292 mHorizontalContentPixels = initArray(new int[mBaseImageData.width]); in createContentArray()
316 ^ (x == mBaseImageData.width - 1) ^ (y == mBaseImageData.height - 1); in isValid()
328 } else if (x == mBaseImageData.width - 1) { in setPatch()
349 } else if (x == mBaseImageData.width - 1) { in erase()
424 rect.width = mBaseImageData.width - 1; in getContentArea()
[all …]
/sdk/eclipse/plugins/com.android.ide.eclipse.tests/unittests/com/android/ide/eclipse/adt/internal/editors/draw9patch/graphics/
DGraphicsUtilitiesTest.java45 assertEquals(baseData.width + 2, result.width); in testConvertToNinePatch()
49 for (int x = 0; x < result.width; x++) { in testConvertToNinePatch()
65 assertEquals(0x0, result.getPixel(result.width - 1, y) & MASK_ALPHA); in testConvertToNinePatch()
85 for (int x = 0; x < baseData.width; x++) { in testClearImageData()
106 assertEquals(baseData.width, copiedData.width); in testCopy()
113 final int[] baseColors = new int[baseData.width]; in testCopy()
114 final byte[] baseAlpha = new byte[baseData.width]; in testCopy()
116 final int[] copiedColors = new int[copiedData.width]; in testCopy()
117 final byte[] copiedAlpha = new byte[copiedData.width]; in testCopy()
121 baseData.getPixels(0, y, baseData.width, baseColors, 0); in testCopy()
[all …]
DNinePatchedImageTest.java43 int width = data.width; in testReadNoPatchedImage() local
46 assertEquals(72, width); in testReadNoPatchedImage()
59 int width = data.width; in testReadNoPatchedInteraceImage() local
62 assertEquals(72, width); in testReadNoPatchedInteraceImage()
75 int width = data.width; in testConvert9PatchedImage() local
78 assertEquals(72, width); in testConvert9PatchedImage()
86 width = data.width; in testConvert9PatchedImage()
90 assertEquals(72 + 2, width); in testConvert9PatchedImage()
110 assertEquals(new Rectangle(1, 1, width - 2, height - 2), contentsArea); in testConvert9PatchedImage()
237 assertEquals(1, rect.width); in test9Patch1()
[all …]
/sdk/eclipse/plugins/com.android.ide.eclipse.gldebugger/src/com/android/ide/eclipse/gltrace/state/transforms/
DTexImageTransform.java67 GLEnum type, int xOffset, int yOffset, int width, int height) { in TexImageTransform() argument
75 mWidth = width; in TexImageTransform()
135 private String createTexture(File textureDataFile, int width, int height) throws IOException { in createTexture() argument
138 BufferedImage img = new BufferedImage(width, height, BufferedImage.TYPE_4BYTE_ABGR); in createTexture()
142 img.getRaster().setDataElements(0, 0, width, height, in createTexture()
143 formatSourceData(initialData, width, height)); in createTexture()
162 int xOffset, int yOffset, int width, int height) throws IOException { in updateTextureData() argument
175 image.getRaster().setDataElements(xOffset, yOffset, width, height, in updateTextureData()
176 formatSourceData(subImageData, width, height)); in updateTextureData()
182 private byte[] formatSourceData(byte[] subImageData, int width, int height) { in formatSourceData() argument
[all …]
/sdk/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/editors/layout/gle2/
DSwtUtils.java136 int width = awtImage.getWidth(); in convertToSwt() local
142 new ImageData(width, height, 32, getAwtPaletteData(awtImage.getType())); in convertToSwt()
159 byte[] alphaData = new byte[height * width]; in convertToSwt()
161 byte[] alphaRow = new byte[width]; in convertToSwt()
162 for (int x = 0; x < width; x++) { in convertToSwt()
173 System.arraycopy(alphaRow, 0, alphaData, y * width, width); in convertToSwt()
195 new BufferedImage(swtData.width, swtData.height, BufferedImage.TYPE_INT_ARGB); in convertToAwt()
203 for (int x = 0; x < swtData.width; x++) { in convertToAwt()
215 for (int x = 0; x < swtData.width; x++) { in convertToAwt()
266 int destWidth = (int) (scale * boundingBox.width); in drawRectangles()
[all …]
DBinPacker.java87 Rect occupy(int width, int height) { in occupy() argument
88 int index = findBest(width, height); in occupy()
93 return split(index, width, height); in occupy()
100 private int findBest(int width, int height) { in findBest() argument
112 if (rect.w >= width && rect.h >= height) { in findBest()
141 if (rect.w >= width && rect.h >= height) { in findBest()
142 if (width < height) { in findBest()
143 int distance = rect.w - width; in findBest()
152 int distance = rect.w - width; in findBest()
195 private Rect split(int index, int width, int height) { in split() argument
[all …]
DImageUtils.java64 for (int x = 0, width = image.getWidth(); x < width; x++) { in containsDarkPixels()
319 int width = x2 - x1; in crop() local
329 BufferedImage cropped = new BufferedImage(width, height, imageType); in crop()
331 g.drawImage(image, 0, 0, width, height, x1, y1, x2, y2, null); in crop()
464 int width = source.getWidth(); in createRectangularDropShadow() local
466 BufferedImage image = new BufferedImage(width + SHADOW_SIZE, height + SHADOW_SIZE, type); in createRectangularDropShadow()
468 g.drawImage(source, 0, 0, width, height, null); in createRectangularDropShadow()
469 ImageUtils.drawRectangleShadow(image, 0, 0, width, height); in createRectangularDropShadow()
488 int x, int y, int width, int height) { in drawRectangleShadow() argument
491 drawRectangleShadow(gc, x, y, width, height); in drawRectangleShadow()
[all …]
DImageControl.java91 public void fitToWidth(int width) { in fitToWidth() argument
96 int imageWidth = imageRect.width; in fitToWidth()
97 if (imageWidth <= width) { in fitToWidth()
102 mScale = width / (float) imageWidth; in fitToWidth()
154 e.x += mScale * r.width; in computeSize()
157 e.x += r.width; in computeSize()
177 if (mImage == null || rect.width == 0 || rect.height == 0) { in onPaint()
184 int imageWidth = imageRect.width; in onPaint()
DRenderPreview.java138 CLOSE_ICON_WIDTH = CLOSE_ICON.getImageData().width;
139 EDIT_ICON_WIDTH = EDIT_ICON.getImageData().width;
140 ZOOM_IN_ICON_WIDTH = ZOOM_IN_ICON.getImageData().width;
141 ZOOM_OUT_ICON_WIDTH = ZOOM_OUT_ICON.getImageData().width;
706 int width = getWidth(); in createErrorThumbnail() local
708 BufferedImage image = new BufferedImage(width + shadowSize, height + shadowSize, in createErrorThumbnail()
713 g.fillRect(0, 0, width, height); in createErrorThumbnail()
735 private static double getScale(int width, int height) { in getScale() argument
738 if (width > 0 && height > 0 in getScale()
739 && (width > maxWidth || height > maxHeight)) { in getScale()
[all …]
DIncludeOverlay.java75 whole = new Rectangle(whole.x, whole.y, whole.width + 1, whole.height + 1); in paint()
80 ControlPoint bottomRight = LayoutPoint.create(mCanvas, mask.x + mask.width, in paint()
118 tempResult.add(new Rectangle(r.x, r.y, r.width, h.y - r.y)); in subtractRectangles()
126 int hx2 = h.x + h.width; in subtractRectangles()
128 int rx2 = r.x + r.width; in subtractRectangles()
133 tempResult.add(new Rectangle(r.x, hy2, r.width, ry2 - hy2)); in subtractRectangles()
/sdk/eclipse/plugins/com.android.ide.eclipse.gldebugger/src/com/android/ide/eclipse/gltrace/widgets/
DImageCanvas.java120 imageWidth = mImage.getBounds().width; in updateScrollBars()
123 imageWidth = client.width; in updateScrollBars()
129 mHorizontalScrollBar.setThumb(Math.min(imageWidth, client.width)); in updateScrollBars()
132 int hPage = imageWidth - client.width; in updateScrollBars()
154 mHorizontalScrollBar.setPageIncrement(clientArea.width); in setScrollBarPageIncrements()
172 scroll(destX, 0, 0, 0, imageBounds.width, imageBounds.height, false); in scrollHorizontally()
184 scroll(0, destY, 0, 0, imageBounds.width, imageBounds.height, false); in scrollVertically()
197 if (mFitToCanvas && rect.width > 0 && rect.height > 0) { in paintCanvas()
198 double sx = (double) client.width / (double) rect.width; in paintCanvas()
205 0, 0, rect.width, rect.height, in paintCanvas()
[all …]
/sdk/eclipse/plugins/com.android.ide.eclipse.gldebugger/src/com/android/ide/eclipse/gltrace/
DProtoBufUtils.java30 int width = glMsg.getFb().getWidth(); in getImageData() local
33 if (width * height == 0) { in getImageData()
38 byte[] uncompressed = new byte[width * height * 4]; in getImageData()
42 assert size == width * height * 4 : "Unexpected image size after decompression."; in getImageData()
49 width, in getImageData()
55 byte[] alpha = new byte[width*height]; in getImageData()
56 for (int i = 0; i < width * height; i++) { in getImageData()
61 imageData = imageData.scaledTo(imageData.width, -imageData.height); in getImageData()
/sdk/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/editors/draw9patch/ui/
DStretchesViewer.java92 return (image1.width == image2.width && image1.height == image2.height); in equalSize()
105 base.width, in updatePreview()
131 int xLen = rect.x + rect.width; in buildContentAreaPreview()
178 public void setSize(int width, int heigh) { in setSize() argument
179 mSize.x = width; in setSize()
184 private synchronized void calcPaddings(int width, int height) { in calcPaddings() argument
187 mPadding.x = (canvasSize.x - width) / 2; in calcPaddings()
190 mPadding.width = width; in calcPaddings()
209 int width = Math.round(mSize.x * ratio); in paintControl() local
212 calcPaddings(width, height); in paintControl()
[all …]
DImageViewer.java329 int width = mNinePatchedImage.getWidth(); in mouseMove() local
335 if (posX >= width) { in mouseMove()
336 posX = width - 1; in mouseMove()
384 private synchronized void calcPaddings(int width, int height) { in calcPaddings() argument
387 mPadding.width = getZoomedPixelSize(width); in calcPaddings()
392 if (mPadding.width < canvasSize.x) { in calcPaddings()
393 mPadding.x = (canvasSize.x - mPadding.width) / 2; in calcPaddings()
476 mBufferImage = new Image(AdtPlugin.getDisplay(), pe.width, pe.height);
478 int width = mBufferImage.getBounds().width;
480 if (width != pe.width || height != pe.height) {
[all …]
/sdk/emulator/skins/dynamic/
Dlayout9 width 320
19 width 110
54 width 111
62 width 212
92 width 212
100 width 195
108 width 174
116 width 159
/sdk/hierarchyviewer/src/com/android/hierarchyviewer/ui/
DCaptureRenderer.java39 d.width += node.marginLeft + node.marginRight; in getPreferredSize()
54 int width = icon.getIconWidth(); in paintComponent() local
57 int x = (getWidth() - width) / 2; in paintComponent()
69 width - node.paddingRight - node.paddingLeft, in paintComponent()
74 g.drawLine(0, node.baseline, width, node.baseline); in paintComponent()
80 node.marginLeft + width + node.marginRight, in paintComponent()
DScreenViewer.java249 private int width; field in ScreenViewer.LoupeViewer
295 int width = getWidth(); in paintComponent() local
299 if (width != this.width || height != this.height) { in paintComponent()
300 this.width = width; in paintComponent()
303 grid = new BufferedImage(width + zoom + 1, height + zoom + 1, in paintComponent()
318 width += zoom; in paintComponent()
321 for (int x = zoom; x <= width; x += zoom) { in paintComponent()
326 g2.drawLine(0, y, width, y); in paintComponent()
349 left = x * zoom - width / 2 + zoom / 2; in moveToPoint()
462 d.width = 60; in getPreferredSize()
[all …]
DLayoutRenderer.java83 int x = (getWidth() - insets.left - insets.right - root.width) / 2; in paintComponent()
88 g.drawRect(root.left, root.top, root.width - 1, root.height - 1); in paintComponent()
89 g.clipRect(root.left - 1, root.top - 1, root.width + 1, root.height + 1); in paintComponent()
105 s.drawRect(node.left, node.top, node.width - 1, node.height - 1); in paintComponent()
116 g.drawRect(node.left, node.top, node.width - 1, node.height - 1); in drawChildren()
146 int xoffset = (getWidth() - insets.left - insets.right - root.width) / 2 + insets.left + 1; in selectChild()
162 if (node.left <= x && x < node.left + node.width && in findChild()
164 if (node.width <= hit.width && node.height <= hit.height) { in findChild()
/sdk/hierarchyviewer/src/com/android/hierarchyviewer/laf/
DUnifiedContentBorder.java28 public void paintBorder(Component c, Graphics g, int x, int y, int width, int height) { in paintBorder() argument
30 g.drawLine(x, y, x + width, y); in paintBorder()
32 g.drawLine(x, y + height - 2, x + width, y + height - 2); in paintBorder()
34 g.drawLine(x, y + height - 1, x + width, y + height - 1); in paintBorder()
/sdk/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/editors/layout/properties/
DBooleanXmlPropertyEditor.java50 public void paint(Property property, GC gc, int x, int y, int width, int height) in paint() argument
72 int imageWidth = image.getBounds().width + 2; in paint()
73 width -= imageWidth; in paint()
78 DrawUtils.drawStringCV(gc, text, x, y, width, height); in paint()
87 if (location == null || location.x < mTrueImage.getBounds().width + 2) { in activate()
/sdk/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/editors/ui/
DErrorImageComposite.java51 mSize = new Point(baseImage.getBounds().width, baseImage.getBounds().height); in ErrorImageComposite()
55 protected void drawCompositeImage(int width, int height) { in drawCompositeImage() argument
60 if (overlayData.width == baseData.width && overlayData.height == baseData.height) { in drawCompositeImage()
/sdk/eclipse/plugins/com.android.ide.eclipse.tests/unittests/com/android/ide/eclipse/adt/internal/editors/layout/gle2/
DSwtUtilsTest.java58 assertEquals(inImage.getWidth(), outData.width); in testImageConvertNoAlpha()
67 for (int x = 0; x < outData.width; x++) { in testImageConvertNoAlpha()
88 for (int x = 0; x < outData.width; x++) { in testImageConvertNoAlpha()
113 assertEquals(inImage.getWidth(), outData.width); in testImageConvertGlobalAlpha()
123 for (int x = 0; x < outData.width; x++) { in testImageConvertGlobalAlpha()
146 assertEquals(inImage.getWidth(), outData.width); in testImageConvertAlpha()
154 for (int x = 0; x < outData.width; x++) { in testImageConvertAlpha()
161 int actualAlpha = outData.alphaData[y * outData.width + x]; in testImageConvertAlpha()
183 assertEquals(inImage.getWidth(), outData.width); in testImageConvertAlphaMultiplied()
191 for (int x = 0; x < outData.width; x++) { in testImageConvertAlphaMultiplied()
[all …]
/sdk/hierarchyviewer/src/com/android/hierarchyviewer/ui/util/
DPsdFile.java45 public PsdFile(int width, int height) { in PsdFile() argument
46 mHeader = new Header(width, height); in PsdFile()
52 mMergedImage = new BufferedImage(width, height, BufferedImage.TYPE_INT_ARGB); in PsdFile()
100 int width = image.getWidth(); in writeImage() local
103 final int length = width * height; in writeImage()
106 image.getData().getDataElements(0, 0, width, height, pixels); in writeImage()
152 Header(int width, int height) { in Header() argument
153 mWidth = width; in Header()
318 final int width = image.getWidth(); in Layer() local
319 final int length = width * height; in Layer()
[all …]
/sdk/eclipse/plugins/com.android.ide.eclipse.tests/src/com/android/ide/eclipse/adt/internal/editors/layout/refactoring/testdata/
Dcompletion8-expected-completion42.txt2 android:layout_width : Specifies the basic width of the view. [dimension, enum]
4 android:width : Makes the TextView be exactly this many pixels wide. [dimension]

1234