Adds a straight line to the VectorImage.
GSErrCode AddLine ( short pen, short pattern, short layer, short drwIndex, double x1, double y1, double x2, double y2 );
- The drawing pen of the line.
- The index of the used line type attribute.
- The containing layer of the line It should range from 1 to 16.
- The drawing index of the line. It influences the drawing order of the item.
- The x co-ordinate of the start of the line in the model in meters.
- The y co-ordinate of the start of the line in the model in meters.
- The x co-ordinate of the end of the line in the model in meters.
- The y co-ordinate of the end of the line in the model in meters.
If the function succeeds, the return value is NoError. If the function fails, the return value is the error code.
Addition always merges the new item to the end of the primitives list but drawing order can differ from placing order.
- Version:API 10.0 or later, ModelerGraphics 8 or later
- Library:ModelerGraphicsImp.lib (Win) or ModelerGraphics.framework (Mac)