public DrawLineLoopWithVertexBuffer ( float polygon2dVertices, int nelements, Drawing color ) : void | ||
polygon2dVertices | float | |
nelements | int | |
color | Drawing | |
return | void |
public void DrawGfxPath(Drawing.Color color, InternalGraphicsPath igpth) { switch (SmoothMode) { case SmoothMode.No: { int subPathCount = igpth.FigCount; for (int i = 0; i < subPathCount; ++i) { Figure f = igpth.GetFig(i); float[] coordXYs = f.coordXYs; unsafe { fixed(float *head = &coordXYs[0]) { basicFillShader.DrawLineLoopWithVertexBuffer(head, coordXYs.Length / 2, StrokeColor); } } } } break; case SmoothMode.Smooth: { StrokeColor = color; StrokeWidth = 1f; int subPathCount = igpth.FigCount; for (int i = 0; i < subPathCount; ++i) { Figure f = igpth.GetFig(i); smoothLineShader.DrawTriangleStrips(f.GetSmoothBorders(smoothBorderBuilder), f.BorderTriangleStripCount); } //restore back } break; } }
public void DrawGfxPath(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[] coordXYs = f.coordXYs; unsafe { fixed(float *head = &coordXYs[0]) { basicFillShader.DrawLineLoopWithVertexBuffer(head, coordXYs.Length / 2, StrokeColor); } } } } break; case CanvasSmoothMode.Smooth: { StrokeColor = color; StrokeWidth = 1f; List <Figure> figures = igpth.figures; int subPathCount = figures.Count; for (int i = 0; i < subPathCount; ++i) { Figure f = figures[i]; smoothLineShader.DrawTriangleStrips(f.GetSmoothBorders(), f.BorderTriangleStripCount); } } break; } }