Page Index Toggle Pages: 1 Send TopicPrint
Normal Topic Diagram - Create Image and Diagram Bounds and BackgroundImage (Read 2320 times)
steini
YaBB Newbies
*
Offline


I Love MindFusion!

Posts: 2
Joined: Jan 27th, 2015
Diagram - Create Image and Diagram Bounds and BackgroundImage
Jan 27th, 2015 at 1:30pm
Print Post  
Hi,

I'm new here to this forum.

I have a problem with the diagram/diagramview control and a few properties.

For example i set a backgroundimage (e.g. size = 1920*1080):

diagram.BackgroundImage = image;
diagram.BackgroundImageAlign = ImageAlign.Stretch.

Now i set the bounds of the diagram to the size of the image.

diagram.Bounds = diagramView.ClientToDoc(new Rectangle(0, 0, image.Width, image.Height));


The problem is, if i want to create a image from the diagram control, the returned image height and width is 1px smaller than the original image (1919 * 1079).
var image = diagram1.CreateImage();

Do you have any ideas how to get this fixed?
I need the exact same size from createimage.

Thanks.
  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: Diagram - Create Image and Diagram Bounds and BackgroundImage
Reply #1 - Jan 27th, 2015 at 4:24pm
Print Post  
Try calling diagram.CreateImage(diagram.Bounds, new Rectangle(0, 0, image.Width, image.Height), 100);

I hope that helps,
Stoyan
  
Back to top
 
IP Logged
 
steini
YaBB Newbies
*
Offline


I Love MindFusion!

Posts: 2
Joined: Jan 27th, 2015
Re: Diagram - Create Image and Diagram Bounds and BackgroundImage
Reply #2 - Jan 28th, 2015 at 8:09am
Print Post  
Thanks a lot, that solved the problem!  Smiley
  
Back to top
 
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint