예제 #1
0
        protected virtual void AddShapePath(GraphicsPath graphicsPath, RegionInfo regionInfo, int sizeOffset = 0)
        {
            Rectangle area = regionInfo.Area.SizeOffset(sizeOffset);

            switch (regionInfo.Shape)
            {
                default:
                case RegionShape.Rectangle:
                    graphicsPath.AddRectangle(area);
                    break;
                case RegionShape.RoundedRectangle:
                    graphicsPath.AddRoundedRectangle(area, regionInfo.RoundedRectangleRadius);
                    break;
                case RegionShape.Ellipse:
                    graphicsPath.AddEllipse(area);
                    break;
                case RegionShape.Triangle:
                    graphicsPath.AddTriangle(area, regionInfo.TriangleAngle);
                    break;
                case RegionShape.Diamond:
                    graphicsPath.AddDiamond(area);
                    break;
            }
        }
예제 #2
0
 protected override void AddShapePath(GraphicsPath graphicsPath, Rectangle rect)
 {
     graphicsPath.AddTriangle(rect, Angle);
 }