Home
last modified time | relevance | path

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

123456

/sdk/ninepatch/src/com/android/ninepatch/
DNinePatchChunk.java158 float extra = r.width / data.mHorizontalPatchesSum; in draw()
159 int width = (int) (extra * hRemainder / hWeightSum); in draw() local
161 hRemainder -= width; in draw()
162 g.drawImage(image, x, y, x + width, y + r.height, r.x, r.y, in draw()
163 r.x + r.width, r.y + r.height, null); in draw()
164 x += width; in draw()
167 g.drawImage(image, x, y, x + r.width, y + r.height, r.x, r.y, in draw()
168 r.x + r.width, r.y + r.height, null); in draw()
169 x += r.width; in draw()
177 float extra = r.width / data.mHorizontalPatchesSum; in draw()
[all …]
DGraphicsUtilities.java41 public static BufferedImage createCompatibleImage(int width, int height) { in createCompatibleImage() argument
42 return getGraphicsConfiguration().createCompatibleImage(width, height); in createCompatibleImage()
63 public static BufferedImage createCompatibleImage(BufferedImage image, int width, int height) { in createCompatibleImage() argument
64 return getGraphicsConfiguration().createCompatibleImage(width, height, in createCompatibleImage()
77 public static BufferedImage createTranslucentCompatibleImage(int width, int height) { in createTranslucentCompatibleImage() argument
78 return getGraphicsConfiguration().createCompatibleImage(width, height, in createTranslucentCompatibleImage()
/sdk/draw9patch/src/com/android/draw9patch/ui/
DImageEditorPanel.java316 int width = image.getWidth(); in ensure9Patch() local
318 for (int i = 0; i < width; i++) { in ensure9Patch()
333 pixel = image.getRGB(width - 1, i); in ensure9Patch()
335 image.setRGB(width - 1, i, 0); in ensure9Patch()
456 remainderHorizontal += rect.width; in computePatches()
479 horizontalPatchesSum += rect.width; in computePatches()
487 horizontalPatchesSum += rect.width; in computePatches()
581 float extra = r.width / horizontalPatchesSum; in paintComponent()
582 int width = (int) (extra * hRemainder / hWeightSum); in paintComponent() local
584 hRemainder -= width; in paintComponent()
[all …]
/sdk/assetstudio/src/com/android/assetstudiolib/
DUtil.java52 (int) (rect.width * scaleFactor), in scaleRectangle()
63 public static BufferedImage newArgbBufferedImage(int width, int height) { in newArgbBufferedImage() argument
64 return new BufferedImage(width, height, BufferedImage.TYPE_INT_ARGB); in newArgbBufferedImage()
76 public static BufferedImage scaledImage(BufferedImage source, int width, int height) { in scaledImage() argument
77 Image scaledImage = source.getScaledInstance(width, height, Image.SCALE_SMOOTH); in scaledImage()
78 BufferedImage scaledBufImage = new BufferedImage(width, height, in scaledImage()
280 BufferedImage out = newArgbBufferedImage(imageRect.width, imageRect.height); in drawEffects()
290 g2.fillRect(0, 0, imageRect.width, imageRect.height); in drawEffects()
300 imageRect.width, imageRect.height); in drawEffects()
327 if (srcWidth * 1.0 / srcHeight > dstRect.width * 1.0 / dstRect.height) { in drawCenterInside()
[all …]
/sdk/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/editors/layout/gle2/
DSwtUtils.java128 int width = awtImage.getWidth(); in convertToSwt() local
134 new ImageData(width, height, 32, getAwtPaletteData(awtImage.getType())); in convertToSwt()
151 byte[] alphaData = new byte[height * width]; in convertToSwt()
153 byte[] alphaRow = new byte[width]; in convertToSwt()
154 for (int x = 0; x < width; x++) { in convertToSwt()
165 System.arraycopy(alphaRow, 0, alphaData, y * width, width); in convertToSwt()
187 new BufferedImage(swtData.width, swtData.height, BufferedImage.TYPE_INT_ARGB); in convertToAwt()
195 for (int x = 0; x < swtData.width; x++) { in convertToAwt()
207 for (int x = 0; x < swtData.width; x++) { in convertToAwt()
258 int destWidth = (int) (scale * boundingBox.width); in drawRectangles()
[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/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.java250 private int width; field in ScreenViewer.LoupeViewer
296 int width = getWidth(); in paintComponent() local
300 if (width != this.width || height != this.height) { in paintComponent()
301 this.width = width; in paintComponent()
304 grid = new BufferedImage(width + zoom + 1, height + zoom + 1, in paintComponent()
319 width += zoom; in paintComponent()
322 for (int x = zoom; x <= width; x += zoom) { in paintComponent()
327 g2.drawLine(0, y, width, y); in paintComponent()
350 left = x * zoom - width / 2 + zoom / 2; in moveToPoint()
463 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/draw9patch/src/com/android/draw9patch/graphics/
DGraphicsUtilities.java35 public static BufferedImage createCompatibleImage(int width, int height) { in createCompatibleImage() argument
36 return getGraphicsConfiguration().createCompatibleImage(width, height); in createCompatibleImage()
57 public static BufferedImage createCompatibleImage(BufferedImage image, int width, int height) { in createCompatibleImage() argument
58 return getGraphicsConfiguration().createCompatibleImage(width, height, in createCompatibleImage()
71 public static BufferedImage createTranslucentCompatibleImage(int width, int height) { in createTranslucentCompatibleImage() argument
72 return getGraphicsConfiguration().createCompatibleImage(width, height, in createTranslucentCompatibleImage()
/sdk/ddms/libs/ddmuilib/src/com/android/ddmuilib/
DImageLoader.java171 public Image loadImage(Display display, String fileName, int width, int height, in loadImage() argument
180 if (width != -1 && height != -1) { in loadImage()
181 return createPlaceHolderArt(display, width, height, in loadImage()
196 public static Image createPlaceHolderArt(Display display, int width, in createPlaceHolderArt() argument
198 Image img = new Image(display, width, height); in createPlaceHolderArt()
201 gc.drawLine(0, 0, width, height); in createPlaceHolderArt()
202 gc.drawLine(0, height - 1, width, -1); in createPlaceHolderArt()
/sdk/hierarchyviewer2/libs/hierarchyviewerlib/src/com/android/hierarchyviewerlib/ui/
DCaptureDisplay.java76 sShell.computeTrim(0, 0, Math.max(sButtonBar.getBounds().width, in show()
77 image.getBounds().width), sButtonBar.getBounds().height in show()
79 sShell.setSize(bounds.width, bounds.height); in show()
82 + (parentShell.getBounds().width - bounds.width) / 2, parentShell.getBounds().y in show()
137 e.gc.fillRectangle(0, 0, sCanvas.getBounds().width, sCanvas.getBounds().height);
139 int width = sImage.getBounds().width;
141 int x = (sCanvas.getBounds().width - width) / 2;
147 … e.gc.drawRectangle(x + sViewNode.paddingLeft, y + sViewNode.paddingTop, width
153 e.gc.drawRectangle(x - sViewNode.marginLeft, y - sViewNode.marginTop, width
159 e.gc.drawLine(x, y + sViewNode.baseline, x + width - 1, sViewNode.baseline);
DTreeViewOverview.java176 mViewport.x = pt.x - mViewport.width / 2; in handleMouseEvent()
184 if (mViewport.x + mViewport.width > mBounds.x + mBounds.width) { in handleMouseEvent()
185 mViewport.x = mBounds.x + mBounds.width - mViewport.width; in handleMouseEvent()
215 e.gc.fillRectangle(0, 0, getBounds().width, getBounds().height);
227 .ceil(mViewport.width), (int) Math.ceil(mViewport.height));
235 .ceil(mViewport.width), (int) Math.ceil(mViewport.height));
317 mBounds.width = in setBounds()
318 Math.max(mViewport.x + mViewport.width, mTree.bounds.x + mTree.bounds.width) in setBounds()
326 mBounds.width = mTree.bounds.x + mTree.bounds.width - mBounds.x; in setBounds()
337 size.x = getBounds().width; in setTransform()
[all …]
DLayoutViewer.java129 updateSelection(mTree, pt[0], pt[1], 0, 0, 0, 0, mTree.viewNode.width,
153 int x2 = Math.min(left + node.viewNode.width, clipX + clipWidth); in updateSelection()
186 e.gc.fillRectangle(0, 0, getBounds().width, getBounds().height);
196 e.gc.setClipping(0, 0, mTree.viewNode.width + (int) Math.ceil(0.3 / mScale),
223 currentNode.viewNode.width, currentNode.viewNode.height);
242 e.gc.drawRectangle(left, top, mSelectedNode.viewNode.width,
262 Math.min(parentClipping.x + parentClipping.width, left + node.viewNode.width in paintRecursive()
282 gc.drawRectangle(left, top, node.viewNode.width, node.viewNode.height); in paintRecursive()
298 int leftRightPadding = bounds.width <= 30 ? 0 : 5; in setTransform()
301 Math.min(1.0 * (bounds.width - leftRightPadding * 2) / mTree.viewNode.width, 1.0 in setTransform()
[all …]
DTreeView.java207 … new Point(mViewport.x + mViewport.width / 2, mViewport.y + mViewport.height
209 mViewport.width = getBounds().width / mZoom;
211 mViewport.x = viewCenter.x - mViewport.width / 2;
351 + mSelectedRectangleLocation.width
499 double treeWidth = mTree.bounds.width + 2 * DRAG_LEEWAY; in handleMouseDrag()
502 if (mViewport.width > treeWidth) { in handleMouseDrag()
503 if (xDif < 0 && mViewport.x + mViewport.width > treeX + treeWidth) { in handleMouseDrag()
504 mViewport.x = Math.max(mViewport.x + xDif, treeX + treeWidth - mViewport.width); in handleMouseDrag()
511 } else if (xDif > 0 && mViewport.x + mViewport.width < treeX + treeWidth) { in handleMouseDrag()
512 mViewport.x = Math.min(mViewport.x + xDif, treeX + treeWidth - mViewport.width); in handleMouseDrag()
[all …]
/sdk/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/editors/ui/
DErrorImageComposite.java26 mSize = new Point(baseImage.getBounds().width, baseImage.getBounds().height); in ErrorImageComposite()
30 protected void drawCompositeImage(int width, int height) { in drawCompositeImage() argument
35 if (overlayData.width == baseData.width && overlayData.height == baseData.height) { in drawCompositeImage()
/sdk/chimpchat/src/com/android/chimpchat/adb/image/
DCaptureRawAndConvertedImage.java39 public int width; field in CaptureRawAndConvertedImage.ChimpRawImage
56 width = rawImage.width; in ChimpRawImage()
76 rawImage.width = width; in toRawImage()
DImageUtils.java81 new PixelInterleavedSampleModel(DataBuffer.TYPE_BYTE, rawImage.width, rawImage.height, in rawImage32toARGB()
82 4, rawImage.width * 4, BAND_OFFSETS_32); in rawImage32toARGB()
94 new PixelInterleavedSampleModel(DataBuffer.TYPE_BYTE, rawImage.width, rawImage.height, in rawImage16toARGB()
95 2, rawImage.width * 2, BAND_OFFSETS_16); in rawImage16toARGB()
/sdk/ddms/libs/ddmlib/src/com/android/ddmlib/
DRawImage.java28 public int width; field in RawImage
57 this.width = buf.getInt(); in readHeader()
72 this.width = buf.getInt(); in readHeader()
148 rotated.width = this.height; in getRotated()
149 rotated.height = this.width; in getRotated()
155 final int w = this.width; in getRotated()
/sdk/hierarchyviewer2/libs/hierarchyviewerlib/src/com/android/hierarchyviewerlib/ui/util/
DDrawableViewNode.java67 public double x, y, width, height; field in DrawableViewNode.Rectangle
76 this.width = other.width; in Rectangle()
80 public Rectangle(double x, double y, double width, double height) { in Rectangle() argument
83 this.width = width; in Rectangle()
89 …return "{" + x + ", " + y + ", " + width + ", " + height + "}"; //$NON-NLS-1$ //$NON-NLS-2$ //$NON… in toString()
153 bounds.width = treeWidth + 2 * PADDING; in setLeft()
DPsdFile.java48 public PsdFile(int width, int height) { in PsdFile() argument
49 mHeader = new Header(width, height); in PsdFile()
55 mMergedImage = new BufferedImage(width, height, BufferedImage.TYPE_INT_ARGB); in PsdFile()
105 int width = image.getWidth(); in writeImage() local
108 final int length = width * height; in writeImage()
111 image.getData().getDataElements(0, 0, width, height, pixels); in writeImage()
179 Header(int width, int height) { in Header() argument
180 mWidth = width; in Header()
377 final int width = image.getWidth(); in Layer() local
378 final int length = width * height; in Layer()
[all …]
/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:width : Makes the TextView be exactly this many pixels wide. [dimension]
3 android:layout_width : Specifies the basic width of the view. [dimension, enum]

123456