Home
last modified time | relevance | path

Searched refs:x (Results 1 – 25 of 124) sorted by relevance

12345

/sdk/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/editors/draw9patch/graphics/
DNinePatchedImage.java157 for (int x = 0; x < xLen; x++) { in recycleChunks()
159 bin.add(patchChunks[y][x]); in recycleChunks()
161 patchChunks[y][x] = null; in recycleChunks()
182 for (int x = 0; x < xLen; x++) { 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 …]
DGraphicsUtilities.java64 for (int x = 0; x < width; x++) { in clearImageData()
65 imageData.setPixel(x, y, 0x00000000); in clearImageData()
66 imageData.setAlpha(x, y, 0x00); in clearImageData()
103 public static int getVerticalPixels(ImageData data, int x, int y, int height, int[] out) { in getVerticalPixels() argument
116 if (x < 0 || y < 0) { in getVerticalPixels()
119 if (x >= data.width) { in getVerticalPixels()
131 data.getPixels(x, (y + idx), 1, out, idx); in getVerticalPixels()
140 public static void getHorizontalPixels(ImageData data, int x, int y, int width, int[] out) { in getHorizontalPixels() argument
150 if (data.width < (x + width)) { in getHorizontalPixels()
153 if (x < 0 || y < 0) { in getHorizontalPixels()
[all …]
/sdk/eclipse/plugins/com.android.ide.eclipse.tests/unittests/com/android/ide/eclipse/adt/internal/editors/layout/gle2/
DSwtUtilsTest.java67 for (int x = 0; x < outData.width; x++) { in testImageConvertNoAlpha()
71 RGB expected = inPalette.getRGB( inImage.getRGB( x, y)); in testImageConvertNoAlpha()
72 RGB actual = outPalette.getRGB(outData.getPixel(x, y)); in testImageConvertNoAlpha()
88 for (int x = 0; x < outData.width; x++) { in testImageConvertNoAlpha()
92 int actual = awtImage.getRGB(x, y); in testImageConvertNoAlpha()
94 assertEquals(awtAlphaMask | inImage.getRGB(x, y), awtImage.getRGB(x, y)); in testImageConvertNoAlpha()
123 for (int x = 0; x < outData.width; x++) { in testImageConvertGlobalAlpha()
125 RGB expected = inPalette.getRGB( inImage.getRGB( x, y)); in testImageConvertGlobalAlpha()
126 RGB actual = outPalette.getRGB(outData.getPixel(x, y)); in testImageConvertGlobalAlpha()
154 for (int x = 0; x < outData.width; x++) { in testImageConvertAlpha()
[all …]
/sdk/eclipse/plugins/com.android.ide.eclipse.adt/META-INF/
DMANIFEST.MF56 Export-Package: com.android.ide.common.layout;x-friends:="com.android.ide.eclipse.tests",
57 com.android.ide.common.layout.grid;x-friends:="com.android.ide.eclipse.tests",
58 com.android.ide.common.layout.relative;x-friends:="com.android.ide.eclipse.tests",
59 com.android.ide.common.resources.platform;x-friends:="com.android.ide.eclipse.tests",
60 …com.android.ide.eclipse.adt;x-friends:="com.android.ide.eclipse.tests,com.android.ide.eclipse.adt.…
61 com.android.ide.eclipse.adt.internal;x-friends:="com.android.ide.eclipse.tests",
62 com.android.ide.eclipse.adt.internal.actions;x-friends:="com.android.ide.eclipse.tests",
63 com.android.ide.eclipse.adt.internal.assetstudio;x-friends:="com.android.ide.eclipse.tests",
64 com.android.ide.eclipse.adt.internal.build;x-friends:="com.android.ide.eclipse.tests",
65 com.android.ide.eclipse.adt.internal.build.builders;x-friends:="com.android.ide.eclipse.tests",
[all …]
/sdk/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/editors/layout/gle2/
DControlPoint.java37 public final int x; 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.java36 public final int x; 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
100 this.x = x; in LayoutPoint()
112 int cx = mCanvas.getHorizontalTransform().translate(x); 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()
136 result = prime * result + x; in hashCode()
150 if (x != other.x) in equals()
DGCWrapper.java259 drawLine(p1.x, p1.y, p2.x, p2.y); in drawLine()
268 int x = mHScale.translate(x1); in drawRect() local
272 getGc().drawRectangle(x, y, w, h); in drawRect()
277 drawRect(p1.x, p1.y, p2.x, p2.y); in drawRect()
284 int x = mHScale.translate(r.x); in drawRect() local
288 getGc().drawRectangle(x, y, w, h); in drawRect()
295 int x = mHScale.translate(x1); in fillRect() local
299 getGc().fillRectangle(x, y, w, h); in fillRect()
304 fillRect(p1.x, p1.y, p2.x, p2.y); in fillRect()
311 int x = mHScale.translate(r.x); in fillRect() local
[all …]
DImageUtils.java64 for (int x = 0, width = image.getWidth(); x < width; x++) { 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
243 x1 = initialCrop.x; in crop()
245 x2 = initialCrop.x + initialCrop.w; in crop()
270 for (int x = x1; x < x2; x++) { 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()
80 ControlPoint bottomRight = LayoutPoint.create(mCanvas, mask.x + mask.width, in paint()
82 int x1 = topLeft.x; in paint()
84 int x2 = bottomRight.x; in paint()
118 tempResult.add(new Rectangle(r.x, r.y, r.width, h.y - r.y)); in subtractRectangles()
122 if (h.x > r.x) { in subtractRectangles()
123 tempResult.add(new Rectangle(r.x, h.y, h.x - r.x, h.height)); in subtractRectangles()
126 int hx2 = h.x + h.width; in subtractRectangles()
128 int rx2 = r.x + r.width; in subtractRectangles()
[all …]
DMarqueeGesture.java72 int x = Math.min(pos.x, mStart.x); in update() local
74 int w = Math.abs(pos.x - mStart.x); 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
125 mRectangle.x = x; in updateSize()
DSwtUtils.java162 for (int x = 0; x < width; x++) { in convertToSwt()
163 int alpha = awtImage.getRGB(x, y) >>> 24; in convertToSwt()
171 alphaRow[x] = (byte) alpha; in convertToSwt()
203 for (int x = 0; x < swtData.width; x++) { in convertToAwt()
204 int pixel = swtData.getPixel(x, y); in convertToAwt()
205 awtImage.setRGB(x, y, 0xFF000000 | pixel); in convertToAwt()
215 for (int x = 0; x < swtData.width; x++) { in convertToAwt()
216 int pixel = swtData.getPixel(x, y); in convertToAwt()
226 awtImage.setRGB(x, y, pixel); in convertToAwt()
274 int dx1 = bounds.x - boundingBox.x; in drawRectangles()
[all …]
DResizeGesture.java147 int x = b.x; in getNewBounds() local
151 int deltaX = p.x - start.x; in getNewBounds()
173 int x2 = b.x + b.w; in getNewBounds()
174 int nx1 = b.x + deltaX; in getNewBounds()
176 x = nx1; in getNewBounds()
177 w = x2 - x; in getNewBounds()
180 x = x2; in getNewBounds()
185 int nx2 = b.x + b.w + deltaX; in getNewBounds()
186 if (nx2 >= b.x) { in getNewBounds()
187 w = nx2 - b.x; in getNewBounds()
[all …]
/sdk/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/common/layout/
DAbsoluteLayoutRule.java102 int x = p.x; in drawFeedback() local
111 int offsetX = x - be.x + (feedback.dragBounds != null ? feedback.dragBounds.x : 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()
179 int deltaX = (feedback.dragBounds != null ? feedback.dragBounds.x : 0); in onDropped()
182 int x = p.x - b.x + deltaX; in onDropped()
188 offset = new Point(x - be.x, y - be.y); in onDropped()
191 x = offset.x + be.x; in onDropped()
[all …]
/sdk/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/common/layout/grid/
DGridLayoutPainter.java67 gc.drawLine(b.x, y, b.x2(), y); in paintStructure()
70 int x = grid.getColumnX(column); in paintStructure() local
71 gc.drawLine(x, b.y, x, b.y2()); in paintStructure()
93 int x1 = b.x + MARGIN_SIZE; in paintGrid()
95 for (int x = x1; x < x2; x += GRID_SIZE) { in paintGrid()
96 gc.drawPoint(x, y); in paintGrid()
185 int x = columnMatch.matchedLine; in paintFreeFormDropFeedback() local
191 int centerX = bounds.w / 2 + offsetX + x; in paintFreeFormDropFeedback()
202 gc.drawLine(b.x, y1, b.x2(), y1); in paintFreeFormDropFeedback()
203 gc.drawLine(b.x, y2, b.x2(), y2); in paintFreeFormDropFeedback()
[all …]
/sdk/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/editors/draw9patch/ui/
DStretchesViewer.java131 int xLen = rect.x + rect.width; in buildContentAreaPreview()
132 for (int x = rect.x; x < xLen; x++) { in buildContentAreaPreview()
133 mContentAreaImageData.setPixel(x, y, PADDING_COLOR); in buildContentAreaPreview()
134 mContentAreaImageData.setAlpha(x, y, PADDING_COLOR_ALPHA); in buildContentAreaPreview()
179 mSize.x = width; in setSize()
181 mProjection = mNinePatchedImage.getProjections(mSize.x, mSize.y, mProjection); in setSize()
187 mPadding.x = (canvasSize.x - width) / 2; in calcPaddings()
204 float wRatio = ((float) size.x / mSize.x); in paintControl()
209 int width = Math.round(mSize.x * ratio); in paintControl()
223 int xCount = size.x / backgroundLayerWidth 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()
316 private int getLogicalPositionX(int x) { in getLogicalPositionX() argument
317 return Math.round((x - mPadding.x + mHorizontalScroll) / ((float) mZoom / 100)); in getLogicalPositionX()
326 int posX = getLogicalPositionX(event.x); in mouseMove()
[all …]
/sdk/emulator/skins/dynamic/
Dlayout11 x 0
25 x 24
30 x 24
35 x 0
40 x 70
45 x 24
68 x 0
73 x 56
78 x 112
83 x 166
[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/
DNinePatchedImageTest.java235 assertEquals(1, rect.x); in test9Patch1()
243 assertEquals(2, rect.x); in test9Patch1()
251 assertEquals(72, rect.x); in test9Patch1()
260 assertEquals(1, rect.x); in test9Patch1()
268 assertEquals(2, rect.x); in test9Patch1()
276 assertEquals(72, rect.x); in test9Patch1()
285 assertEquals(1, rect.x); in test9Patch1()
293 assertEquals(2, rect.x); in test9Patch1()
301 assertEquals(72, rect.x); in test9Patch1()
340 assertEquals(1, rect.x); in test9Patch2()
[all …]
DGraphicsUtilitiesTest.java49 for (int x = 0; x < result.width; x++) { in testConvertToNinePatch()
52 assertEquals(0x0, result.getPixel(x, 0) & MASK_ALPHA); in testConvertToNinePatch()
55 assertEquals(0x0, result.getPixel(x, result.height - 1) & MASK_ALPHA); in testConvertToNinePatch()
85 for (int x = 0; x < baseData.width; x++) { in testClearImageData()
86 assertEquals(0x000000, baseData.getPixel(x, y)); in testClearImageData()
87 assertEquals(0x00, baseData.getAlpha(x, y)); in testClearImageData()
308 for (int x = 0; x < width; x++) { in testGetHorizontalPixels()
309 assertEquals(baseData.getPixel(x, 0), temp[x]); in testGetHorizontalPixels()
/sdk/hierarchyviewer/src/com/android/hierarchyviewer/ui/
DLayoutRenderer.java83 int x = (getWidth() - insets.left - insets.right - root.width) / 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
149 x -= xoffset; 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.java163 loupe.moveToPoint(crosshair.crosshair.x, crosshair.crosshair.y); in buildViewerAndControls()
321 for (int x = zoom; x <= width; x += zoom) { in paintComponent()
322 g2.drawLine(x, 0, x, height); in paintComponent()
335 g.drawImage(grid, clip.x - clip.x % zoom, clip.y - clip.y % zoom, null); in paintComponent()
342 int x = Math.max(0, Math.min((event.getX() + left) / zoom, image.getWidth() - 1)); in moveToPoint() local
344 moveToPoint(x, y); in moveToPoint()
345 crosshair.moveToPoint(x, y); in moveToPoint()
348 void moveToPoint(int x, int y) { in moveToPoint() argument
349 left = x * zoom - width / 2 + zoom / 2; in moveToPoint()
444 void showPixel(int x, int y) { in showPixel() argument
[all …]
/sdk/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/common/layout/relative/
DMoveHandler.java114 protected void snapVertical(Segment vEdge, int x, Rect newBounds) { in snapVertical() argument
117 int margin = !mSnap ? 0 : abs(newBounds.x - x); in snapVertical()
121 newBounds.x = x; in snapVertical()
124 int margin = !mSnap ? 0 : abs(newBounds.x - (x - newBounds.w)); in snapVertical()
128 newBounds.x = x - newBounds.w; in snapVertical()
131 newBounds.x = x - newBounds.w / 2; in snapVertical()
195 mBounds.x -= mBounds.x2() - layoutBounds.x2(); in updateMove()
200 if (mBounds.x < layoutBounds.x) { in updateMove()
201 mBounds.x = layoutBounds.x; in updateMove()
210 Segment edge = new Segment(b.y, b.x, b.x2(), null, null, TOP, NO_MARGIN); in updateMove()
[all …]
DResizeHandler.java107 protected void snapVertical(Segment vEdge, int x, Rect newBounds) { in snapVertical() argument
110 int margin = mSnap ? 0 : abs(newBounds.x - x); in snapVertical()
114 newBounds.w += newBounds.x - x; in snapVertical()
115 newBounds.x = x; in snapVertical()
118 int margin = mSnap ? 0 : abs(newBounds.x - (x - newBounds.w)); in snapVertical()
122 newBounds.w = x - newBounds.x; in snapVertical()
196 hEdge = new Segment(b.y, b.x, b.x2(), child, childId, mHorizontalEdgeType, NO_MARGIN); in updateResize()
198 hEdge = new Segment(b.y2(), b.x, b.x2(), child, childId, mHorizontalEdgeType, in updateResize()
205 vEdge = new Segment(b.x, b.y, b.y2(), child, childId, mVerticalEdgeType, NO_MARGIN); in updateResize()
/sdk/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/editors/
DAndroidDoubleClickStrategy.java67 assert cursor >= position.x && cursor <= position.y; in getWord()
71 if (string.startsWith(PREFIX_RESOURCE_REF, position.x) || in getWord()
72 string.startsWith(PREFIX_THEME_REF, position.x)) { in getWord()
73 int nameStart = string.indexOf('/', position.x + 1); in getWord()
75 position.x = nameStart + 1; in getWord()
83 if (lastDot >= position.x && lastDot < position.y - 1) { in getWord()
86 position.x = lastDot + 1; in getWord()

12345