PixelFarm.Agg.VertexStore.GetCommand C# (CSharp) Method

GetCommand() public method

public GetCommand ( int index ) : VertexCmd
index int
return VertexCmd
        public VertexCmd GetCommand(int index)
        {
            return (VertexCmd)m_cmds[index];
        }
        //--------------------------------------------------

Usage Example

        //--------------------------------------------------------------------
        public static void InvertPolygon(VertexStore myvxs, int start)
        {
            // Skip all non-vertices at the beginning
            int vcount = myvxs.Count;

            while (start < vcount &&
                   !VertexHelper.IsVertextCommand(myvxs.GetCommand(start)))
            {
                ++start;
            }

            // Skip all insignificant move_to
            while (start + 1 < vcount &&
                   VertexHelper.IsMoveTo(myvxs.GetCommand(start)) &&
                   VertexHelper.IsMoveTo(myvxs.GetCommand(start + 1)))
            {
                ++start;
            }

            // Find the last vertex
            int end = start + 1;

            while (end < vcount && !VertexHelper.IsNextPoly(myvxs.GetCommand(end)))
            {
                ++end;
            }

            InvertPolygon(myvxs, start, end);
        }
All Usage Examples Of PixelFarm.Agg.VertexStore::GetCommand