How to capture image of a composite [message #453812] |
Sun, 10 April 2005 22:01 |
Eclipse User |
|
|
|
Originally posted by: aaa.domain.invalid
Hello,
I have a composite and I am trying to take a snapshot of this
programmatically.
Image im = new Image(composite.getDisplay(),
composite.getClientArea().width,composite.getClientArea().he ight);
How do I draw the contents of the composite into the image?
The GEF newgroup has an example but uses classes that are available for GEF.
TIA
-chhil
|
|
|
|
|
Re: How to capture image of a composite [message #453825 is a reply to message #453819] |
Mon, 11 April 2005 14:25 |
Eclipse User |
|
|
|
Originally posted by: aaa.domain.invalid
Charlie Surface wrote:
> Create a GC on the thing you want to copy, then call copyArea().
>
> Charlie
>
>
> Chhil wrote:
>
>> Hello,
>>
>> I have a composite and I am trying to take a snapshot of this
>> programmatically.
>>
>> Image im = new Image(composite.getDisplay(),
>> composite.getClientArea().width,composite.getClientArea().he ight);
>>
>> How do I draw the contents of the composite into the image?
>>
>> The GEF newgroup has an example but uses classes that are available
>> for GEF.
>>
>> TIA
>> -chhil
Hi Charlie,
I did try the copyarea and for some reason it ended up taking a snapshot
of my desktop. I am going to try what Gef suggested below.
Thank You for your feedback.
-Chhil
|
|
|
|
Powered by
FUDForum. Page generated in 0.03534 seconds