Community
Participate
Working Groups
Created attachment 133048 [details] original (2x) Build ID: I20090313-0100 Steps To Reproduce: After upgrading Eclipse from 3.4 to 3.5M6 (and GEF from 3.4.2 to 3.5.0M6), figures in a graphical editor look ugly (see attached screenshots). If I revert the GEF and Draw2D libraries to the old versions, everything looks fine again. This is the code for creating the circle figures: public class CircleEditPart extends AbstractGraphicalEditPart { @Override protected IFigure createFigure() { final Ellipse figure = new Ellipse(); figure.setSize(25, 25); figure.setLineWidth(1); figure.setForegroundColor(ColorConstants.darkGray); figure.setBackgroundColor(ColorConstants.lightBlue); figure.setFill(true); return figure; } } The circles are contained in another figure that switched anti-aliasing on like so: @Override protected IFigure createFigure() { IFigure figure = new Panel() { @Override public void paint(Graphics graphics) { graphics.setAntialias(SWT.ON); super.paint(graphics); } }; figure.setBorder(new MarginBorder(10)); FlowLayout layout = new FlowLayout(false); layout.setMajorSpacing(10); layout.setMinorSpacing(10); figure.setLayoutManager(layout); return figure; } Not enabling the anti-aliasing in with the new version has no effect; in the old version the lines are less smooth (as expected) but the shape filling is still properly aligned.
Created attachment 133049 [details] new (2x)
Looks like the alignment issue no longer occurs in 3.5M7. The aliasing however is still not working.
I think this has to do with a problem where the state inside SWTGraphics isn't properly synchronized with the SWT GC when it's popped from the stack. There's a bugzilla that discusses some of my investigation to that, don't have the reference number off the top of my head, but will look it up. This can be assigned to me.
duplicate of bug 276682 (which now has a patch)
*** This bug has been marked as a duplicate of bug 276682 ***
Unduplicating since the issue is in GEF and not GMF.
*** Bug 276682 has been marked as a duplicate of this bug. ***
Fixed in HEAD using Marc's patch in Bug 276682.
I still have the problem with draw2d version 3.5.2.v20091126-1908. If the lineWidht >=2 the border is not drawn correct. With version 3.4.x everything is ok.