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

AddLineTo() public method

public AddLineTo ( double x, double y ) : void
x double
y double
return void
        public void AddLineTo(double x, double y)
        {
            AddVertex(x, y, VertexCmd.LineTo);
        }
        public void AddCloseFigure()

Usage Example

示例#1
0
        void CreateEndLineCap(VertexStore outputVxs, Vector v0, Vector v1, double edgeWidth)
        {
            switch (this.LineCapStyle)
            {
            default: throw new NotSupportedException();

            case LineCap.Butt:
                outputVxs.AddLineTo(v0.X, v0.Y);
                outputVxs.AddLineTo(v1.X, v1.Y);

                break;

            case LineCap.Square:
            {
                Vector delta = (v1 - v0).Rotate(90).NewLength(edgeWidth);
                outputVxs.AddLineTo(v0.X + delta.X, v0.Y + delta.Y);
                outputVxs.AddLineTo(v1.X + delta.X, v1.Y + delta.Y);
            }
            break;

            case LineCap.Round:
            {
                capVectors.Clear();
                BuildEndCap(v0.X, v0.Y, v1.X, v1.Y, capVectors);
                int j = capVectors.Count;
                for (int i = j - 1; i >= 0; --i)
                {
                    Vector v = capVectors[i];
                    outputVxs.AddLineTo(v.X, v.Y);
                }
            }
            break;
            }
        }
All Usage Examples Of PixelFarm.Agg.VertexStore::AddLineTo