Page Index Toggle Pages: 1 Send TopicPrint
Normal Topic Additional feature to SVGNode (Read 5000 times)
stefski
YaBB Newbies
*
Offline


I love YaBB 1G - SP1!

Posts: 31
Location: Norway
Joined: Jul 17th, 2009
Additional feature to SVGNode
Jul 17th, 2009 at 1:43pm
Print Post  
Hi,

I was very excited to learn that we can now import SVG files to use in SVGNode objects, although I was a little bit disappointed when I found that the SVG image would only be placed inside a ShapeNode, thus not making up the whole node itself.

I would very much like to see the SVGNode support SVG images in such a way that the SVG image actually becomes the shape of the node, and not just something that is rendered inside a shape node.

Is this maybe a possibility in foreseeable future?


--

Kind regards
Steffen Skov
Principal Consultant
SPT Group AS
  

Kind regards

Steffen Skov
OLGA Application Architect
Schlumberger Information Solutions AS
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: Additional feature to SVGNode
Reply #1 - Jul 17th, 2009 at 2:04pm
Print Post  
Hi,

You could set SvgNode.Transparent = true and the node will render only the SVG drawing.

The SVG drawing primitives don't provide any information on whether they are a part of the drawing outline, so it's not possible to deduce their shape only from the SVG markup. I suppose we could find some approximation by running a convex hull algorithm on the points of the SVG elements.

Stoyan
  
Back to top
 
IP Logged
 
stefski
YaBB Newbies
*
Offline


I love YaBB 1G - SP1!

Posts: 31
Location: Norway
Joined: Jul 17th, 2009
Re: Additional feature to SVGNode
Reply #2 - Jul 20th, 2009 at 9:32am
Print Post  
Hi Stoyan,

yes, an approximation, by which the shape of the SGVNode/ShapeNode is set to match the circumfence of the SVG image, would be very nice. In my opinion it does not really matter if "holes" in the SVG image becomes part of the shape. But it is important that the shape is not a rectangle when the SVG image is a triangle, so to speak.

If this is something that you will implement within, say, a few months, I can happily go on and base our work on the SVGNode.

--

Kind regards
Steffen Skov
Principal Consultant
SPT Group AS
  

Kind regards

Steffen Skov
OLGA Application Architect
Schlumberger Information Solutions AS
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: Additional feature to SVGNode
Reply #3 - Sep 16th, 2009 at 1:38pm
Print Post  
Hi Steffen,

This version adds a Shape.FromSvg method that creates a shape outline from the convex hull of the SVG:

https://mindfusion.eu/_beta/fcnet533.zip

There's also a new ContentAlign property you might need to set to Stretch, to make the SVG image fill the entire shape.

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