Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Standard Widget Toolkit (SWT) » Set clipping within PaintListener.paintControl(Enlarge clipping not possible)
Set clipping within PaintListener.paintControl [message #512644] Fri, 05 February 2010 18:16 Go to next message
Benjamin Leipold is currently offline Benjamin LeipoldFriend
Messages: 13
Registered: July 2009
Junior Member
Hi,

i would like to know whether its is possible to enlarge the GC's clipping passed with paint events. Reducing the bounds works fine, but enlarging them seems to have no effect. Did i miss something or is this an intended "feature"? Does anybody know anything about or can help me?

thanks
Re: Set clipping within PaintListener.paintControl [message #513032 is a reply to message #512644] Mon, 08 February 2010 15:22 Go to previous messageGo to next message
Grant Gayed is currently offline Grant GayedFriend
Messages: 2150
Registered: July 2009
Senior Member
Hi,

I wish this could be done, but it can't due to an OS constraint. I'm not
sure if all supported OSs are like this or only some, but for platform
consistency this is the behaviour that has to be enforced for all. In order
to handle your case you need to damage the portion that you want to redraw
in the Paint event, and then you should get another Paint event with the
clipping that you want.

Note that there is one exception to this case, the Table/Tree custom draw
events can enlarge their clip rectangle like in
http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.swt.sni ppets/src/org/eclipse/swt/snippets/Snippet229.java?view=co ,
but this is because these events do not correspond to real OS paint events.

Grant


"Benjamin Leipold" <rabbit171@web.de> wrote in message
news:hkhnao$uvo$1@build.eclipse.org...
> Hi,
>
> i would like to know whether its is possible to enlarge the GC's clipping
passed with paint events. Reducing the bounds works fine, but enlarging them
seems to have no effect. Did i miss something or is this an intended
"feature"? Does anybody know anything about or can help me?
>
> thanks
Re: Set clipping within PaintListener.paintControl [message #513088 is a reply to message #512644] Mon, 08 February 2010 19:20 Go to previous message
Benjamin Leipold is currently offline Benjamin LeipoldFriend
Messages: 13
Registered: July 2009
Junior Member
I've worried that. The ugly side-effect of your solution, which i've already implemented, is, that the GUI flickers slightly because of the two paint events. Nevertheless, thanks for your reply.
Previous Topic:How can I get private data out of StyledText?
Next Topic:How to control the Tab selection
Goto Forum:
  


Current Time: Fri Mar 29 04:42:53 GMT 2024

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

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

Back to the top