How to add a larger cap to a line?
-
I want to add an arrow cap to a line. So I use pen.EndCap = LineCap.ArrowAnchor. But the arrow is so small. How can I add a larger one? I try to use CustomLineCap, It is so troublesome and I failed. Any advice? Regards! Radic
-
I want to add an arrow cap to a line. So I use pen.EndCap = LineCap.ArrowAnchor. But the arrow is so small. How can I add a larger one? I try to use CustomLineCap, It is so troublesome and I failed. Any advice? Regards! Radic
AFAIK CustomLineCap is the only way. I know it is difficult to get it working. Maybe you can try to draw *manually* the arrow by filling a Shape.
[ITA] Tozzi ha ragione: Gaia si sta liberando di noi. [ENG] Tozzi is right: Gaia is obliterating us.
-
AFAIK CustomLineCap is the only way. I know it is difficult to get it working. Maybe you can try to draw *manually* the arrow by filling a Shape.
[ITA] Tozzi ha ragione: Gaia si sta liberando di noi. [ENG] Tozzi is right: Gaia is obliterating us.
I thought the manual way. But you know the slope of the line changes sharply and the arrow has to change. So it needs much calculation work and I doubt if the effect is good. Radic
-
I thought the manual way. But you know the slope of the line changes sharply and the arrow has to change. So it needs much calculation work and I doubt if the effect is good. Radic
Another RAW way: 1. draw the line only (without arrows) 2. apply a scale to the Graphics object (ScaleTransform) 3. Draw a short line (few pixels long) with the default arrow cap. you should try and try to get the correct scale and 2nd line's length. :cool:
[ITA] Tozzi ha ragione: Gaia si sta liberando di noi. [ENG] Tozzi is right: Gaia is obliterating us.
-
I want to add an arrow cap to a line. So I use pen.EndCap = LineCap.ArrowAnchor. But the arrow is so small. How can I add a larger one? I try to use CustomLineCap, It is so troublesome and I failed. Any advice? Regards! Radic
-
In what way is the CustomLineCap class troublesome? I think that it probably is the easiest way to do it, so any other method would be even more troublesome. --- b { font-weight: normal; }
Any easier way? Before you construct a CustomLineCap, you need construct GraphicsPath, FillMode, etc, which, I think, is troublesome. Will you be kind enough to show me an easier way? Thanks, thanks, thanks! Radic