Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
View | Details | Raw Unified | Return to bug 276682
Collapse All | Expand All

(-)src/org/eclipse/draw2d/Shape.java (-11 / +22 lines)
Lines 10-16 Link Here
10
 *******************************************************************************/
10
 *******************************************************************************/
11
package org.eclipse.draw2d;
11
package org.eclipse.draw2d;
12
12
13
import org.eclipse.swt.SWT;
14
import org.eclipse.swt.graphics.LineAttributes;
13
import org.eclipse.swt.graphics.LineAttributes;
15
14
16
/**
15
/**
Lines 48-55 Link Here
48
	private boolean outline;
47
	private boolean outline;
49
	private boolean xorFill;
48
	private boolean xorFill;
50
	private boolean xorOutline;
49
	private boolean xorOutline;
51
	private int antialias;
50
	private Integer antialias;
52
	private int alpha;
51
	private Integer alpha;
53
	
52
	
54
	/**
53
	/**
55
	 * Default constructor.
54
	 * Default constructor.
Lines 63-70 Link Here
63
		outline = true;
62
		outline = true;
64
		xorFill = false;
63
		xorFill = false;
65
		xorOutline = false;
64
		xorOutline = false;
66
		antialias = SWT.DEFAULT;
65
		antialias = null;
67
		alpha = 255;
66
		alpha = null;
68
67
69
		// synchronize parameters
68
		// synchronize parameters
70
		lineWidth = (int)lineAttributes.width;
69
		lineWidth = (int)lineAttributes.width;
Lines 91-98 Link Here
91
	 * @see Figure#paintFigure(Graphics)
90
	 * @see Figure#paintFigure(Graphics)
92
	 */
91
	 */
93
	public void paintFigure(Graphics graphics) {
92
	public void paintFigure(Graphics graphics) {
94
		graphics.setAntialias(antialias);
93
		if(antialias != null) {
95
		graphics.setAlpha(alpha);
94
			graphics.setAntialias(antialias.intValue());
95
		}
96
		if(alpha != null) {
97
			graphics.setAlpha(alpha.intValue());
98
		}
96
		//graphics.rotate(rotation);
99
		//graphics.rotate(rotation);
97
100
98
		/* see bug #267397: paintFigure was historically not called, disabling
101
		/* see bug #267397: paintFigure was historically not called, disabling
Lines 238-251 Link Here
238
	/**
241
	/**
239
	 * @since 3.5
242
	 * @since 3.5
240
	 */
243
	 */
241
	public int getAlpha() {
244
	public Integer getAlpha() {
242
		return alpha;
245
		return alpha;
243
	}
246
	}
244
247
245
	/**
248
	/**
246
	 * @since 3.5
249
	 * @since 3.5
247
	 */
250
	 */
248
	public int getAntialias() {
251
	public Integer getAntialias() {
249
		return antialias;
252
		return antialias;
250
	}
253
	}
251
	
254
	
Lines 366-389 Link Here
366
	/**
369
	/**
367
	 * @since 3.5
370
	 * @since 3.5
368
	 */
371
	 */
369
	public void setAlpha(int value) {
372
	public void setAlpha(Integer value) {
370
		if(alpha != value) {
373
		if(alpha != value) {
371
			alpha = value;
374
			alpha = value;
372
			repaint();
375
			repaint();
373
		}
376
		}
374
	}
377
	}
375
	
378
	
379
	public void setAlpha(int value) {
380
		setAlpha(Integer.valueOf(value));
381
	}
382
	
376
	/**
383
	/**
377
	 * @see org.eclipse.swt.graphics.GC#setAntialias(int)
384
	 * @see org.eclipse.swt.graphics.GC#setAntialias(int)
378
	 * @param value
385
	 * @param value
379
	 * @since 3.5
386
	 * @since 3.5
380
	 */
387
	 */
381
	public void setAntialias(int value) {
388
	public void setAntialias(Integer value) {
382
		if(antialias != value) {
389
		if(antialias != value) {
383
			antialias = value;
390
			antialias = value;
384
			repaint();
391
			repaint();
385
		}
392
		}
386
	}
393
	}
394
	
395
	public void setAntialias(int value) {
396
		setAntialias(Integer.valueOf(value));
397
	}
387
398
388
	/**
399
	/**
389
	 * Sets all line attributes at once.
400
	 * Sets all line attributes at once.

Return to bug 276682