Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [platform-swt-dev] GC operations outside paint callback


This works fine.  This is how draw2d paints.  The only known issues are on GTK if you ARE inside a paint callback, and you try to create your own GC with a bigger clip region than the one sent in the paint event, painting will still be clipped to the region sent in the event.  The workaround is to use the repaint mechanism always or at least when this occurs.

-Randy



Knut Radloff/Raleigh/IBM@IBMUS
Sent by: platform-swt-dev-admin@xxxxxxxxxxx

07/23/2004 04:00 PM
Please respond to platform-swt-dev

       
        To:        platform-swt-dev@xxxxxxxxxxx
        cc:        
        Subject:        [platform-swt-dev] GC operations outside paint callback




Is it valid for an application to render directly on a GC, outside a paint callback? E.g., given the code below am I guaranteed to get the expected line on all SWT implementations? I don't think this is spec'd anywhere. Is this "implementation dependent" behavior?


shell = new Shell()

shell.open()

gc = new GC(shell);

gc.drawLine(0, 0, 10, 0);


The JUnit tests don't call GC operations inside a paint callback but they also don't test if a call actually rendered the expected output.


Thanks, Knut


Back to the top