I want to draw a empty triangular arrow
-
The triangular arrow like generalization description of the UML, I have think about it for some days,but I'm still have no any ways and means.Can you tell me how to draw it? If you can give some code to me,I'll be thankful to you for it.
-
The triangular arrow like generalization description of the UML, I have think about it for some days,but I'm still have no any ways and means.Can you tell me how to draw it? If you can give some code to me,I'll be thankful to you for it.
e.Graphics.DrawPath(Pens.Black, new System.Drawing.Drawing2D.GraphicsPath( new Point[] { new Point(20, 20), new Point(40, 40), new Point(0, 40), new Point(20, 20) }, new byte[] { (byte)System.Drawing.Drawing2D.PathPointType.Start, (byte)System.Drawing.Drawing2D.PathPointType.Line, (byte)System.Drawing.Drawing2D.PathPointType.Line, (byte)System.Drawing.Drawing2D.PathPointType.Line } )); Assuming that you're drawing it in your Paint handler. Christian Graus - Microsoft MVP - C++
-
e.Graphics.DrawPath(Pens.Black, new System.Drawing.Drawing2D.GraphicsPath( new Point[] { new Point(20, 20), new Point(40, 40), new Point(0, 40), new Point(20, 20) }, new byte[] { (byte)System.Drawing.Drawing2D.PathPointType.Start, (byte)System.Drawing.Drawing2D.PathPointType.Line, (byte)System.Drawing.Drawing2D.PathPointType.Line, (byte)System.Drawing.Drawing2D.PathPointType.Line } )); Assuming that you're drawing it in your Paint handler. Christian Graus - Microsoft MVP - C++
I guess that you must understand UML shapes,do you remenber the inher inherit shape? That has a line and a triangular? I want to draw the shape use with GDI+. I have write some code.But there are some error,Can you help me?:^) ----------------------------------- private void Form2_Paint(object sender, PaintEventArgs e) { e.Graphics.SmoothingMode = SmoothingMode.AntiAlias; GraphicsPath capPath = new GraphicsPath(); Point[] cappoints = new Point[] { new Point(0, 0), new Point(10, 0), new Point(0, 10), new Point(0, 0) }; capPath.AddLines(cappoints); CustomLineCap myCap = new CustomLineCap(null, capPath); Pen capPen = new Pen(Brushes.Black, 1); capPen.CustomEndCap = myCap; capPen.CustomStartCap = myCap; myCap.StrokeJoin = LineJoin.Round; myCap.WidthScale = 2; e.Graphics.DrawLine(capPen, new Point(100, 100), new Point(300, 100)); ---------------------------------------------
-
I guess that you must understand UML shapes,do you remenber the inher inherit shape? That has a line and a triangular? I want to draw the shape use with GDI+. I have write some code.But there are some error,Can you help me?:^) ----------------------------------- private void Form2_Paint(object sender, PaintEventArgs e) { e.Graphics.SmoothingMode = SmoothingMode.AntiAlias; GraphicsPath capPath = new GraphicsPath(); Point[] cappoints = new Point[] { new Point(0, 0), new Point(10, 0), new Point(0, 10), new Point(0, 0) }; capPath.AddLines(cappoints); CustomLineCap myCap = new CustomLineCap(null, capPath); Pen capPen = new Pen(Brushes.Black, 1); capPen.CustomEndCap = myCap; capPen.CustomStartCap = myCap; myCap.StrokeJoin = LineJoin.Round; myCap.WidthScale = 2; e.Graphics.DrawLine(capPen, new Point(100, 100), new Point(300, 100)); ---------------------------------------------
I don't see any error, unless the shape being drawn is not what you want, in which case you just need to move the points until it is ? Christian Graus - Microsoft MVP - C++