Skip to main content

Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » GEF » Wrong z-order in outline
Wrong z-order in outline [message #524806] Fri, 02 April 2010 15:23
Carsten Reckord is currently offline Carsten ReckordFriend
Messages: 139
Registered: July 2009
Senior Member

We have a Figure with the following (simplified) paint logic, which essentially adds a drop shadow by first filling a rectangle with the
shadow and then painting over it:

public class RectangleWithShadow extends RectangleFigure
protected void fillShape(Graphics graphics)


private void drawShadow(Graphics graphics)
final int shadow = EditorConstants.SHADOW_WIDTH;
final Rectangle bounds = getBounds();
graphics.setClip(new Rectangle(bounds.x, bounds.y, bounds.width+shadow, bounds.height+shadow));
final Rectangle shadowRect = bounds.getCopy().translate(shadow, shadow);

This works fine in the editor itself, however it causes strange effects in the outline view, where some or all of the shadow rectangle is
displayed in front of the figure rather than behind it.

How can this be avoided (without using lines to paint the shadow, like the SchemeBorders do)?

Best regards,
Previous Topic:Left Upper Context Menu Location
Next Topic:Fwd: Error when mirroring GEF 3.5.2 p2 repository
Goto Forum:

Current Time: Sun May 27 20:01:25 GMT 2018

Powered by FUDForum. Page generated in 0.01468 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top