Page Index Toggle Pages: 1 Send TopicPrint
Normal Topic Stretching an image for a ShapeNode (Read 2677 times)
cpmjones
YaBB Newbies
*
Offline


I love YaBB 1G - SP1!

Posts: 23
Joined: Aug 4th, 2008
Stretching an image for a ShapeNode
Sep 24th, 2009 at 2:09pm
Print Post  
Hi,

I am using SetImage to set the image of a ShapeNode and then using the following

Code
Select All
setImageAlign(ImageAlign.Stretch);
setTransparent(true); 



However, the image does not appear to be stretched as there is a gap around it which means the DiagramLinks connected to the shape do not appear to be connected.

When I change it to not be transparent, I see that the DiagramLinks are connected to the shape, but the shape is larger than the image.

Any ideas?

Thanks,

Chris
  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: Stretching an image for a ShapeNode
Reply #1 - Sep 24th, 2009 at 2:39pm
Print Post  
Hi,

Could you save the diagram to a file and email it to support@mindfusion.eu?

Stoyan
  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: Stretching an image for a ShapeNode
Reply #2 - Sep 24th, 2009 at 3:13pm
Print Post  
The images from that file have a few pixels wide transparent area around the blue rectangles. You can verify that by running the following code after loading the diagram and opening the images in MSPaint:

Code
Select All
ImageIO.write((RenderedImage)((ShapeNode)diagram.getNodes().get(0)).getImage(),
	"PNG", new File("D:\\test1.png"));
ImageIO.write((RenderedImage)((ShapeNode)diagram.getNodes().get(1)).getImage(),
	"PNG", new File("D:\\test2.png"));
 



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


I love YaBB 1G - SP1!

Posts: 23
Joined: Aug 4th, 2008
Re: Stretching an image for a ShapeNode
Reply #3 - Sep 24th, 2009 at 3:25pm
Print Post  
Hi Stoyan,

I should have thought of that..

Many thanks for your usual excellent and speedy response.


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