Home
last modified time | relevance | path

Searched refs:gc (Results 1 – 25 of 54) sorted by relevance

123

/sdk/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/common/layout/grid/
DGridLayoutPainter.java60 public static void paintStructure(DrawingStyle style, INode layout, IGraphics gc, in paintStructure() argument
64 gc.useStyle(style); in paintStructure()
67 gc.drawLine(b.x, y, b.x2(), y); in paintStructure()
71 gc.drawLine(x, b.y, x, b.y2()); in paintStructure()
83 public static void paintGrid(INode layout, IGraphics gc) { in paintGrid() argument
86 int oldAlpha = gc.getAlpha(); in paintGrid()
87 gc.useStyle(DrawingStyle.GUIDELINE); in paintGrid()
88 gc.setAlpha(128); in paintGrid()
96 gc.drawPoint(x, y); in paintGrid()
99 gc.setAlpha(oldAlpha); in paintGrid()
[all …]
/sdk/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/editors/layout/gle2/
DOutlineOverlay.java75 public void paint(GC gc) { in paint() argument
78 gc.setForeground(mOutlineColor); in paint()
79 gc.setLineStyle(SwtDrawingStyle.OUTLINE.getLineStyle()); in paint()
80 int oldAlpha = gc.getAlpha(); in paint()
81 gc.setAlpha(SwtDrawingStyle.OUTLINE.getStrokeAlpha()); in paint()
82 drawOutline(gc, lastRoot); in paint()
83 gc.setAlpha(oldAlpha); in paint()
87 private void drawOutline(GC gc, CanvasViewInfo info) { in drawOutline() argument
100 gc.drawRectangle(x, y, w + 1, h + 1); in drawOutline()
103 drawOutline(gc, vi); in drawOutline()
DEmptyViewsOverlay.java74 public void paint(GC gc) { in paint() argument
75 gc.setForeground(mBorderColor); in paint()
76 gc.setLineDash(null); in paint()
77 gc.setLineStyle(SwtDrawingStyle.EMPTY.getLineStyle()); in paint()
78 int oldAlpha = gc.getAlpha(); in paint()
79 gc.setAlpha(SwtDrawingStyle.EMPTY.getStrokeAlpha()); in paint()
80 gc.setLineWidth(SwtDrawingStyle.EMPTY.getLineWidth()); in paint()
91 gc.drawRectangle(x, y, w + 1, h + 1); in paint()
94 gc.setAlpha(oldAlpha); in paint()
DHoverOverlay.java144 public void paint(GC gc) { in paint() argument
167 int oldAlpha = gc.getAlpha(); in paint()
168 gc.setForeground(stroke); in paint()
169 gc.setLineStyle(hoverIsSelected ? in paint()
171 gc.setAlpha(hoverIsSelected ? in paint()
173 gc.drawRectangle(x, y, w, h); in paint()
174 gc.setAlpha(oldAlpha); in paint()
178 int oldAlpha = gc.getAlpha(); in paint()
179 gc.setAlpha(hoverIsSelected ? in paint()
181 gc.setBackground(fill); in paint()
[all …]
DRenderPreview.java847 void paint(GC gc, int x, int y) { in paint() argument
848 mTitleHeight = paintTitle(gc, x, y, true /*showFile*/); in paint()
855 gc.drawImage(mThumbnail, x, y); in paint()
858 int oldWidth = gc.getLineWidth(); in paint()
859 gc.setLineWidth(3); in paint()
860 gc.setForeground(gc.getDevice().getSystemColor(SWT.COLOR_LIST_SELECTION)); in paint()
861 gc.drawRectangle(x - 1, y - 1, width + 2, height + 2); in paint()
862 gc.setLineWidth(oldWidth); in paint()
866 gc.drawImage(mThumbnail, x, y); in paint()
868 gc.setBackground(gc.getDevice().getSystemColor(SWT.COLOR_WIDGET_BORDER)); in paint()
[all …]
DImageControl.java181 GC gc = event.gc; in onPaint() local
188 int oldGcAlias = gc.getAntialias(); in onPaint()
189 int oldGcInterpolation = gc.getInterpolation(); in onPaint()
193 gc.setAntialias(SWT.ON); in onPaint()
194 gc.setInterpolation(SWT.HIGH); in onPaint()
197 gc.drawImage(mImage, 0, 0, imageWidth, imageHeight, rect.x + mLeftMargin, rect.y in onPaint()
200 gc.setAntialias(oldGcAlias); in onPaint()
201 gc.setInterpolation(oldGcInterpolation); in onPaint()
204 gc.setAlpha(60); in onPaint()
205 gc.setBackground(mHoverColor); in onPaint()
[all …]
DMarqueeGesture.java147 public void paint(GC gc) { in paint() argument
149 gc.setLineStyle(SWT.LINE_SOLID); in paint()
150 gc.setLineWidth(1); in paint()
151 gc.setForeground(mStroke); in paint()
152 gc.setBackground(mFill); in paint()
153 gc.setAlpha(mStrokeAlpha); in paint()
154 gc.drawRectangle(mRectangle); in paint()
155 gc.setAlpha(mFillAlpha); in paint()
156 gc.fillRectangle(mRectangle); in paint()
DImageOverlay.java208 public synchronized void paint(GC gc) { in paint() argument
213 gc_setAlpha(gc, 128); // half-transparent in paint()
269 gc.drawImage(mPreScaledImage, hi.translate(0), vi.translate(0)); in paint()
277 oldAlias = gc_setAntialias(gc, SWT.ON); in paint()
289 gc.drawImage(mImage, in paint()
294 SwtUtils.drawRectangleShadow(gc, destX, destY, destWidth, destHeight); in paint()
298 gc_setAntialias(gc, oldAlias); in paint()
302 gc_setAlpha(gc, 255); // opaque in paint()
319 private boolean gc_setAlpha(GC gc, int alpha) { in gc_setAlpha() argument
321 gc.setAlpha(alpha); in gc_setAlpha()
[all …]
DIncludeOverlay.java53 public void paint(GC gc) { in paint() argument
68 int oldAlpha = gc.getAlpha(); in paint()
69 gc.setAlpha(MASK_TRANSPARENCY); in paint()
70 Color bg = gc.getDevice().getSystemColor(SWT.COLOR_WIDGET_BACKGROUND); in paint()
71 gc.setBackground(bg); in paint()
87 gc.fillRectangle(x1, y1, x2 - x1, y2 - y1); in paint()
90 gc.setAlpha(oldAlpha); in paint()
DSwtUtils.java372 GC gc = new GC(display);
373 gc.setFont(font);
374 FontMetrics fontMetrics = gc.getFontMetrics();
376 gc.dispose();
387 GC gc = new GC(control.getDisplay());
388 int width = gc.getFontMetrics().getAverageCharWidth();
389 gc.dispose();
411 public static final void drawRectangleShadow(GC gc, int x, int y, int width, int height) {
437 gc.drawImage(sShadowBottomLeft, x, y + height);
438 gc.drawImage(sShadowBottomRight, x + width, y + height);
[all …]
DSelectionOverlay.java72 GC gc, RulesEngine rulesEngine) { in paint() argument
90 paintSelection(gcWrapper, gc, s, isMultipleSelection); in paint()
188 private void paintSelection(IGraphics gc, GC swtGc, SelectionItem item, in paintSelection() argument
201 gc.useStyle(DrawingStyle.SELECTION); in paintSelection()
216 gc.drawRect(x1, y1, x2, y2); in paintSelection()
224 gc.fillRect(r); in paintSelection()
225 gc.drawRect(r); in paintSelection()
243 gc.setAlpha(style.getStrokeAlpha()); in paintSelection()
DLintOverlay.java62 public void paint(GC gc) { in paint() argument
83 int oldAlpha = gc.getAlpha(); in paint()
85 gc.setAlpha(ALPHA); in paint()
116 gc.drawImage(icon, x, y); in paint()
120 gc.setAlpha(oldAlpha); in paint()
DImageUtils.java489 Graphics gc = image.getGraphics(); in drawRectangleShadow() local
491 drawRectangleShadow(gc, x, y, width, height); in drawRectangleShadow()
493 gc.dispose(); in drawRectangleShadow()
511 Graphics gc = image.getGraphics(); in drawSmallRectangleShadow() local
513 drawSmallRectangleShadow(gc, x, y, width, height); in drawSmallRectangleShadow()
515 gc.dispose(); in drawSmallRectangleShadow()
551 public static final void drawRectangleShadow(Graphics gc, in drawRectangleShadow() argument
591 gc.drawImage(sShadowBottomLeft, x, y + height, null); in drawRectangleShadow()
592 gc.drawImage(sShadowBottomRight, x + width, y + height, null); in drawRectangleShadow()
593 gc.drawImage(sShadowTopRight, x + width, y, null); in drawRectangleShadow()
[all …]
/sdk/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/common/layout/relative/
DGuidelinePainter.java49 public void paint(@NonNull IGraphics gc, @NonNull INode node, @NonNull DropFeedback feedback) { in paint() argument
53 gc.useStyle(DrawingStyle.DRAGGED); in paint()
56 gc.fillRect(bounds); in paint()
66 gc.useStyle(DrawingStyle.DEPENDENCY); in paint()
73 gc.fillRect(bounds); in paint()
79 gc.useStyle(DrawingStyle.DROP_PREVIEW); in paint()
83 gc.useStyle(DrawingStyle.RESIZE_PREVIEW); in paint()
85 gc.useStyle(DrawingStyle.RESIZE_FAIL); in paint()
88 gc.drawRect(state.mBounds); in paint()
93 gc.drawLine(state.mBounds.x, y, state.mBounds.x2(), y); in paint()
[all …]
/sdk/eclipse/plugins/com.android.ide.eclipse.gldebugger/src/com/android/ide/eclipse/gltrace/editors/
DDurationMinimap.java119 draw(e.display, e.gc); in DurationMinimap()
205 GC gc = new GC(getDisplay()); in initializeFonts() local
206 gc.setFont(mFontRegistry.get(FONT_KEY)); in initializeFonts()
207 mFontWidth = gc.getFontMetrics().getAverageCharWidth(); in initializeFonts()
208 mFontHeight = gc.getFontMetrics().getHeight(); in initializeFonts()
209 gc.dispose(); in initializeFonts()
252 private void draw(Display display, GC gc) { in draw() argument
271 gc.drawImage(mBackBufferImage, in draw()
276 private void drawBackground(GC gc, Rectangle bounds) { in drawBackground() argument
277 gc.setBackground(mBackgroundColor); in drawBackground()
[all …]
/sdk/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/editors/draw9patch/ui/
DImageViewer.java486 pe.gc.drawImage(mBufferImage, 0, 0);
559 pe.gc.drawImage(mBufferImage, 0, 0);
571 private void drawVerticalPatches(GC gc, int baseX, int baseY) {
575 gc.setBackground(getColor(t.color));
576 gc.fillRectangle(
585 private void drawHorizontalPatches(GC gc, int baseX, int baseY) {
589 gc.setBackground(getColor(t.color));
590 gc.fillRectangle(
599 private void drawHorizontalContentArea(GC gc, int baseX, int baseY) {
603 gc.setBackground(getColor(t.color));
[all …]
DStretchesViewer.java216 GC gc = pe.gc; in paintControl() local
229 gc.drawImage(mBackgroundLayer, in paintControl()
236 gc.setAlpha(0x88); in paintControl()
237 gc.drawRectangle(0, 0, size.x, size.y); in paintControl()
238 gc.setAlpha(0xFF); in paintControl()
252 gc.drawImage(mNinePatchedImage.getImage(), p.src.x, p.src.y, in paintControl()
258 gc.drawImage(mContentAreaImage, p.src.x, p.src.y, in paintControl()
/sdk/eclipse/plugins/com.android.ide.eclipse.gldebugger/src/com/android/ide/eclipse/gltrace/widgets/
DImageCanvas.java93 paintCanvas(e.gc); in ImageCanvas()
188 private void paintCanvas(GC gc) { in paintCanvas() argument
189 gc.fillRectangle(getClientArea()); // clear entire client area in paintCanvas()
204 gc.drawImage(mImage, in paintCanvas()
207 drawBorder(gc, 0, 0, client.width, (int)(rect.height * sx)); in paintCanvas()
210 gc.drawImage(mImage, in paintCanvas()
213 drawBorder(gc, 0, 0, (int)(rect.width * sy), client.height); in paintCanvas()
216 gc.drawImage(mImage, mOrigin.x, mOrigin.y); in paintCanvas()
217 drawBorder(gc, mOrigin.x, mOrigin.y, rect.width, rect.height); in paintCanvas()
221 private void drawBorder(GC gc, int x, int y, int width, int height) { in drawBorder() argument
[all …]
/sdk/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/editors/
DIconFactory.java358 GC gc = new GC(image); in getImageData() local
359 gc.setAdvanced(true); in getImageData()
360 gc.setAntialias(SWT.ON); in getImageData()
361 gc.setTextAntialias(SWT.ON); in getImageData()
376 gc.setBackground(backgroundColor); in getImageData()
377 gc.fillRectangle(0, 0, SX, SY); in getImageData()
379 gc.setBackground(display.getSystemColor(SWT.COLOR_WHITE)); in getImageData()
381 gc.fillOval(0, 0, SX - 1, SY - 1); in getImageData()
383 gc.fillRoundRectangle(0, 0, SX - 1, SY - 1, RX, RY); in getImageData()
386 gc.setForeground(display.getSystemColor(SWT.COLOR_BLACK)); in getImageData()
[all …]
/sdk/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/common/layout/
DAbsoluteLayoutRule.java70 public void paint(@NonNull IGraphics gc, @NonNull INode node, in onDropEnter()
74 drawFeedback(gc, node, elements, feedback); in onDropEnter()
82 IGraphics gc, in drawFeedback() argument
92 gc.useStyle(DrawingStyle.DROP_RECIPIENT); in drawFeedback()
93 gc.drawRect(b); in drawFeedback()
113 gc.useStyle(DrawingStyle.DROP_PREVIEW); in drawFeedback()
115 drawElement(gc, element, offsetX, offsetY); in drawFeedback()
120 gc.useStyle(DrawingStyle.GUIDELINE); 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()
[all …]
DFrameLayoutRule.java63 public void paint(@NonNull IGraphics gc, @NonNull INode node, in onDropEnter()
65 drawFeedback(gc, node, elements, feedback); in onDropEnter()
71 IGraphics gc,
80 gc.useStyle(DrawingStyle.DROP_RECIPIENT);
81 gc.drawRect(b);
92 gc.useStyle(DrawingStyle.DROP_PREVIEW);
102 drawElement(gc, it, offsetX, offsetY);
113 gc.drawLine(b.x + 1, b.y, b.x + 1, b.y + b.h);
114 gc.drawLine(b.x, b.y + 1, b.x + b.w, b.y + 1);
DScrollViewRule.java82 IGraphics gc, in drawFeedback() argument
89 gc.useStyle(DrawingStyle.DROP_RECIPIENT); in drawFeedback()
90 gc.drawRect(b); in drawFeedback()
93 super.drawFeedback(gc, targetNode, elements, feedback); in drawFeedback()
/sdk/eclipse/plugins/com.android.ide.eclipse.monitor/src/com/android/ide/eclipse/monitor/
DSwtUtils.java24 GC gc = new GC(c); in getFontWidth() local
25 int avgCharWidth = gc.getFontMetrics().getAverageCharWidth(); in getFontWidth()
26 gc.dispose(); in getFontWidth()
/sdk/eclipse/plugins/com.android.ide.eclipse.gldebugger/src/com/android/ide/eclipse/gltrace/
DSwtUtils.java28 GC gc = new GC(c); in getApproximateFontWidth() local
29 int avgCharWidth = gc.getFontMetrics().getAverageCharWidth(); in getApproximateFontWidth()
30 gc.dispose(); in getApproximateFontWidth()
/sdk/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/editors/layout/properties/
DXmlPropertyEditor.java129 public void paint(Property property, GC gc, int x, int y, int width, int height) in paint() argument
181 Color color = new Color(gc.getDevice(), rgb); in paint()
183 Color oldBackground = gc.getBackground(); in paint()
184 Color oldForeground = gc.getForeground(); in paint()
195 gc.setBackground(color); in paint()
196 gc.fillRectangle(x_c, y_c, width_c, height_c); in paint()
198 gc.setForeground(IColorConstants.gray); in paint()
199 gc.drawRectangle(x_c, y_c, width_c, height_c); in paint()
201 gc.setBackground(oldBackground); in paint()
202 gc.setForeground(oldForeground); in paint()
[all …]

123