Пример #1
0
        public override Shape NewShapeRotatedToRigth(float radians = GlobalConstants.RadiansRepresentationOfThirtyDegrees)
        {
            var listOfPoints = new List <PointF>()
            {
                this.Point1, this.Point2, this.Point3
            };
            var center = PolygonHlp.GetCentroidGeneric(new List <PointF>()
            {
                this.Point1, this.Point2, this.Point3
            });
            var rotatedPoints = PolygonHlp.RotatePolygon(listOfPoints, center, radians);

            return(new TriangleShape(rotatedPoints[0], rotatedPoints[1], rotatedPoints[2], this.BorderColor, base.FillColor));
        }
Пример #2
0
        public override Shape NewShapeRotatedToRigth(float radians = 0.5235988F)
        {
            var listOfPoints = new List <PointF>()
            {
                this.Point1, this.Point2
            };
            var center = PolygonHlp.GetCentroidGeneric(new List <PointF>()
            {
                this.Point1, this.Point2
            });
            var rotatedPoints = PolygonHlp.RotatePolygon(listOfPoints, center, radians);

            return(new LineShape(rotatedPoints[0], rotatedPoints[1], this.BorderColor, base.FillColor));
        }