API reference - Class PathNotation used in Ruby API documentation Description: A 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. In particular, a round-ended path with a single point can represent a circle. Round-ended paths should have being and end extensions equal to half the width. Non-round-ended paths with a single point are allowed but the definition of the resulting shape in not well defined and may differ in other tools. See The Database API for more details about the database objects. Public constructors
Public methods
Public static methods and constants
Deprecated methods (protected, public, static, non-static and constructors)
Detailed description[const] bool !=(const Path p)Description: Inequality test
[const] Path *(double f)Description: Scaling by some factor Returns the scaled object. All coordinates are multiplied with the given factor and if necessary rounded. [const] bool <(const Path p)Description: Less operator
This operator is provided to establish some, not necessarily a certain sorting order [const] bool ==(const Path p)Description: Equality test
[const] long long 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 Path 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] Box bboxDescription: Returns the bounding box of the path [const] int bgn_extDescription: Get the begin extension void bgn_ext=(int 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] Path dupDescription: Creates a copy of self [const,iter] Point each_pointDescription: Get the points that make up the path's spine [const] int end_extDescription: Get the end extension void end_ext=(int ext)Description: Set the end extension [static] Path from_dpath(const DPath double_path)Description: Construct an integer-coordinate path from a floating-point coordinate one This method has been added in version 0.15. [static] new Path from_s(string s)Description: Creates an object from a string Creates the object from a string representation (as returned by to_s) This method has been added in version 0.23. [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: Returns true, if the path has round ends [const] unsigned int lengthDescription: Returns the length of the path the length of the path is determined by summing the lengths of the segments and adding begin and end extensions. For round-ended paths the length of the paths between the tips of the ends. This method was added in version 0.23. Path move(const Point p)Description: Moves the path.
Moves the path by the given offset and returns the moved path. The path is overwritten. Path move(int dx,int dy)Description: Moves the path.
Moves the path by the given offset and returns the moved path. The path is overwritten. This version has been added in version 0.23. [const] Path moved(const Point p)Description: Returns the moved path (does not change self)
Moves the path by the given offset and returns the moved path. The path is not modified. [const] Path moved(int dx,int dy)Description: Returns the moved path (does not change self)
Moves the path by the given offset and returns the moved path. The path is not modified. This version has been added in version 0.23. [static] new Path newDescription: Default constructor: creates an empty (invalid) path with width 0 [static] new Path new(Point[] pts,int width)Description: Constructor given the points of the path's spine and the width
[static] new Path new(Point[] pts,int width,int bgn_ext,int end_ext)Description: Constructor given the points of the path's spine, the width and the extensions
[static] new Path new(Point[] pts,int width,int bgn_ext,int 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 Path new_pw(Point[] pts,int width)Description: Constructor given the points of the path's spine and the width
This method is deprecated. Use method 'new' instead [static] new Path new_pwx(Point[] pts,int width,int bgn_ext,int 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 Path new_pwxr(Point[] pts,int width,int bgn_ext,int 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=(Point[] p)Description: Set the points of the path
[const] Polygon 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 round_ends_flag)Description: Set the 'round ends' flag A path with round ends show half circles at the ends, instead of square or rectangular ends. Paths with this flag set should use a begin and end extension of half the width (see bgn_ext and end_ext). The interpretation of such paths in other tools may differ otherwise. [const] SimplePolygon 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] Path transformed(const Trans 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(const CplxTrans t)Description: Transform the path.
Transforms the path with the given complex transformation. Does not modify the path but returns the transformed path. [const] Path transformed(const ICplxTrans t)Description: Transform the path.
Transforms the path with the given complex transformation. Does not modify the path but returns the transformed path. This method has been introduced in version 0.18. [const] DPath transformed_cplx(const CplxTrans t)Description: Transform the path.
This method is deprecated. Use method 'transformed' instead [const] Path transformed_cplx(const ICplxTrans t)Description: Transform the path.
This method is deprecated. Use method 'transformed' instead [const] int widthDescription: Get the width void width=(int w)Description: Set the width |