Page Index Toggle Pages: 1 Send TopicPrint
Normal Topic Mirroring/Flipping a shape (Read 2882 times)
jarv2003
YaBB Newbies
*
Offline


I love YaBB 1G - SP1!

Posts: 7
Joined: Jan 21st, 2010
Mirroring/Flipping a shape
Mar 22nd, 2017 at 5:00am
Print Post  
How can a shape be mirrored? The shape is not symmetrical.

New Shape( _
                New ElementTemplate() _
                { _
                    New ArcTemplate(0, 0, 85, 85, -32.00538F, 304.3191F), _
                    New LineTemplate(44, 0, 45, 0), _
                    New LineTemplate(45, 0, 100, 0), _
                    New LineTemplate(100, 0, 100, 20), _
                    New LineTemplate(100, 20, 78, 19) _
                }, _
                FillMode.Winding, "ShapeRight")

Please see attached image. How can I mirror the top shape to get the bottom shape.

Your feedback is appreciated
  

ShapeRight_Left.png ( 7 KB | 130 Downloads )
ShapeRight_Left.png
Back to top
 
IP Logged
 
Slavcho
YaBB Moderator
*****
Offline


tech.support

Posts: 3147
Joined: Oct 19th, 2005
Re: Mirroring/Flipping a shape
Reply #1 - Mar 22nd, 2017 at 6:55am
Print Post  
There's no built-in mirroring available at this time. You could define separate left/right shapes - try subtracting original shape X coordinates from 100 to get symmetrical definition. You can find a method that does that for LineTemplates here -
http://mindfusion.eu/Forum/YaBB.pl?num=1333397142/3#3

For arcs you will also have to reverse sweep angle sign and set start angle to 180 - original value, I think.

Regards,
Slavcho
  
Back to top
 
IP Logged
 
Slavcho
YaBB Moderator
*****
Offline


tech.support

Posts: 3147
Joined: Oct 19th, 2005
Re: Mirroring/Flipping a shape
Reply #2 - Mar 23rd, 2017 at 7:56pm
Print Post  
We've implemented some built-in support for that here -
https://mindfusion.eu/_beta/diag_flipshapes.zip

Enable the AllowFlip property of ShapeNode and it will flip the shape when you drag an edge over opposite one. You can get or set current flip state using FlipX and FlipY properties.

Regards,
Slavcho
Mindfusion
  
Back to top
 
IP Logged
 
Slavcho
YaBB Moderator
*****
Offline


tech.support

Posts: 3147
Joined: Oct 19th, 2005
Re: Mirroring/Flipping a shape
Reply #3 - Mar 24th, 2017 at 1:35pm
Print Post  
It wasn't flipping shape decoration elements correctly, new build here fixes that -
https://mindfusion.eu/_beta/diag_flipshapes.zip
  
Back to top
 
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint