Page Index Toggle Pages: 1 Send TopicPrint
Normal Topic CreateImage for client area (Read 3864 times)
BidMaestro
Junior Member
**
Offline


to learn is to live

Posts: 74
Location: Australia
Joined: Apr 20th, 2008
CreateImage for client area
Apr 13th, 2010 at 7:11am
Print Post  
Stoyan

I have looked through the forum however I could not see if there is a method of captuing an image of the current diagramview area on screen; not the whole diagram as in using the CreateImage.

Is there a way of capturing what is on the client area screen in front of me?
Smiley
Doug
  
Back to top
WWW  
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: CreateImage for client area
Reply #1 - Apr 13th, 2010 at 7:34am
Print Post  
Hi Doug,

There's the following overloaded method:
public Bitmap CreateImage (RectangleF viewport, float scale)

Pass ClientToDoc(view.ClientRectangle) as viewport value to get only the view's client area exported.

I hope that helps,
Stoyan
  
Back to top
 
IP Logged
 
BidMaestro
Junior Member
**
Offline


to learn is to live

Posts: 74
Location: Australia
Joined: Apr 20th, 2008
Re: CreateImage for client area
Reply #2 - Apr 13th, 2010 at 9:05am
Print Post  
Stoyan

Thank you; I am a dope when converting code statements from C to VB.

I have the part where I capture the clientarea
       Dim viewport As RectangleF
       viewport = dvMain.ClientToDoc(dvMain.ClientRectangle)

However I am missing the next part of the logic creating the image from the viewport value

Doug
  
Back to top
WWW  
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: CreateImage for client area
Reply #3 - Apr 13th, 2010 at 11:55am
Print Post  
Doesn't dvMain.Diagram.CreateImage(viewport, 100) work?
  
Back to top
 
IP Logged
 
BidMaestro
Junior Member
**
Offline


to learn is to live

Posts: 74
Location: Australia
Joined: Apr 20th, 2008
Re: CreateImage for client area
Reply #4 - Apr 13th, 2010 at 12:23pm
Print Post  
Hi Stoyan

That worked perfectly; sorry it has been a long day here today.

Once again, thank you for the expert assitance.

I downloaded the 5.3.4 beta and hope to give it a few tests later in the week.

Doug
  
Back to top
WWW  
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: CreateImage for client area
Reply #5 - Apr 13th, 2010 at 12:46pm
Print Post  
Hi Doug ,

Don't bother with the beta, we are releasing it now.

Stoyan
  
Back to top
 
IP Logged
 
BidMaestro
Junior Member
**
Offline


to learn is to live

Posts: 74
Location: Australia
Joined: Apr 20th, 2008
Re: CreateImage for client area
Reply #6 - Apr 13th, 2010 at 1:13pm
Print Post  
Stoyan

I look foward to it. Grin

Doug
  
Back to top
WWW  
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint