Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » GEF » draw2d clipping
draw2d clipping [message #222810] Wed, 13 September 2006 14:05 Go to next message
Eclipse UserFriend
Originally posted by: vcciubot.uwaterloo.ca

Hi all,

Can a child figure draw outside the parent?

Basically, I have some code that does that already by translating the
Graphics object to local coordinates and then filling a polygon that
extends to negative coordinates.

This conflicts with what is said in the draw2d programmer's guide:

Clipping

When a figure paints its children, it first clips the Graphics to its
client area. As each child is painted, the graphics is also clipped to the
child's bounds. This prevents the child from painting outside of its
bounds or the client area of the parent. Clipping is cumulative based on
the entire parent chain. Below, Figure 3 is parented by Figure 2, which is
parented by Figure 1.

PS I'm using the Graphics class from gmf, so I'm not sure if this changes
things.

thanks for your answers,
Vlad
Re: draw2d clipping [message #222819 is a reply to message #222810] Wed, 13 September 2006 14:18 Go to previous message
Eclipse UserFriend
Originally posted by: vcciubot.uwaterloo.ca

I've figured it out, parent figure are the ones that control the clipping
area.



On Wed, 13 Sep 2006 10:05:33 -0400, Vlad Ciubotariu wrote:

> Hi all,
>
> Can a child figure draw outside the parent?
>
> Basically, I have some code that does that already by translating the
> Graphics object to local coordinates and then filling a polygon that
> extends to negative coordinates.
>
> This conflicts with what is said in the draw2d programmer's guide:
>
> Clipping
>
> When a figure paints its children, it first clips the Graphics to its
> client area. As each child is painted, the graphics is also clipped to the
> child's bounds. This prevents the child from painting outside of its
> bounds or the client area of the parent. Clipping is cumulative based on
> the entire parent chain. Below, Figure 3 is parented by Figure 2, which is
> parented by Figure 1.
>
> PS I'm using the Graphics class from gmf, so I'm not sure if this changes
> things.
>
> thanks for your answers,
> Vlad
Previous Topic:Can I change palette's title?
Next Topic:GEF Builds
Goto Forum:
  


Current Time: Tue Apr 23 10:33:20 GMT 2024

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

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

Back to the top