PixelFarm.DrawingGL.Figure.GetSmoothBorders C# (CSharp) Method

GetSmoothBorders() public method

public GetSmoothBorders ( ) : float[]
return float[]
        public float[] GetSmoothBorders()
        {
            if (smoothBorderTess == null)
            {
                return smoothBorderTess = SmoothBorderBuilder.BuildSmoothBorders(coordXYs, out borderTriangleStripCount);
            }
            return smoothBorderTess;
        }

Usage Example

示例#1
0
        //-------------------------------------------------------------------------------
        public void FillGfxPath(Drawing.Color color, InternalGraphicsPath igpth)
        {
            switch (SmoothMode)
            {
            case CanvasSmoothMode.No:
            {
                List <Figure> figures      = igpth.figures;
                int           subPathCount = figures.Count;
                for (int i = 0; i < subPathCount; ++i)
                {
                    Figure  f        = figures[i];
                    float[] tessArea = f.GetAreaTess(ref this.tessTool);
                    if (tessArea != null)
                    {
                        this.basicFillShader.FillTriangles(tessArea, f.TessAreaTriangleCount, color);
                    }
                }
            }
            break;

            case CanvasSmoothMode.Smooth:
            {
                List <Figure> figures      = igpth.figures;
                int           subPathCount = figures.Count;
                float         prevWidth    = StrokeWidth;

                StrokeColor = color;
                StrokeWidth = 0.5f;
                for (int i = 0; i < subPathCount; ++i)
                {
                    Figure  f        = figures[i];
                    float[] tessArea = f.GetAreaTess(ref this.tessTool);
                    if (tessArea != null)
                    {
                        basicFillShader.FillTriangles(tessArea, f.TessAreaTriangleCount, color);
                        smoothLineShader.DrawTriangleStrips(f.GetSmoothBorders(), f.BorderTriangleStripCount);
                    }
                }
                StrokeWidth = prevWidth;
            }
            break;
            }
        }
All Usage Examples Of PixelFarm.DrawingGL.Figure::GetSmoothBorders