Home
last modified time | relevance | path

Searched refs:y (Results 1 – 25 of 117) sorted by relevance

12345

/sdk/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/editors/draw9patch/graphics/
DGraphicsUtilities.java40 for (int y = 0; y < image.height; y++) { 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()
63 for (int y = 0; y < height; y++) { in clearImageData()
65 imageData.setPixel(x, y, 0x00000000); in clearImageData()
66 imageData.setAlpha(x, y, 0x00); in clearImageData()
85 for (int y = 0; y < image.height; y++) { in copy()
88 image.getPixels(0, y, image.width, colors, 0); in copy()
[all …]
DNinePatchedImage.java156 for (int y = 0; y < yLen; y++) { in recycleChunks()
159 bin.add(patchChunks[y][x]); in recycleChunks()
161 patchChunks[y][x] = null; in recycleChunks()
181 for (int y = 0; y < yLen; y++) { in recycleProjections()
184 bin.add(projections[y][x]); in recycleProjections()
186 projections[y][x] = null; in recycleProjections()
203 private static final int getPixel(ImageData image, int x, int y) { in getPixel() argument
204 return (image.getAlpha(x, y) << 24) + image.getPixel(x, y); in getPixel()
207 private static final boolean isTransparentPixel(ImageData image, int x, int y) { in isTransparentPixel() argument
208 return image.getAlpha(x, y) == 0x0; in isTransparentPixel()
[all …]
/sdk/eclipse/plugins/com.android.ide.eclipse.tests/unittests/com/android/ide/eclipse/adt/internal/editors/layout/gle2/
DSwtUtilsTest.java66 for (int y = 0; y < outData.height; y++) { in testImageConvertNoAlpha()
71 RGB expected = inPalette.getRGB( inImage.getRGB( x, y)); in testImageConvertNoAlpha()
72 RGB actual = outPalette.getRGB(outData.getPixel(x, y)); in testImageConvertNoAlpha()
87 for (int y = 0; y < outData.height; y++) { in testImageConvertNoAlpha()
92 int actual = awtImage.getRGB(x, y); in testImageConvertNoAlpha()
94 assertEquals(awtAlphaMask | inImage.getRGB(x, y), awtImage.getRGB(x, y)); in testImageConvertNoAlpha()
122 for (int y = 0; y < outData.height; y++) { in testImageConvertGlobalAlpha()
125 RGB expected = inPalette.getRGB( inImage.getRGB( x, y)); in testImageConvertGlobalAlpha()
126 RGB actual = outPalette.getRGB(outData.getPixel(x, y)); in testImageConvertGlobalAlpha()
153 for (int y = 0; y < outData.height; y++) { in testImageConvertAlpha()
[all …]
/sdk/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/editors/layout/gle2/
DControlPoint.java40 public final int y; field in ControlPoint
58 return new ControlPoint(canvas, event.x, event.y); in create()
71 org.eclipse.swt.graphics.Point p = canvas.toControl(event.x, event.y); in create()
72 return new ControlPoint(canvas, p.x, p.y); in create()
90 return new ControlPoint(canvas, event.x, event.y); in create()
105 org.eclipse.swt.graphics.Point p = canvas.toControl(event.x, event.y); in create()
106 return new ControlPoint(canvas, p.x, p.y); in create()
119 public static ControlPoint create(LayoutCanvas canvas, int x, int y) { in create() argument
120 return new ControlPoint(canvas, x, y); in create()
134 private ControlPoint(LayoutCanvas canvas, int x, int y) { in ControlPoint() argument
[all …]
DLayoutPoint.java39 public final int y; field in LayoutPoint
87 public static LayoutPoint create(LayoutCanvas canvas, int x, int y) { in create() argument
88 return new LayoutPoint(canvas, x, y); in create()
98 private LayoutPoint(LayoutCanvas canvas, int x, int y) { in LayoutPoint() argument
101 this.y = y; in LayoutPoint()
113 int cy = mCanvas.getVerticalTransform().translate(y); in toControl()
124 return new Point(x, y); in toPoint()
129 return "LayoutPoint [x=" + x + ", y=" + y + "]"; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ in toString()
137 result = prime * result + y; in hashCode()
152 if (y != other.y) in equals()
DGCWrapper.java259 drawLine(p1.x, p1.y, p2.x, p2.y); in drawLine()
269 int y = mVScale.translate(y1); in drawRect() local
272 getGc().drawRectangle(x, y, w, h); in drawRect()
277 drawRect(p1.x, p1.y, p2.x, p2.y); in drawRect()
285 int y = mVScale.translate(r.y); in drawRect() local
288 getGc().drawRectangle(x, y, w, h); in drawRect()
296 int y = mVScale.translate(y1); in fillRect() local
299 getGc().fillRectangle(x, y, w, h); in fillRect()
304 fillRect(p1.x, p1.y, p2.x, p2.y); in fillRect()
312 int y = mVScale.translate(r.y); in fillRect() local
[all …]
DImageUtils.java63 for (int y = 0, height = image.getHeight(); y < height; y++) { in containsDarkPixels()
65 int pixel = image.getRGB(x, y); in containsDarkPixels()
162 public boolean crop(BufferedImage bufferedImage, int x, int y) { in cropBlank()
163 int rgb = bufferedImage.getRGB(x, y); in cropBlank()
211 public boolean crop(BufferedImage bufferedImage, int x, int y) { in cropColor()
212 return blankArgb == bufferedImage.getRGB(x, y); in cropColor()
231 boolean crop(BufferedImage image, int x, int y); in crop() argument
244 y1 = initialCrop.y; in crop()
246 y2 = initialCrop.y + initialCrop.h; in crop()
284 for (int y = y1; y < y2; y++) { in crop()
[all …]
DIncludeOverlay.java75 whole = new Rectangle(whole.x, whole.y, whole.width + 1, whole.height + 1); in paint()
79 ControlPoint topLeft = LayoutPoint.create(mCanvas, mask.x, mask.y).toControl(); in paint()
81 mask.y + mask.height).toControl(); in paint()
83 int y1 = topLeft.y; in paint()
85 int y2 = bottomRight.y; in paint()
117 if (h.y > r.y) { in subtractRectangles()
118 tempResult.add(new Rectangle(r.x, r.y, r.width, h.y - r.y)); in subtractRectangles()
123 tempResult.add(new Rectangle(r.x, h.y, h.x - r.x, h.height)); in subtractRectangles()
127 int hy2 = h.y + h.height; in subtractRectangles()
129 int ry2 = r.y + r.height; in subtractRectangles()
[all …]
DMarqueeGesture.java73 int y = Math.min(pos.y, mStart.y); in update() local
75 int h = Math.abs(pos.y - mStart.y); in update()
77 mOverlay.updateSize(x, y, w, h); in update()
80 LayoutPoint topLeft = ControlPoint.create(mCanvas, x, y).toLayout(); in update()
81 LayoutPoint bottomRight = ControlPoint.create(mCanvas, x + w, y + h).toLayout(); in update()
124 public void updateSize(int x, int y, int w, int h) { in updateSize() argument
126 mRectangle.y = y; in updateSize()
DSwtUtils.java160 for (int y = 0; y < height; y++) { in convertToSwt()
163 int alpha = awtImage.getRGB(x, y) >>> 24; in convertToSwt()
173 System.arraycopy(alphaRow, 0, alphaData, y * width, width); in convertToSwt()
202 for (int y = 0; y < swtData.height; y++) { in convertToAwt()
204 int pixel = swtData.getPixel(x, y); in convertToAwt()
205 awtImage.setRGB(x, y, 0xFF000000 | pixel); in convertToAwt()
214 for (int y = 0; y < swtData.height; y++) { in convertToAwt()
216 int pixel = swtData.getPixel(x, y); in convertToAwt()
226 awtImage.setRGB(x, y, pixel); in convertToAwt()
275 int dy1 = bounds.y - boundingBox.y; in drawRectangles()
[all …]
DBinPacker.java111 if (rect.y <= minY) { in findBest()
113 if (rect.y < minY) { in findBest()
114 minY = rect.y; in findBest()
117 } else if (minY == rect.y) { in findBest()
138 if (rect.y != minY) { // Only comparing elements at same y in findBest()
232 mSpace.add(new Rect(rect.x, rect.y + height, width, remainingHeight)); in split()
235 mSpace.add(new Rect(rect.x + width, rect.y, remainingWidth, rect.h)); in split()
254 mSpace.add(new Rect(rect.x, rect.y + height, rect.w, remainingHeight)); in split()
257 mSpace.add(new Rect(rect.x + width, rect.y, remainingWidth, height)); in split()
318 g.fillRect(rect.x, rect.y, rect.w, rect.h); in dumpImage()
[all …]
DRenderPreviewManager.java365 int availableHeight = clientArea.y + clientArea.height - getY(); in rowLayout()
366 int maxVisibleY = clientArea.y + clientArea.height; in rowLayout()
374 int y = 0; in rowLayout() local
397 int prevY = y; in rowLayout()
398 y = nextY; in rowLayout()
400 y <= bottomBorder) in rowLayout()
401 && Math.max(nextY, y + preview.getHeight()) > bottomBorder) { in rowLayout()
407 if (bottomBorder - y > y + preview.getHeight() - bottomBorder) { in rowLayout()
411 y = nextY = Math.max(nextY, bottomBorder + vgap); in rowLayout()
418 if (x > 0 && y <= bottomBorder in rowLayout()
[all …]
DResizeGesture.java148 int y = b.y; in getNewBounds() local
152 int deltaY = p.y - start.y; in getNewBounds()
198 int y2 = b.y + b.h; in getNewBounds()
199 int ny1 = b.y + deltaY; in getNewBounds()
201 y = ny1; in getNewBounds()
202 h = y2 - y; in getNewBounds()
205 y = y2; in getNewBounds()
210 int ny2 = b.y + b.h + deltaY; in getNewBounds()
211 if (ny2 >= b.y) { in getNewBounds()
212 h = ny2 - b.y; in getNewBounds()
[all …]
/sdk/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/common/layout/
DAbsoluteLayoutRule.java103 int y = p.y; in drawFeedback() local
112 int offsetY = y - be.y + (feedback.dragBounds != null ? feedback.dragBounds.y : 0); in drawFeedback()
121 gc.drawLine(x, b.y, x, b.y + b.h); in drawFeedback()
122 gc.drawLine(b.x, y, b.x + b.w, y); in drawFeedback()
128 gc.drawLine(x, y, b.x + b.w, y); in drawFeedback()
129 gc.drawLine(x, y, x, b.y + b.h); in drawFeedback()
180 int deltaY = (feedback.dragBounds != null ? feedback.dragBounds.y : 0); in onDropped()
183 int y = p.y - b.y + deltaY; in onDropped()
188 offset = new Point(x - be.x, y - be.y); in onDropped()
192 y = offset.y + be.y; in onDropped()
[all …]
/sdk/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/common/layout/grid/
DGridLayoutPainter.java66 int y = grid.getRowY(row); in paintStructure() local
67 gc.drawLine(b.x, y, b.x2(), y); in paintStructure()
71 gc.drawLine(x, b.y, x, b.y2()); in paintStructure()
90 int y1 = b.y + MARGIN_SIZE; in paintGrid()
92 for (int y = y1; y < y2; y += GRID_SIZE) { in paintGrid()
96 gc.drawPoint(x, y); in paintGrid()
184 int y = rowMatch.matchedLine; in paintFreeFormDropFeedback() local
195 y1 = offsetY + y - 1; in paintFreeFormDropFeedback()
199 y1 = bounds.h + offsetY + y - 1; in paintFreeFormDropFeedback()
210 gc.drawLine(b.x, y, b.x2(), y ); in paintFreeFormDropFeedback()
[all …]
/sdk/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/editors/draw9patch/ui/
DStretchesViewer.java129 int yLen = rect.y + rect.height; in buildContentAreaPreview()
130 for (int y = rect.y; y < yLen; y++) { in buildContentAreaPreview()
133 mContentAreaImageData.setPixel(x, y, PADDING_COLOR); in buildContentAreaPreview()
134 mContentAreaImageData.setAlpha(x, y, PADDING_COLOR_ALPHA); in buildContentAreaPreview()
180 mSize.y = heigh; in setSize()
181 mProjection = mNinePatchedImage.getProjections(mSize.x, mSize.y, mProjection); in setSize()
188 mPadding.y = (canvasSize.y - height) / 2; in calcPaddings()
206 float hRatio = ((float) size.y / mSize.y); in paintControl()
210 int height = Math.round(mSize.y * ratio); in paintControl()
221 int yCount = size.y / backgroundLayerHeight in paintControl()
[all …]
DImageViewer.java269 private void draw(int x, int y, int drawMode) { in draw() argument
271 erase(x, y); in draw()
275 mNinePatchedImage.setPatch(x, y, color); in draw()
282 private void erase(int x, int y) { in erase() argument
283 mNinePatchedImage.erase(x, y); in erase()
300 draw(mCursorPoint.x, mCursorPoint.y, mDrawMode); in mouseDown()
303 erase(mCursorPoint.x, mCursorPoint.y); in mouseDown()
320 private int getLogicalPositionY(int y) { in getLogicalPositionY() argument
321 return Math.round((y - mPadding.y + mVerticalScroll) / ((float) mZoom / 100)); in getLogicalPositionY()
327 int posY = getLogicalPositionY(event.y); in mouseMove()
[all …]
/sdk/emulator/skins/dynamic/
Dlayout12 y 0
26 y 8
31 y 60
36 y 8
41 y 8
46 y 36
69 y 12
74 y 12
79 y 12
84 y 12
[all …]
/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.tests/unittests/com/android/ide/eclipse/adt/internal/editors/draw9patch/graphics/
DGraphicsUtilitiesTest.java59 for (int y = 0; y < result.height; y++) { in testConvertToNinePatch()
62 assertEquals(0x0, result.getPixel(0, y) & MASK_ALPHA); in testConvertToNinePatch()
65 assertEquals(0x0, result.getPixel(result.width - 1, y) & MASK_ALPHA); in testConvertToNinePatch()
84 for (int y = 0; y < baseData.height; y++) { in testClearImageData()
86 assertEquals(0x000000, baseData.getPixel(x, y)); in testClearImageData()
87 assertEquals(0x00, baseData.getAlpha(x, y)); in testClearImageData()
119 for (int y = 0; y < baseData.height; y++) { in testCopy()
121 baseData.getPixels(0, y, baseData.width, baseColors, 0); in testCopy()
122 baseData.getPixels(0, y, baseData.width, copiedColors, 0); in testCopy()
125 baseData.getAlphas(0, y, baseData.width, baseAlpha, 0); in testCopy()
[all …]
DNinePatchedImageTest.java236 assertEquals(1, rect.y); in test9Patch1()
244 assertEquals(1, rect.y); in test9Patch1()
252 assertEquals(1, rect.y); in test9Patch1()
261 assertEquals(2, rect.y); in test9Patch1()
269 assertEquals(2, rect.y); in test9Patch1()
277 assertEquals(2, rect.y); in test9Patch1()
286 assertEquals(50, rect.y); in test9Patch1()
294 assertEquals(50, rect.y); in test9Patch1()
302 assertEquals(50, rect.y); in test9Patch1()
341 assertEquals(1, rect.y); in test9Patch2()
[all …]
/sdk/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/common/layout/relative/
DMoveHandler.java139 protected void snapHorizontal(Segment hEdge, int y, Rect newBounds) { in snapHorizontal() argument
142 int margin = !mSnap ? 0 : abs(newBounds.y - y); in snapHorizontal()
146 newBounds.y = y; in snapHorizontal()
149 int margin = !mSnap ? 0 : abs(newBounds.y - (y - newBounds.h)); in snapHorizontal()
153 newBounds.y = y - newBounds.h; in snapHorizontal()
156 int margin = !mSnap ? 0 : abs(newBounds.y - (y - newBounds.h / 2)); in snapHorizontal()
161 newBounds.y = y - newBounds.h / 2; in snapHorizontal()
164 newBounds.y = y - mDraggedBaseline; in snapHorizontal()
198 mBounds.y -= mBounds.y2() - layoutBounds.y2(); in updateMove()
203 if (mBounds.y < layoutBounds.y) { in updateMove()
[all …]
DResizeHandler.java130 protected void snapHorizontal(Segment hEdge, int y, Rect newBounds) { in snapHorizontal() argument
133 int margin = mSnap ? 0 : abs(newBounds.y - y); in snapHorizontal()
137 newBounds.h += newBounds.y - y; in snapHorizontal()
138 newBounds.y = y; in snapHorizontal()
141 int margin = mSnap ? 0 : abs(newBounds.y - (y - newBounds.h)); in snapHorizontal()
145 newBounds.h = y - newBounds.y; in snapHorizontal()
196 hEdge = new Segment(b.y, b.x, b.x2(), child, childId, mHorizontalEdgeType, NO_MARGIN); in updateResize()
205 vEdge = new Segment(b.x, b.y, b.y2(), child, childId, mVerticalEdgeType, NO_MARGIN); in updateResize()
207 vEdge = new Segment(b.x2(), b.y, b.y2(), child, childId, mVerticalEdgeType, NO_MARGIN); in updateResize()
/sdk/hierarchyviewer/src/com/android/hierarchyviewer/ui/
DLayoutRenderer.java84 int y = (getHeight() - insets.top - insets.bottom - root.height) / 2; in paintComponent() local
85 g.translate(insets.left + x, insets.top + y); in paintComponent()
109 g.translate(-insets.left - x, -insets.top - y); in paintComponent()
112 private void drawChildren(Graphics g, ViewNode root, int x, int y) { in drawChildren() argument
113 g.translate(x, y); in drawChildren()
125 g.translate(-x, -y); in drawChildren()
133 private void selectChild(int x, int y) { in selectChild() argument
150 y -= yoffset; in selectChild()
151 if (x >= 0 && x < EMULATED_SCREEN_WIDTH && y >= 0 && y < EMULATED_SCREEN_HEIGHT) { in selectChild()
152 ViewNode hit = findChild(root, root, x, y); in selectChild()
[all …]
DScreenViewer.java69 private int y = 0; field in ScreenViewer
136 new GridBagConstraints(0, y++, 2, 1, 1.0f, 1.0f, in buildViewerAndControls()
163 loupe.moveToPoint(crosshair.crosshair.x, crosshair.crosshair.y); in buildViewerAndControls()
168 new GridBagConstraints(0, y++, 2, 1, 1.0f, 1.0f, in buildViewerAndControls()
198 panel.add(extras, new GridBagConstraints(1, y++, 1, 1, 1.0f, 0.0f, in buildOverlayExtraControls()
216 panel.add(new JLabel(title), new GridBagConstraints(0, y, 1, 1, 1.0f, 0.0f, in buildSlider()
227 panel.add(sliderPanel, new GridBagConstraints(1, y++, 1, 1, 1.0f, 0.0f, in buildSlider()
325 for (int y = 0; y <= height; y += zoom) { in paintComponent()
326 g2.drawLine(0, y, width, y); in paintComponent()
335 g.drawImage(grid, clip.x - clip.x % zoom, clip.y - clip.y % zoom, null); in paintComponent()
[all …]

12345