Exemplo n.º 1
0
        internal static GraphicsPath GetOrientedSegments(LEDSegment14 segments, PointF point, float size, SegmentsCache cache)
        {
            GraphicsPath graphicsPath = cache.GetSegment(segments, point, size);

            if (graphicsPath == null)
            {
                graphicsPath = GetSegments(segments, point, size);
                using (Matrix matrix = new Matrix())
                {
                    matrix.Shear(-0.0618034f, 0f);
                    graphicsPath.Transform(matrix);
                    matrix.Reset();
                    matrix.Translate(point.X, point.Y);
                    graphicsPath.Transform(matrix);
                    matrix.Reset();
                }
                cache.SetSegment(segments, graphicsPath, point, size);
            }
            return(graphicsPath);
        }