KLayout Manual: Main Index » Class Index » API reference - Class ShapesAPI reference - Class ShapesNotation used in Ruby API documentation Description: A collection of shapes
A shapes collection is a collection of geometrical objects, such as polygons, boxes, paths, edges or text objects. Shapes objects are the basic containers for geometrical objects of a cell. Inside a cell, there is one Shapes object per layer. Public constructors
Public methods
Public static methods and constants
Deprecated methods (protected, public, static, non-static and constructors)
Detailed description[static] unsigned int SAllDescription: Indicates that all shapes shall be retrieved [static] unsigned int SAllWithPropertiesDescription: Indicates that all shapes with properties shall be retrieved [static] unsigned int SBoxesDescription: Indicates that boxes shall be retrieved [static] unsigned int SEdgesDescription: Indicates that edges shall be retrieved [static] unsigned int SPathsDescription: Indicates that paths shall be retrieved [static] unsigned int SPolygonsDescription: Indicates that polygons shall be retrieved [static] unsigned int SPropertiesDescription: Indicates that only shapes with properties shall be retrieved [static] unsigned int STextsDescription: Indicates that texts be retrieved [static] unsigned int SUserObjectsDescription: Indicates that user objects shall be retrieved [const] void assign(const Shapes 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. void clearDescription: Clear the shape container This method has been introduced in version 0.16. It can only be used in editable mode. 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] Shapes dupDescription: Creates a copy of self [const,iter] Shape each(unsigned int flags)Description: Get all shapes
[const,iter] Shape eachDescription: Get all shapes This call is equivalent to each(SAll). This convenience method has been introduced in version 0.16 [const,iter] Shape each_overlapping(unsigned int flags,const Box region)Description: Get all shapes that overlap the search box (region)
This method was introduced in version 0.16 [const,iter] Shape each_overlapping(const Box region)Description: Get all shapes that overlap the search box (region)
This call is equivalent to each_overlapping(SAll,region). This convenience method has been introduced in version 0.16 [const,iter] Shape each_touching(unsigned int flags,const Box region)Description: Get all shapes that touch the search box (region)
This method was introduced in version 0.16 [const,iter] Shape each_touching(const Box region)Description: Get all shapes that touch the search box (region)
This call is equivalent to each_touching(SAll,region). This convenience method has been introduced in version 0.16 void erase(const Shape shape)Description: Erase the shape pointed to by the given Shape object
This method has been introduced in version 0.16. It can only be used in editable mode. Erasing a shape will invalidate the shape reference. Access to this reference may then render invalid results. [const] Shape find(const Shape shape)Description: Finds a shape inside this collected This method has been introduced in version 0.21. This method tries to find the given shape in this collection. The original shape may be located in another collection. If the shape is found, this method returns a reference to the shape in this collection, otherwise a null reference is returned. Shape insert(const Shape shape)Description: Insert a shape from a shape reference into the shapes list
This method has been introduced in version 0.16. Shape insert(const Shape shape,const Trans trans)Description: Insert a shape from a shape reference into the shapes list with a transformation
This method has been introduced in version 0.22. Shape insert(const Shape shape,const CplxTrans trans)Description: Insert a shape from a shape reference into the shapes list with a complex transformation
This method has been introduced in version 0.22. Shape insert(const Shape shape,const ICplxTrans trans)Description: Insert a shape from a shape reference into the shapes list with a complex integer transformation
This method has been introduced in version 0.22. Shape insert(const Box box)Description: Insert a box into the shapes list
Starting with version 0.16, this method returns a reference to the newly created shape Shape insert(const Path path)Description: Insert a path into the shapes list
Starting with version 0.16, this method returns a reference to the newly created shape Shape insert(const Edge edge)Description: Insert a edge into the shapes list Starting with version 0.16, this method returns a reference to the newly created shape Shape insert(const Text text)Description: Insert a text into the shapes list
Starting with version 0.16, this method returns a reference to the newly created shape Shape insert(const SimplePolygon simple_polygon)Description: Insert a simple polygon into the shapes list
Starting with version 0.16, this method returns a reference to the newly created shape Shape insert(const Polygon polygon)Description: Insert a polygon into the shapes list
Starting with version 0.16, this method returns a reference to the newly created shape Shape insert(const Box box,unsigned int property_id)Description: Insert a box with properties into the shapes list
The property Id must be obtained from the Layout object's property_id method which associates a property set with a property Id. Starting with version 0.16, this method returns a reference to the newly created shape Shape insert(const Path path,unsigned int property_id)Description: Insert a path with properties into the shapes list
The property Id must be obtained from the Layout object's property_id method which associates a property set with a property Id. Starting with version 0.16, this method returns a reference to the newly created shape Shape insert(const Edge edge,unsigned int property_id)Description: Insert a edge with properties into the shapes list
The property Id must be obtained from the Layout object's property_id method which associates a property set with a property Id. Starting with version 0.16, this method returns a reference to the newly created shape Shape insert(const Text text,unsigned int property_id)Description: Insert a text with properties into the shapes list
The property Id must be obtained from the Layout object's property_id method which associates a property set with a property Id. Starting with version 0.16, this method returns a reference to the newly created shape Shape insert(const SimplePolygon simple_polygon,unsigned int property_id)Description: Insert a simple polygon with properties into the shapes list
The property Id must be obtained from the Layout object's property_id method which associates a property set with a property Id. Starting with version 0.16, this method returns a reference to the newly created shape Shape insert(const Polygon polygon,unsigned int property_id)Description: Insert a polygon with properties into the shapes list
The property Id must be obtained from the Layout object's property_id method which associates a property set with a property Id. Starting with version 0.16, this method returns a reference to the newly created shape Shape insert_box(const Box box)Description: Insert a box into the shapes list
This method is deprecated. Use method 'insert' instead Shape insert_box_with_properties(const Box box,unsigned int property_id)Description: Insert a box with properties into the shapes list
This method is deprecated. Use method 'insert' instead Shape insert_edge(const Edge edge)Description: Insert a edge into the shapes list This method is deprecated. Use method 'insert' instead Shape insert_edge_with_properties(const Edge edge,unsigned int property_id)Description: Insert a edge with properties into the shapes list
This method is deprecated. Use method 'insert' instead Shape insert_path(const Path path)Description: Insert a path into the shapes list
This method is deprecated. Use method 'insert' instead Shape insert_path_with_properties(const Path path,unsigned int property_id)Description: Insert a path with properties into the shapes list
This method is deprecated. Use method 'insert' instead Shape insert_polygon(const Polygon polygon)Description: Insert a polygon into the shapes list
This method is deprecated. Use method 'insert' instead Shape insert_polygon_with_properties(const Polygon polygon,unsigned int property_id)Description: Insert a polygon with properties into the shapes list
This method is deprecated. Use method 'insert' instead Shape insert_simple_polygon(const SimplePolygon simple_polygon)Description: Insert a simple polygon into the shapes list
This method is deprecated. Use method 'insert' instead Shape insert_simple_polygon_with_properties(const SimplePolygon simple_polygon,unsigned int property_id)Description: Insert a simple polygon with properties into the shapes list
This method is deprecated. Use method 'insert' instead Shape insert_text(const Text text)Description: Insert a text into the shapes list
This method is deprecated. Use method 'insert' instead Shape insert_text_with_properties(const Text text,unsigned int property_id)Description: Insert a text with properties into the shapes list
This method is deprecated. Use method 'insert' instead [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_empty?Description: Returns a value indicating whether the shapes container is empty This method has been introduced in version 0.20. [const] bool is_valid?(const Shape shape)Description: Test if the given Shape object is still pointing to a valid object This method has been introduced in version 0.16. If the shape represented by the given reference has been deleted, this method returns false. If however, another shape has been inserted already that occupies the original shape's position, this method will return true again. [static] Shapes newDescription: Creates a new object of this class Shape replace(const Shape shape,const Box box)Description: Replace the given shape with a box
This method has been introduced with version 0.16. It replaces the given shape with the object specified. It does not change the property Id. To change the property Id, use the replace_prop_id method. To replace a shape and discard the property Id, erase the shape and insert a new shape. This method is permitted in editable mode only. Shape replace(const Shape shape,const Path path)Description: Replace the given shape with a path
This method has been introduced with version 0.16. It replaces the given shape with the object specified. It does not change the property Id. To change the property Id, use the replace_prop_id method. To replace a shape and discard the property Id, erase the shape and insert a new shape. This method is permitted in editable mode only. Shape replace(const Shape shape,const Edge edge)Description: Replace the given shape with an edge object This method has been introduced with version 0.16. It replaces the given shape with the object specified. It does not change the property Id. To change the property Id, use the replace_prop_id method. To replace a shape and discard the property Id, erase the shape and insert a new shape. This method is permitted in editable mode only. Shape replace(const Shape shape,const Text text)Description: Replace the given shape with a text object
This method has been introduced with version 0.16. It replaces the given shape with the object specified. It does not change the property Id. To change the property Id, use the replace_prop_id method. To replace a shape and discard the property Id, erase the shape and insert a new shape. This method is permitted in editable mode only. Shape replace(const Shape shape,const SimplePolygon simple_polygon)Description: Replace the given shape with a simple polygon
This method has been introduced with version 0.16. It replaces the given shape with the object specified. It does not change the property Id. To change the property Id, use the replace_prop_id method. To replace a shape and discard the property Id, erase the shape and insert a new shape. This method is permitted in editable mode only. Shape replace(const Shape shape,const Polygon polygon)Description: Replace the given shape with a polygon
This method has been introduced with version 0.16. It replaces the given shape with the object specified. It does not change the property Id. To change the property Id, use the replace_prop_id method. To replace a shape and discard the property Id, erase the shape and insert a new shape. This method is permitted in editable mode only. Shape replace_prop_id(const Shape shape,unsigned int property_id)Description: Replace (or install) the properties of a shape
This method has been introduced in version 0.16. It can only be used in editable mode. Changes the properties Id of the given shape or install a properties Id on that shape if it does not have one yet. The property Id must be obtained from the Layout object's property_id method which associates a property set with a property Id. This method will potentially invalidate the shape reference passed to it. Use the reference returned for future references. [static] unsigned int s_allDescription: Indicates that all shapes shall be retrieved This method is deprecated. Use method 'SAll' instead [static] unsigned int s_all_with_propertiesDescription: Indicates that all shapes with properties shall be retrieved This method is deprecated. Use method 'SAllWithProperties' instead [static] unsigned int s_boxesDescription: Indicates that boxes shall be retrieved This method is deprecated. Use method 'SBoxes' instead [static] unsigned int s_edgesDescription: Indicates that edges shall be retrieved This method is deprecated. Use method 'SEdges' instead [static] unsigned int s_pathsDescription: Indicates that paths shall be retrieved This method is deprecated. Use method 'SPaths' instead [static] unsigned int s_polygonsDescription: Indicates that polygons shall be retrieved This method is deprecated. Use method 'SPolygons' instead [static] unsigned int s_propertiesDescription: Indicates that only shapes with properties shall be retrieved This method is deprecated. Use method 'SProperties' instead [static] unsigned int s_textsDescription: Indicates that texts be retrieved This method is deprecated. Use method 'STexts' instead [static] unsigned int s_user_objectsDescription: Indicates that user objects shall be retrieved This method is deprecated. Use method 'SUserObjects' instead [const] unsigned int sizeDescription: Report the number of shapes in this container
This method was introduced in version 0.16 Shape transform(const Shape shape,const Trans trans)Description: Transform the shape given by the reference with the given transformation
This method has been introduced in version 0.16. The original shape may be deleted and re-inserted by this method. Therefore, a new reference is returned. It is permitted in editable mode only. Shape transform(const Shape shape,const CplxTrans trans)Description: Transform the shape given by the reference with the given complex transformation
This method has been introduced in version 0.16. The original shape may be deleted and re-inserted by this method. Therefore, a new reference is returned. It is permitted in editable mode only. Shape transform(const Shape shape,const ICplxTrans trans)Description: Transform the shape given by the reference with the given complex integer space transformation
This method has been introduced in version 0.22. The original shape may be deleted and re-inserted by this method. Therefore, a new reference is returned. It is permitted in editable mode only. |