Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » GEF » draw2d - setBackgroundPattern
draw2d - setBackgroundPattern [message #668368] Thu, 05 May 2011 13:01 Go to next message
Lukas L. is currently offline Lukas L.Friend
Messages: 13
Registered: May 2011
Junior Member
Hello all,

I have a problem with the

org.eclipse.draw2d.Graphics.setBackgroundPattern(Pattern pattern)


I am using this mehod in the fillShape method of a draw2d figure in order to use an image as background:

g.setBackgroundPattern(new Pattern(Display.getDefault(),bgImage));

The image is displayed. However, depending on the coordinates/position of my figure in the editor, the background image is shifted:

Thank you!

Best regards,

Re: draw2d - setBackgroundPattern [message #671838 is a reply to message #668368] Thu, 19 May 2011 06:55 Go to previous message
Girish Kumar is currently offline Girish KumarFriend
Messages: 47
Registered: May 2011
Check with the Size of your Figure ... Might be it is clipping ... As there is no concept of image stretching in draw2d
Previous Topic:NPE when initialising GraphicalEditor
Next Topic:Fire a property change from View
Goto Forum:

Current Time: Thu Apr 26 08:09:39 GMT 2018

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

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