Page Index Toggle Pages: 1 Send TopicPrint
Normal Topic Creating a Custom ArrowHead (Read 1524 times)
Shakester
YaBB Newbies
*
Offline


I Love MindFusion!

Posts: 2
Joined: Feb 9th, 2021
Creating a Custom ArrowHead
Feb 9th, 2021 at 2:53am
Print Post  
I am trying to create a custom arrow head with 2 simple lines to look like the first attachment (arrowhead-doubleline.jpg). I have the code as follows but it does not represent a 2 single lines. If someone can point me in the right direction here, it would be most helpful.

        public static Shape OnlyOneArrowHead { get; } = new Shape(
                new ElementTemplate[]
                {
                    new LineTemplate(20, 50, 80, 50),
                    new LineTemplate(20, 100, 80, 100)
                },
                FillRule.EvenOdd
            );


As a follow up, I would also like an arrow head like the second attachment. Some assistance on this would be great as well.

Thanks in advance for the assistance!
  

arrowhead-doubleline.jpg ( 1 KB | 97 Downloads )
arrowhead-doubleline.jpg
arrowhead-circleline.jpg ( 1 KB | 89 Downloads )
arrowhead-circleline.jpg
Back to top
 
IP Logged
 
Slavcho
YaBB Moderator
*****
Offline


tech.support

Posts: 3153
Joined: Oct 19th, 2005
Re: Creating a Custom ArrowHead
Reply #1 - Feb 9th, 2021 at 6:39am
Print Post  
The first argument specifies 'outline' geometry that gets filled. Move the array to second position for 'decorations' parameter -

Code
Select All
public static Shape OnlyOneArrowHead = new Shape(
    null,
    new ElementTemplate[]
    {
        new LineTemplate(20, 50, 80, 50),
        new LineTemplate(20, 100, 80, 100)
    },
    null,
    FillRule.EvenOdd
); 



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


tech.support

Posts: 3153
Joined: Oct 19th, 2005
Re: Creating a Custom ArrowHead
Reply #2 - Feb 9th, 2021 at 6:44am
Print Post  
Try this for second shape -

Code
Select All
public static Shape CircleLineHead = new Shape(
    new ElementTemplate[]
    {
        new ArcTemplate(20, 60, 60, 60, 0, 360),
    },
    new ElementTemplate[]
    {
        new LineTemplate(20, 30, 80, 30)
    },
    null,
    FillRule.EvenOdd
); 



Regards,
Slavcho
  
Back to top
 
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint