Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » GEF » Background Image / Limiting Drawing Area
Background Image / Limiting Drawing Area [message #230072] Wed, 31 January 2007 08:28 Go to next message
Mark Hoffmann is currently offline Mark HoffmannFriend
Messages: 113
Registered: July 2009
Location: Jena
Senior Member
Hello,
I new in GEF. And I have two questions. I want to draw figures on an
backgroundimage and only there.

1. How can is set a background image. Is it possible? I tried to set it on
the canvas with Control#setBackgroundImage. But it didn't work. The
Background stayed white. I further created a EditPart for my model root.
The corresponding figure is a FreeformFigure and I added a ImageFigure to
it. This works but each child I add to the root is shown behind this image
and not in front of it. So can I even get this figures to the front?

2. In addition to point 1 I want to limit the drawing area to a special
size, no matter if the visible area is larger that my limit. In the area
outside my backgoundimage the should no drawig possible.

Can you help me with this?

Thanx Mark
Re: Background Image / Limiting Drawing Area [message #230121 is a reply to message #230072] Wed, 31 January 2007 21:14 Go to previous message
Mark Hoffmann is currently offline Mark HoffmannFriend
Messages: 113
Registered: July 2009
Location: Jena
Senior Member
Mark Hoffmann schrieb:
> Hello,
> I new in GEF. And I have two questions. I want to draw figures on an
> backgroundimage and only there.
>
> 1. How can is set a background image. Is it possible? I tried to set it
> on the canvas with Control#setBackgroundImage. But it didn't work. The
> Background stayed white. I further created a EditPart for my model root.
> The corresponding figure is a FreeformFigure and I added a ImageFigure
> to it. This works but each child I add to the root is shown behind this
> image and not in front of it. So can I even get this figures to the front?
>
> 2. In addition to point 1 I want to limit the drawing area to a special
> size, no matter if the visible area is larger that my limit. In the area
> outside my backgoundimage the should no drawig possible.
>
> Can you help me with this?
>
> Thanx Mark
>
Found the solution!

I introduced a new printable layer which is not a usual layer. Layers
are extended from Figures. My layer is extended from ImageFigure.

Mark
Previous Topic:How to set selection privider for different graphical viewer?
Next Topic:CellEditor
Goto Forum:
  


Current Time: Sun Oct 17 08:36:48 GMT 2021

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

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

Back to the top