Page Index Toggle Pages: 1 Send TopicPrint
Normal Topic Adding image to existing shapenode (Read 3471 times)
raghavkashi
YaBB Newbies
*
Offline


I love YaBB 1G - SP1!

Posts: 9
Joined: Dec 23rd, 2008
Adding image to existing shapenode
Jan 8th, 2009 at 10:14pm
Print Post  
Hi,

Is it possible to add a image (from my file system) to one of the existing shape nodes?

Please let me know if any API's or sample code if any of you has worked on this already.

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


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: Adding image to existing shapenode
Reply #1 - Jan 9th, 2009 at 10:05am
Print Post  
node.setImage(ImageIO.read(...));

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


I love YaBB 1G - SP1!

Posts: 9
Joined: Dec 23rd, 2008
Re: Adding image to existing shapenode
Reply #2 - Jan 9th, 2009 at 3:25pm
Print Post  
What i meant was to add an image on the canvas instead of adding a image into a node...I have created an image outside and adding this intothe node is not so clean.....I was to substitute a external image instead of using a image on a node using node.setImage(ImageIO......)
  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: Adding image to existing shapenode
Reply #3 - Jan 9th, 2009 at 4:11pm
Print Post  
You cannot use an image as a node if that's what you need. However, you could call ShapeNode.setTransparent(true), and then only the image will be visible, while the node's shape, borders and fill will be hidden.

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