PixelFarm.DrawingGL.BasicFillShader.FillTriangleFan C# (CSharp) Method

FillTriangleFan() public method

public FillTriangleFan ( float polygon2dVertices, int nelements, Drawing color ) : void
polygon2dVertices float
nelements int
color Drawing
return void
        public unsafe void FillTriangleFan(float* polygon2dVertices, int nelements, Drawing.Color color)
        {
            SetCurrent();
            CheckViewMatrix();
            //--------------------------------------------

            u_solidColor.SetValue((float)color.R / 255f, (float)color.G / 255f, (float)color.B / 255f, (float)color.A / 255f);
            a_position.UnsafeLoadPureV2f(polygon2dVertices);
            GL.DrawArrays(BeginMode.TriangleFan, 0, nelements);
        }
        public void DrawLine(float x1, float y1, float x2, float y2, PixelFarm.Drawing.Color color)

Usage Example

示例#1
0
 public void FillTriangleFan(Drawing.Color color, float[] coords, int n)
 {
     unsafe
     {
         fixed(float *head = &coords[0])
         {
             basicFillShader.FillTriangleFan(head, n, color);
         }
     }
 }