public override void Paint(Graphics g, DiagramView view) { if (this.Shadowed) { PointF[] tfArray1 = this.getPoints(); int num1 = tfArray1.Length; SizeF ef1 = this.GetShadowOffset(view); for (int num2 = 0; num2 < num1; num2++) { tfArray1[num2].X += ef1.Width; tfArray1[num2].Y += ef1.Height; } if (this.Brush != null) { Brush brush1 = this.GetShadowBrush(view); DiagramGraph.DrawPolygon(g, view, null, brush1, tfArray1); } else if (this.Pen != null) { Pen pen1 = this.GetShadowPen(view, base.InternalPenWidth); DiagramGraph.DrawPolygon(g, view, pen1, null, tfArray1); } } DiagramGraph.DrawPolygon(g, view, this.Pen, this.Brush, this.getPoints()); }
public override void Paint(Graphics g, DiagramView view) { SizeF ef1 = this.GetShadowOffset(view); if (this.Shadowed) { int num1 = this.myPoints.Length; for (int num2 = 0; num2 < num1; num2++) { this.myPoints[num2].X += ef1.Width; this.myPoints[num2].Y += ef1.Height; } if (this.Brush != null) { Brush brush1 = this.GetShadowBrush(view); DiagramGraph.DrawPolygon(g, view, null, brush1, this.myPoints); } else if (this.Pen != null) { Pen pen1 = this.GetShadowPen(view, base.InternalPenWidth); DiagramGraph.DrawPolygon(g, view, pen1, null, this.myPoints); } for (int num3 = 0; num3 < num1; num3++) { this.myPoints[num3].X -= ef1.Width; this.myPoints[num3].Y -= ef1.Height; } } DiagramGraph.DrawPolygon(g, view, this.Pen, this.Brush, this.myPoints); }
public override void Paint(Graphics g, DiagramView view) { RectangleF ef1 = this.Bounds; switch (this.Style) { case ShapeStyle.None: { return; } case ShapeStyle.Ellipse: { DiagramGraph.DrawEllipse(g, view, this.Pen, this.Brush, ef1.X, ef1.Y, ef1.Width, ef1.Height); return; } case ShapeStyle.Diamond: { PointF[] tfArray1 = view.AllocTempPointArray(4); tfArray1[0].X = ef1.X + (ef1.Width / 2f); tfArray1[0].Y = ef1.Y; tfArray1[1].X = ef1.X + ef1.Width; tfArray1[1].Y = ef1.Y + (ef1.Height / 2f); tfArray1[2].X = tfArray1[0].X; tfArray1[2].Y = ef1.Y + ef1.Height; tfArray1[3].X = ef1.X; tfArray1[3].Y = tfArray1[1].Y; DiagramGraph.DrawPolygon(g, view, this.Pen, this.Brush, tfArray1); view.FreeTempPointArray(tfArray1); return; } case ShapeStyle.TriangleTopLeft: case ShapeStyle.TriangleTopRight: case ShapeStyle.TriangleBottomRight: case ShapeStyle.TriangleBottomLeft: case ShapeStyle.TriangleMiddleTop: case ShapeStyle.TriangleMiddleRight: case ShapeStyle.TriangleMiddleBottom: case ShapeStyle.TriangleMiddleLeft: { PointF[] tfArray2 = view.AllocTempPointArray(3); this.ComputeTrianglePoints(tfArray2); DiagramGraph.DrawPolygon(g, view, this.Pen, this.Brush, tfArray2); view.FreeTempPointArray(tfArray2); return; } } DiagramGraph.DrawRectangle(g, view, this.Pen, this.Brush, ef1.X, ef1.Y, ef1.Width, ef1.Height); }