KLayout Manual: Main Index » Class Index » API reference - Class DPathAPI reference - Class DPathNotation used in Ruby API documentation Description: An path class
A path consists of an sequence of line segments forming the 'spine' of the path and a width. In addition, the starting point can be drawn back by a certain extent (the 'begin extension') and the end point can be pulled forward somewhat (by the 'end extension'). A path may have round ends for special purposes. Public constructors
Public methods
Public static methods and constants
Deprecated methods (protected, public, static, non-static and constructors)
Detailed description[const] bool !=(const DPath p)Description: Inequality test
[const] bool <(const DPath p)Description: Less operator
This operator is provided to establish some, not necessarily a certain sorting order [const] bool ==(const DPath p)Description: Equality test
[const] double areaDescription: Returns the approximate area of the path This method returns the approximate value of the area. It is computed from the length times the width. end extensions are taken into account correctly, but not effects of the corner interpolation. This method was added in version 0.22. [const] void assign(const DPath other)Description: Assign the contents of another object to self This method assigns the contents of another object to self. This is a deep copy that does not only copy the reference but the actual content. [const] DBox bboxDescription: Returns the bounding box of the path [const] double bgn_extDescription: Get the begin extension void bgn_ext=(double ext)Description: Set the begin extension void createDescription: Ensures the C++ object is created Use this method to ensure the C++ object is created, for example to ensure that resources are allocated. Usually C++ objects are created on demand and not necessarily when the script object is created. void destroyDescription: Explicitly destroy the object Explicitly destroy the object on C++ side if it was owned by the Ruby interpreter. Subsequent access to this object will throw an exception. If the object is not owned by Ruby, this method will do nothing. [const] bool destroyed?Description: Returns a value indicating whether the object was already destroyed This method returns true, if the object was destroyed, either explicitly or by the C++ side. The latter may happen, if the object is owned by a C++ object which got destroyed itself. [const] DPath dupDescription: Creates a copy of self [const,iter] DPoint each_pointDescription: Get the points that make up the path's spine [const] double end_extDescription: Get the end extension void end_ext=(double ext)Description: Set the end extension [static] DPath from_ipath(const Path int_path)Description: Construct a floating-point coordinate path from an integer coordinate one This method has been added in version 0.15. [const] bool is_const_object?Description: Returns a value indicating whether the reference is a const reference This method returns true, if self is a const reference. In that case, only const methods may be called on self. [const] bool is_round?Description: Tell, if the path has round ends DPath move(const DPoint p)Description: Moves the path.
Moves the path by the given offset and returns the moved path. The path is overwritten. [const] DPath moved(const DPoint p)Description: Returns the moved path
Moves the path by the given offset and returns the moved path. The path is not modified. [static] new DPath newDescription: Default constructor: creates an empty (invalid) path with width 0 [static] new DPath new(DPoint[] pts,double width)Description: Constructor given the points of the path's spine and the width
[static] new DPath new(DPoint[] pts,double width,double bgn_ext,double end_ext)Description: Constructor given the points of the path's spine, the width and the extensions
[static] new DPath new(DPoint[] pts,double width,double bgn_ext,double end_ext,bool round)Description: Constructor given the points of the path's spine, the width, the extensions and the round end flag
[static] new DPath new_pw(DPoint[] pts,double width)Description: Constructor given the points of the path's spine and the width
This method is deprecated. Use method 'new' instead [static] new DPath new_pwx(DPoint[] pts,double width,double bgn_ext,double end_ext)Description: Constructor given the points of the path's spine, the width and the extensions
This method is deprecated. Use method 'new' instead [static] new DPath new_pwxr(DPoint[] pts,double width,double bgn_ext,double end_ext,bool round)Description: Constructor given the points of the path's spine, the width, the extensions and the round end flag
This method is deprecated. Use method 'new' instead [const] unsigned int num_pointsDescription: Get the number of points [const] unsigned int pointsDescription: Get the number of points This method is deprecated. Use method 'num_points' instead void points=(DPoint[] p)Description: Set the points of the path
[const] DPolygon polygonDescription: Convert the path to a polygon The returned polygon is not guaranteed to be non-self overlapping. This may happen if the path overlaps itself or contains very short segments. void round=(bool arg1)Description: Set the 'round ends' flag [const] DSimplePolygon simple_polygonDescription: Convert the path to a simple polygon The returned polygon is not guaranteed to be non-selfoverlapping. This may happen if the path overlaps itself or contains very short segments. [const] string to_sDescription: Convert to a string [const] DPath transformed(const DTrans t)Description: Transform the path.
Transforms the path with the given transformation. Does not modify the path but returns the transformed path. [const] DPath transformed_cplx(const DCplxTrans t)Description: Transform the path.
Transforms the path with the given complex transformation. Does not modify the path but returns the transformed path. [const] double widthDescription: Get the width void width=(double w)Description: Set the width |