Beispiel #1
0
        void createNativeStructures(out Span <float> p, out sPathSegment s, out sPathFigure f, out sPathData pd)
        {
            p = data.AsSpan();

            s             = new sPathSegment();
            s.kind        = segmentKind;
            s.pointsCount = pointsCount;
            s.flags       = arcFlags;

            f = new sPathFigure();
            f.startingPoint = startingPoint;
            f.segmentsCount = 1;
            f.isFilled      = isFilled;
            f.isClosed      = isClosed;

            pd              = new sPathData();
            pd.fillMode     = fillMode;
            pd.figuresCount = 1;
        }
Beispiel #2
0
            public void Dispose()
            {
                if (!startingPoint.HasValue || 0 == segmentsCount)
                {
                    throw new ApplicationException("PathBuilder can't close the figure because it's empty");
                }
                if (filled && !closed)
                {
                    closeFigure();
                }

                sPathFigure f = new sPathFigure();

                f.segmentsCount = segmentsCount;
                f.startingPoint = startingPoint.Value;
                f.isFilled      = filled;
                f.isClosed      = closed;
                pb.figures.Add(f);

                isOpen = false;
            }