Page Index Toggle Pages: 1 Send TopicPrint
Normal Topic Copy to image (only selected items) (Read 1294 times)
jpinera
YaBB Newbies
*
Offline


I love YaBB 1G - SP1!

Posts: 10
Joined: Jul 4th, 2011
Copy to image (only selected items)
Jul 7th, 2011 at 10:43am
Print Post  
I would like to allow users export to other programs using the clipboard.

I don't find the WmfExport class (where is it?) and I am trying to allow user to export part of the diagram to a bmp image, and store it in the clipboard.

To export the whole diagram is easy:

Code
Select All
              Bitmap source = Diagram.CreateImage();
              Clipboard.SetImage(source);
 



but if I want to copy only the selected items I have problems:

1) I created a Bitmap with the whole diagram
2) I created a RectF that contains all selected items
3) I create an empty bitmap with the same size of the rect created in step 2.

It seem as the coordinates of the bitmap and of the diagram were not the same. The rectF created in (2) is very small.

does exist any method to save to image part of the diagram?
  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: Copy to image (only selected items)
Reply #1 - Jul 7th, 2011 at 11:05am
Print Post  
WmfExporter is in the MindFusion.Diagramming.Export.Wmf.dll assembly.

If you need to export an image only for selected items, you could paste them into an offscreen diagram and export that diagram instead.

Use ClientToDoc and DocToClient to convert between pixels and diagram units.

I hope that helps,
Stoyan
  
Back to top
 
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint