BezierSpan

From SDK
Jump to navigation Jump to search
Back.jpg

This object represents a bezier span in a Contour. It is derived from the Span class and all methods and properties of the span class are valid on this object as well. As well as creating spans to append to a contour you can use the BezierTo methods to avoid span creation.


Constructors

BezierSpan( Point2D start_pt, Point2D end_pt, Point2D ctrl_pt_1, Point2D ctrl_pt_1)

A new span representing a bezier is created within a Lua script using this contructor method

start_pt – Point2D – 2D position for start point of span
end_pt – Point2D – 2D position for end point of span - must have same Z values as start
ctrl_pt_1 - Point2D – 2D position for first control point
ctrl_pt_2 - Point2D – 2D position for second control point


  e.g  

  local start_pt = Point2D(0,   0)
  local end_pt   = Point2D(1.0, 0)
  local ctrl_1   = Point2D(0.2, 0.2) 
  local ctrl_2   = Point2D(0.8, 0.2)  
  local bez_span = BezierSpan(start_pt, end_pt, ctrl_1, ctrl_2)    

BezierSpan( Point3D start_pt, Point3D end_pt, Point2D ctrl_pt_1, Point2D ctrl_pt_1)

A new span representing a bezier is created within a Lua script using this constructor method

start_pt - Point3D – 3D position for start point of span
end_pt - Point3D – 3D position for end point of span- must have same Z values as start
ctrl_pt_1 - Point2D – 2D position for first control point
ctrl_pt_2 - Point2D – 2D position for second control point
 e.g  

  local start_pt = Point3D(0,   0, 0) 
  local end_pt   = Point3D(1.0, 0, 0) 
  local ctrl_1   = Point2D(0.2, 0.2) 
  local ctrl_2   = Point2D(0.8, 0.2)  
  local bez_span = BezierSpan(start_pt, end_pt, ctrl_1, ctrl_2)   


Back.jpg

References

Please Note: The base material for the contents found in this WiKi was sourced from Vectric Lua Interface for Gadgets, version 2.05, published September 12, 2018. by Vectric Ltd. Most current document from Vertric can be downloaded at Vertric Developer Information