Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
RE: [gef-dev] Copy highlighted nodes and connections from a Zest Graph to Windows Clip board in Image format

thank you very much...
________________________________________
From: gef-dev-bounces@xxxxxxxxxxx [gef-dev-bounces@xxxxxxxxxxx] On Behalf Of Ian Bull [irbull@xxxxxxxxxxxxxxxxx]
Sent: Saturday, February 07, 2009 5:17 AM
To: GEF development
Subject: Re: [gef-dev] Copy highlighted nodes and connections from a Zest       Graph to Windows Clip board in Image format

Sorry, just saw this post now.

you should be able to do something like:
final Image image = new Image(null, size.x, size.y);
GC gc = new GC(image);
SWTGraphics swtGraphics = new SWTGraphics(gc);
g.getContents().paint(swtGraphics);
gc.copyArea(image, 0, 0);
gc.dispose();

then you have the image.  As for interacting with the windows clipboard,I'm not sure.  Likely look at the SWT snippets for examples of this.

cheers,
ian

On Wed, Feb 4, 2009 at 2:05 AM, Jayaprakash_Kadapli <Jayaprakash_Kadapli@xxxxxxxxxx<mailto:Jayaprakash_Kadapli@xxxxxxxxxx>> wrote:

Dear All,

As per my requirement, I need to copy the highlighted nodes and connectors to windows Clipboard in Image format.

Now I am

-          drawing a new Graph from highlighted nodes and connectors on new Shell

-          Getting IFigure and convert it Image using GC

-          Copying to Clipboard

My requirement,

-          Should copy the highlighted nodes and connectors to the clipboard without opening any dialog

-          highlighted Nodes and connectors is a subgraph of the main graph and it is in tree structure.



I appreciate any help in how to achieve this…

Thanks in advance

-Jayaprakash







________________________________
DISCLAIMER:
This email (including any attachments) is intended for the sole use of the intended recipient/s and may contain material that is CONFIDENTIAL AND PRIVATE COMPANY INFORMATION. Any review or reliance by others or copying or distribution or forwarding of any or all of the contents in this message is STRICTLY PROHIBITED. If you are not the intended recipient, please contact the sender by email and delete all copies; your cooperation in this regard is appreciated.

_______________________________________________
gef-dev mailing list
gef-dev@xxxxxxxxxxx<mailto:gef-dev@xxxxxxxxxxx>
https://dev.eclipse.org/mailman/listinfo/gef-dev




--
R. Ian Bull, PhD
Software Developer, EclipseSource
http://www.ianbull.com
http://blog.ianbull.com

DISCLAIMER:
This email (including any attachments) is intended for the sole use of the intended recipient/s and may contain material that is CONFIDENTIAL AND PRIVATE COMPANY INFORMATION. Any review or reliance by others or copying or distribution or forwarding of any or all of the contents in this message is STRICTLY PROHIBITED. If you are not the intended recipient, please contact the sender by email and delete all copies; your cooperation in this regard is appreciated.


Back to the top