KLayout 0.29.8 (2024-11-26 926dac96c) [master]

API reference - Class Shapes

Notation used in Ruby API documentation

Module: db

Description: A collection of shapes

A shapes collection is a collection of geometrical objects, such as polygons, boxes, paths, edges, edge pairs 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

new Shapes ptrnewCreates a new object of this class

Public methods

[const]Shapes ptr_const_castReturns a non-const reference to self.
void_createEnsures the C++ object is created
void_destroyExplicitly destroys the object
[const]bool_destroyed?Returns a value indicating whether the object was already destroyed
[const]bool_is_const_object?Returns a value indicating whether the reference is a const reference
void_manageMarks the object as managed by the script side.
void_unmanageMarks the object as no longer owned by the script side.
voidassign(const Shapes other)Assigns another object to self
voidbreak_polygons(unsigned long max_vertex_count,
double max_area_ratio = 0)
Breaks the polygons of the shape container into smaller ones
[const]Cell ptrcellGets the cell the shape container belongs to
voidclearClears the shape container
voidclear(unsigned int flags)Clears certain shape types from the shape container
[const]new Shapes ptrdupCreates a copy of self
[const,iter]Shapeeach(unsigned int flags)Gets all shapes
[const,iter]ShapeeachGets all shapes
[const,iter]Shapeeach_overlapping(unsigned int flags,
const Box region)
Gets all shapes that overlap the search box (region)
[const,iter]Shapeeach_overlapping(unsigned int flags,
const DBox region)
Gets all shapes that overlap the search box (region) where the search box is given in micrometer units
[const,iter]Shapeeach_overlapping(const Box region)Gets all shapes that overlap the search box (region)
[const,iter]Shapeeach_overlapping(const DBox region)Gets all shapes that overlap the search box (region) where the search box is given in micrometer units
[const,iter]Shapeeach_touching(unsigned int flags,
const Box region)
Gets all shapes that touch the search box (region)
[const,iter]Shapeeach_touching(unsigned int flags,
const DBox region)
Gets all shapes that touch the search box (region) where the search box is given in micrometer units
[const,iter]Shapeeach_touching(const Box region)Gets all shapes that touch the search box (region)
[const,iter]Shapeeach_touching(const DBox region)Gets all shapes that touch the search box (region) where the search box is given in micrometer units
voiderase(const Shape shape)Erases the shape pointed to by the given Shape object
[const]Shapefind(const Shape shape)Finds a shape inside this collected
Shapeinsert(const Shape shape)Inserts a shape from a shape reference into the shapes list
Shapeinsert(const Shape shape,
const Trans trans)
Inserts a shape from a shape reference into the shapes list with a transformation
Shapeinsert(const Shape shape,
const DTrans trans)
Inserts a shape from a shape reference into the shapes list with a transformation (given in micrometer units)
Shapeinsert(const Shape shape,
const ICplxTrans trans)
Inserts a shape from a shape reference into the shapes list with a complex integer transformation
Shapeinsert(const Shape shape,
const DCplxTrans trans)
Inserts a shape from a shape reference into the shapes list with a complex integer transformation (given in micrometer units)
voidinsert(const RecursiveShapeIterator iter)Inserts the shapes taken from a recursive shape iterator
voidinsert(const RecursiveShapeIterator iter,
const ICplxTrans trans)
Inserts the shapes taken from a recursive shape iterator with a transformation
voidinsert(const Shapes shapes)Inserts the shapes taken from another shape container
voidinsert(const Shapes shapes,
const ICplxTrans trans)
Inserts the shapes taken from another shape container with a transformation
voidinsert(const Shapes shapes,
unsigned int flags)
Inserts the shapes taken from another shape container
voidinsert(const Shapes shapes,
unsigned int flags,
const ICplxTrans trans)
Inserts the shapes taken from another shape container with a transformation
voidinsert(const Region region)Inserts the polygons from the region into this shape container
voidinsert(const Region region,
const ICplxTrans trans)
Inserts the polygons from the region into this shape container with a transformation
voidinsert(const Region region,
const DCplxTrans trans)
Inserts the polygons from the region into this shape container with a transformation (given in micrometer units)
voidinsert(const Edges edges)Inserts the edges from the edge collection into this shape container
voidinsert(const Edges edges,
const ICplxTrans trans)
Inserts the edges from the edge collection into this shape container with a transformation
voidinsert(const Edges edges,
const DCplxTrans trans)
Inserts the edges from the edge collection into this shape container with a transformation (given in micrometer units)
voidinsert(const EdgePairs edge_pairs)Inserts the edges from the edge pair collection into this shape container
voidinsert(const EdgePairs edge_pairs,
const ICplxTrans trans)
Inserts the edge pairs from the edge pair collection into this shape container with a transformation
voidinsert(const EdgePairs edge_pairs,
const DCplxTrans trans)
Inserts the edge pairs from the edge pair collection into this shape container with a transformation (given in micrometer units)
voidinsert(const Texts texts)Inserts the texts from the text collection into this shape container
voidinsert(const Texts texts,
const ICplxTrans trans)
Inserts the texts from the text collection into this shape container with a transformation
voidinsert(const Texts texts,
const DCplxTrans trans)
Inserts the texts from the text collection into this shape container with a transformation (given in micrometer units)
Shapeinsert(const Box box)Inserts a box into the shapes list
Shapeinsert(const DBox box)Inserts a micrometer-unit box into the shapes list
Shapeinsert(const Path path)Inserts a path into the shapes list
Shapeinsert(const DPath path)Inserts a micrometer-unit path into the shapes list
Shapeinsert(const Edge edge)Inserts an edge into the shapes list
Shapeinsert(const DEdge edge)Inserts a micrometer-unit edge into the shapes list
Shapeinsert(const EdgePair edge_pair)Inserts an edge pair into the shapes list
Shapeinsert(const DEdgePair edge_pair)Inserts a micrometer-unit edge pair into the shapes list
Shapeinsert(const Point point)Inserts an point into the shapes list
Shapeinsert(const DPoint point)Inserts a micrometer-unit point into the shapes list
Shapeinsert(const Text text)Inserts a text into the shapes list
Shapeinsert(const DText text)Inserts a micrometer-unit text into the shapes list
Shapeinsert(const SimplePolygon simple_polygon)Inserts a simple polygon into the shapes list
Shapeinsert(const DSimplePolygon simple_polygon)Inserts a micrometer-unit simple polygon into the shapes list
Shapeinsert(const Polygon polygon)Inserts a polygon into the shapes list
Shapeinsert(const DPolygon polygon)Inserts a micrometer-unit polygon into the shapes list
Shapeinsert(const Box box,
unsigned long property_id)
Inserts a box with properties into the shapes list
Shapeinsert(const DBox box,
unsigned long property_id)
Inserts a micrometer-unit box with properties into the shapes list
Shapeinsert(const Path path,
unsigned long property_id)
Inserts a path with properties into the shapes list
Shapeinsert(const DPath path,
unsigned long property_id)
Inserts a micrometer-unit path with properties into the shapes list
Shapeinsert(const Edge edge,
unsigned long property_id)
Inserts an edge with properties into the shapes list
Shapeinsert(const DEdge edge,
unsigned long property_id)
Inserts a micrometer-unit edge with properties into the shapes list
Shapeinsert(const EdgePair edge_pair,
unsigned long property_id)
Inserts an edge pair with properties into the shapes list
Shapeinsert(const DEdgePair edge_pair,
unsigned long property_id)
Inserts a micrometer-unit edge pair with properties into the shapes list
Shapeinsert(const Text text,
unsigned long property_id)
Inserts a text with properties into the shapes list
Shapeinsert(const DText text,
unsigned long property_id)
Inserts a micrometer-unit text with properties into the shapes list
Shapeinsert(const SimplePolygon simple_polygon,
unsigned long property_id)
Inserts a simple polygon with properties into the shapes list
Shapeinsert(const DSimplePolygon simple_polygon,
unsigned long property_id)
Inserts a micrometer-unit simple polygon with properties into the shapes list
Shapeinsert(const Polygon polygon,
unsigned long property_id)
Inserts a polygon with properties into the shapes list
Shapeinsert(const DPolygon polygon,
unsigned long property_id)
Inserts a micrometer-unit polygon with properties into the shapes list
voidinsert_as_edges(const EdgePairs edge_pairs)Inserts the edge pairs from the edge pair collection as individual edges into this shape container
voidinsert_as_edges(const EdgePairs edge_pairs,
const ICplxTrans trans)
Inserts the edge pairs from the edge pair collection as individual into this shape container with a transformation
voidinsert_as_edges(const EdgePairs edge_pairs,
const DCplxTrans trans)
Inserts the edge pairs from the edge pair collection as individual into this shape container with a transformation (given in micrometer units)
voidinsert_as_polygons(const EdgePairs edge_pairs,
int e)
Inserts the edge pairs from the edge pair collection as polygons into this shape container
voidinsert_as_polygons(const EdgePairs edge_pairs,
double e)
Inserts the edge pairs from the edge pair collection as polygons into this shape container
voidinsert_as_polygons(const EdgePairs edge_pairs,
const ICplxTrans e,
int trans)
Inserts the edge pairs from the edge pair collection as polygons into this shape container with a transformation
voidinsert_as_polygons(const EdgePairs edge_pairs,
const DCplxTrans e,
double trans)
Inserts the edge pairs from the edge pair collection as polygons into this shape container with a transformation
[const]boolis_empty?Returns a value indicating whether the shapes container is empty
[const]boolis_valid?(const Shape shape)Tests if the given Shape object is still pointing to a valid object
Layout ptrlayoutGets the layout object the shape container belongs to
Shapereplace(const Shape shape,
const Box box)
Replaces the given shape with a box
Shapereplace(const Shape shape,
const DBox box)
Replaces the given shape with a box given in micrometer units
Shapereplace(const Shape shape,
const Path path)
Replaces the given shape with a path
Shapereplace(const Shape shape,
const DPath path)
Replaces the given shape with a path given in micrometer units
Shapereplace(const Shape shape,
const Edge edge)
Replaces the given shape with an edge object
Shapereplace(const Shape shape,
const DEdge edge)
Replaces the given shape with an edge given in micrometer units
Shapereplace(const Shape shape,
const EdgePair edge_pair)
Replaces the given shape with an edge pair object
Shapereplace(const Shape shape,
const DEdgePair edge_pair)
Replaces the given shape with an edge pair given in micrometer units
Shapereplace(const Shape shape,
const Point point)
Replaces the given shape with an point object
Shapereplace(const Shape shape,
const DPoint point)
Replaces the given shape with an point given in micrometer units
Shapereplace(const Shape shape,
const Text text)
Replaces the given shape with a text object
Shapereplace(const Shape shape,
const DText text)
Replaces the given shape with a text given in micrometer units
Shapereplace(const Shape shape,
const SimplePolygon simple_polygon)
Replaces the given shape with a simple polygon
Shapereplace(const Shape shape,
const DSimplePolygon simple_polygon)
Replaces the given shape with a simple polygon given in micrometer units
Shapereplace(const Shape shape,
const Polygon polygon)
Replaces the given shape with a polygon
Shapereplace(const Shape shape,
const DPolygon polygon)
Replaces the given shape with a polygon given in micrometer units
Shapereplace_prop_id(const Shape shape,
unsigned long property_id)
Replaces (or install) the properties of a shape
[const]unsigned longsizeGets the number of shapes in this container
voidtransform(const Trans trans)Transforms all shapes with the given transformation
voidtransform(const DTrans trans)Transforms all shapes with the given transformation (given in micrometer units)
voidtransform(const ICplxTrans trans)Transforms all shapes with the given complex integer transformation
voidtransform(const DCplxTrans trans)Transforms all shapes with the given transformation (given in micrometer units)
Shapetransform(const Shape shape,
const Trans trans)
Transforms the shape given by the reference with the given transformation
Shapetransform(const Shape shape,
const DTrans trans)
Transforms the shape given by the reference with the given transformation, where the transformation is given in micrometer units
Shapetransform(const Shape shape,
const ICplxTrans trans)
Transforms the shape given by the reference with the given complex integer space transformation
Shapetransform(const Shape shape,
const DCplxTrans trans)
Transforms the shape given by the reference with the given complex transformation, where the transformation is given in micrometer units

Public static methods and constants

unsigned intSAllIndicates that all shapes shall be retrieved
unsigned intSAllWithPropertiesIndicates that all shapes with properties shall be retrieved
unsigned intSBoxesIndicates that boxes shall be retrieved
unsigned intSEdgePairsIndicates that edge pairs shall be retrieved
unsigned intSEdgesIndicates that edges shall be retrieved
unsigned intSPathsIndicates that paths shall be retrieved
unsigned intSPointsIndicates that points shall be retrieved
unsigned intSPolygonsIndicates that polygons shall be retrieved
unsigned intSPropertiesIndicates that only shapes with properties shall be retrieved
unsigned intSRegionsIndicates that objects which can be polygonized shall be retrieved (paths, boxes, polygons etc.)
unsigned intSTextsIndicates that texts be retrieved
unsigned intSUserObjectsIndicates that user objects shall be retrieved

Deprecated methods (protected, public, static, non-static and constructors)

voidcreateUse of this method is deprecated. Use _create instead
voiddestroyUse of this method is deprecated. Use _destroy instead
[const]booldestroyed?Use of this method is deprecated. Use _destroyed? instead
Shapeinsert_box(const Box box)Use of this method is deprecated. Use insert instead
Shapeinsert_box_with_properties(const Box box,
unsigned long property_id)
Use of this method is deprecated. Use insert instead
Shapeinsert_edge(const Edge edge)Use of this method is deprecated. Use insert instead
Shapeinsert_edge_with_properties(const Edge edge,
unsigned long property_id)
Use of this method is deprecated. Use insert instead
Shapeinsert_path(const Path path)Use of this method is deprecated. Use insert instead
Shapeinsert_path_with_properties(const Path path,
unsigned long property_id)
Use of this method is deprecated. Use insert instead
Shapeinsert_point(const Point point)Use of this method is deprecated. Use insert instead
Shapeinsert_polygon(const Polygon polygon)Use of this method is deprecated. Use insert instead
Shapeinsert_polygon_with_properties(const Polygon polygon,
unsigned long property_id)
Use of this method is deprecated. Use insert instead
Shapeinsert_simple_polygon(const SimplePolygon simple_polygon)Use of this method is deprecated. Use insert instead
Shapeinsert_simple_polygon_with_properties(const SimplePolygon simple_polygon,
unsigned long property_id)
Use of this method is deprecated. Use insert instead
Shapeinsert_text(const Text text)Use of this method is deprecated. Use insert instead
Shapeinsert_text_with_properties(const Text text,
unsigned long property_id)
Use of this method is deprecated. Use insert instead
[const]boolis_const_object?Use of this method is deprecated. Use _is_const_object? instead
[static]unsigned ints_allUse of this method is deprecated. Use SAll instead
[static]unsigned ints_all_with_propertiesUse of this method is deprecated. Use SAllWithProperties instead
[static]unsigned ints_boxesUse of this method is deprecated. Use SBoxes instead
[static]unsigned ints_edge_pairsUse of this method is deprecated. Use SEdgePairs instead
[static]unsigned ints_edgesUse of this method is deprecated. Use SEdges instead
[static]unsigned ints_pathsUse of this method is deprecated. Use SPaths instead
[static]unsigned ints_pointsUse of this method is deprecated. Use SPoints instead
[static]unsigned ints_polygonsUse of this method is deprecated. Use SPolygons instead
[static]unsigned ints_propertiesUse of this method is deprecated. Use SProperties instead
[static]unsigned ints_regionsUse of this method is deprecated. Use SRegions instead
[static]unsigned ints_textsUse of this method is deprecated. Use STexts instead
[static]unsigned ints_user_objectsUse of this method is deprecated. Use SUserObjects instead

Detailed description

SAll

Signature: [static] unsigned int SAll

Description: Indicates that all shapes shall be retrieved

You can use this constant to construct 'except' classes - e.g. to specify 'all shape types except boxes' use

 SAll - SBoxes 

Python specific notes:
The object exposes a readable attribute 'SAll'. This is the getter.

SAllWithProperties

Signature: [static] unsigned int SAllWithProperties

Description: Indicates that all shapes with properties shall be retrieved

Using this selector means to retrieve only shapes with properties.You can use this constant to construct 'except' classes - e.g. to specify 'all shape types with properties except boxes' use

 SAllWithProperties - SBoxes 

Python specific notes:
The object exposes a readable attribute 'SAllWithProperties'. This is the getter.

SBoxes

Signature: [static] unsigned int SBoxes

Description: Indicates that boxes shall be retrieved

Python specific notes:
The object exposes a readable attribute 'SBoxes'. This is the getter.

SEdgePairs

Signature: [static] unsigned int SEdgePairs

Description: Indicates that edge pairs shall be retrieved

Python specific notes:
The object exposes a readable attribute 'SEdgePairs'. This is the getter.

SEdges

Signature: [static] unsigned int SEdges

Description: Indicates that edges shall be retrieved

Python specific notes:
The object exposes a readable attribute 'SEdges'. This is the getter.

SPaths

Signature: [static] unsigned int SPaths

Description: Indicates that paths shall be retrieved

Python specific notes:
The object exposes a readable attribute 'SPaths'. This is the getter.

SPoints

Signature: [static] unsigned int SPoints

Description: Indicates that points shall be retrieved

This constant has been added in version 0.28.

Python specific notes:
The object exposes a readable attribute 'SPoints'. This is the getter.

SPolygons

Signature: [static] unsigned int SPolygons

Description: Indicates that polygons shall be retrieved

Python specific notes:
The object exposes a readable attribute 'SPolygons'. This is the getter.

SProperties

Signature: [static] unsigned int SProperties

Description: Indicates that only shapes with properties shall be retrieved

You can or-combine this flag with the plain shape types to select a certain shape type, but only those shapes with properties. For example to select boxes with properties, use 'SProperties | SBoxes'.

Python specific notes:
The object exposes a readable attribute 'SProperties'. This is the getter.

SRegions

Signature: [static] unsigned int SRegions

Description: Indicates that objects which can be polygonized shall be retrieved (paths, boxes, polygons etc.)

This constant has been added in version 0.27.

Python specific notes:
The object exposes a readable attribute 'SRegions'. This is the getter.

STexts

Signature: [static] unsigned int STexts

Description: Indicates that texts be retrieved

Python specific notes:
The object exposes a readable attribute 'STexts'. This is the getter.

SUserObjects

Signature: [static] unsigned int SUserObjects

Description: Indicates that user objects shall be retrieved

Python specific notes:
The object exposes a readable attribute 'SUserObjects'. This is the getter.

_const_cast

Signature: [const] Shapes ptr _const_cast

Description: Returns a non-const reference to self.

Basically, this method allows turning a const object reference to a non-const one. This method is provided as last resort to remove the constness from an object. Usually there is a good reason for a const object reference, so using this method may have undesired side effects.

This method has been introduced in version 0.29.6.

_create

Signature: void _create

Description: 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.

_destroy

Signature: void _destroy

Description: Explicitly destroys the object

Explicitly destroys the object on C++ side if it was owned by the script interpreter. Subsequent access to this object will throw an exception. If the object is not owned by the script, this method will do nothing.

_destroyed?

Signature: [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.

_is_const_object?

Signature: [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.

_manage

Signature: void _manage

Description: Marks the object as managed by the script side.

After calling this method on an object, the script side will be responsible for the management of the object. This method may be called if an object is returned from a C++ function and the object is known not to be owned by any C++ instance. If necessary, the script side may delete the object if the script's reference is no longer required.

Usually it's not required to call this method. It has been introduced in version 0.24.

_unmanage

Signature: void _unmanage

Description: Marks the object as no longer owned by the script side.

Calling this method will make this object no longer owned by the script's memory management. Instead, the object must be managed in some other way. Usually this method may be called if it is known that some C++ object holds and manages this object. Technically speaking, this method will turn the script's reference into a weak reference. After the script engine decides to delete the reference, the object itself will still exist. If the object is not managed otherwise, memory leaks will occur.

Usually it's not required to call this method. It has been introduced in version 0.24.

assign

Signature: void assign (const Shapes other)

Description: Assigns another object to self

break_polygons

Signature: void break_polygons (unsigned long max_vertex_count, double max_area_ratio = 0)

Description: Breaks the polygons of the shape container into smaller ones

There are two criteria for splitting a polygon: a polygon is split into parts with less then 'max_vertex_count' points and an bounding box-to-polygon area ratio less than 'max_area_ratio'. The area ratio is supposed to render polygons whose bounding box is a better approximation. This applies for example to 'L' shape polygons.

Using a value of 0 for either limit means that the respective limit isn't checked. Breaking happens by cutting the polygons into parts at 'good' locations. The algorithm does not have a specific goal to minimize the number of parts for example. The only goal is to achieve parts within the given limits.

Breaking also applies to paths if their polygon representation satisfies the breaking criterion. In that case, paths are converted to polygons and broken into smaller parts.

This method has been introduced in version 0.29.5.

cell

Signature: [const] Cell ptr cell

Description: Gets the cell the shape container belongs to

This method returns nil if the shape container does not belong to a cell.

This method has been added in version 0.28.

clear

(1) Signature: void clear

Description: Clears the shape container

This method has been introduced in version 0.16.

(2) Signature: void clear (unsigned int flags)

Description: Clears certain shape types from the shape container

Only shapes matching the shape types from 'flags' are removed. 'flags' is a combination of the S... constants.

This method has been introduced in version 0.28.9.

create

Signature: void create

Description: Ensures the C++ object is created

Use of this method is deprecated. Use _create instead

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.

destroy

Signature: void destroy

Description: Explicitly destroys the object

Use of this method is deprecated. Use _destroy instead

Explicitly destroys the object on C++ side if it was owned by the script interpreter. Subsequent access to this object will throw an exception. If the object is not owned by the script, this method will do nothing.

destroyed?

Signature: [const] bool destroyed?

Description: Returns a value indicating whether the object was already destroyed

Use of this method is deprecated. Use _destroyed? instead

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.

dup

Signature: [const] new Shapes ptr dup

Description: Creates a copy of self

Python specific notes:
This method also implements '__copy__' and '__deepcopy__'.

each

(1) Signature: [const,iter] Shape each (unsigned int flags)

Description: Gets all shapes

flags:An "or"-ed combination of the S... constants

(2) Signature: [const,iter] Shape each

Description: Gets all shapes

This call is equivalent to each(SAll). This convenience method has been introduced in version 0.16

Python specific notes:
This method enables iteration of the object.

each_overlapping

(1) Signature: [const,iter] Shape each_overlapping (unsigned int flags, const Box region)

Description: Gets all shapes that overlap the search box (region)

flags:An "or"-ed combination of the S... constants
region:The rectangular search region

This method was introduced in version 0.16

(2) Signature: [const,iter] Shape each_overlapping (unsigned int flags, const DBox region)

Description: Gets all shapes that overlap the search box (region) where the search box is given in micrometer units

flags:An "or"-ed combination of the S... constants
region:The rectangular search region as a DBox object in micrometer units

This method was introduced in version 0.25

(3) Signature: [const,iter] Shape each_overlapping (const Box region)

Description: Gets all shapes that overlap the search box (region)

region:The rectangular search region

This call is equivalent to each_overlapping(SAll,region). This convenience method has been introduced in version 0.16

(4) Signature: [const,iter] Shape each_overlapping (const DBox region)

Description: Gets all shapes that overlap the search box (region) where the search box is given in micrometer units

region:The rectangular search region as a DBox object in micrometer units

This call is equivalent to each_touching(SAll,region).

This method was introduced in version 0.25

each_touching

(1) Signature: [const,iter] Shape each_touching (unsigned int flags, const Box region)

Description: Gets all shapes that touch the search box (region)

flags:An "or"-ed combination of the S... constants
region:The rectangular search region

This method was introduced in version 0.16

(2) Signature: [const,iter] Shape each_touching (unsigned int flags, const DBox region)

Description: Gets all shapes that touch the search box (region) where the search box is given in micrometer units

flags:An "or"-ed combination of the S... constants
region:The rectangular search region as a DBox object in micrometer units

This method was introduced in version 0.25

(3) Signature: [const,iter] Shape each_touching (const Box region)

Description: Gets all shapes that touch the search box (region)

region:The rectangular search region

This call is equivalent to each_touching(SAll,region). This convenience method has been introduced in version 0.16

(4) Signature: [const,iter] Shape each_touching (const DBox region)

Description: Gets all shapes that touch the search box (region) where the search box is given in micrometer units

region:The rectangular search region as a DBox object in micrometer units

This call is equivalent to each_touching(SAll,region).

This method was introduced in version 0.25

erase

Signature: void erase (const Shape shape)

Description: Erases the shape pointed to by the given Shape object

shape:The shape which to destroy

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.

find

Signature: [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.

insert

(1) Signature: Shape insert (const Shape shape)

Description: Inserts a shape from a shape reference into the shapes list

Returns:A reference (a Shape object) to the newly created shape

This method has been introduced in version 0.16.

(2) Signature: Shape insert (const Shape shape, const Trans trans)

Description: Inserts a shape from a shape reference into the shapes list with a transformation

shape:The shape to insert
trans:The transformation to apply before the shape is inserted
Returns:A reference (a Shape object) to the newly created shape

This method has been introduced in version 0.22.

(3) Signature: Shape insert (const Shape shape, const DTrans trans)

Description: Inserts a shape from a shape reference into the shapes list with a transformation (given in micrometer units)

shape:The shape to insert
trans:The transformation to apply before the shape is inserted (displacement in micrometers)
Returns:A reference (a Shape object) to the newly created shape

This method has been introduced in version 0.25.

(4) Signature: Shape insert (const Shape shape, const ICplxTrans trans)

Description: Inserts a shape from a shape reference into the shapes list with a complex integer transformation

shape:The shape to insert
trans:The transformation to apply before the shape is inserted
Returns:A reference (a Shape object) to the newly created shape

This method has been introduced in version 0.22.

(5) Signature: Shape insert (const Shape shape, const DCplxTrans trans)

Description: Inserts a shape from a shape reference into the shapes list with a complex integer transformation (given in micrometer units)

shape:The shape to insert
trans:The transformation to apply before the shape is inserted (displacement in micrometer units)
Returns:A reference (a Shape object) to the newly created shape

This method has been introduced in version 0.25.

(6) Signature: void insert (const RecursiveShapeIterator iter)

Description: Inserts the shapes taken from a recursive shape iterator

iter:The iterator from which to take the shapes from

This method iterates over all shapes from the iterator and inserts them into the container.

This method has been introduced in version 0.25.3.

(7) Signature: void insert (const RecursiveShapeIterator iter, const ICplxTrans trans)

Description: Inserts the shapes taken from a recursive shape iterator with a transformation

iter:The iterator from which to take the shapes from
trans:The transformation to apply

This method iterates over all shapes from the iterator and inserts them into the container. The given transformation is applied before the shapes are inserted.

This method has been introduced in version 0.25.3.

(8) Signature: void insert (const Shapes shapes)

Description: Inserts the shapes taken from another shape container

shapes:The other container from which to take the shapes from

This method takes all shapes from the given container and inserts them into this one.

This method has been introduced in version 0.25.3.

(9) Signature: void insert (const Shapes shapes, const ICplxTrans trans)

Description: Inserts the shapes taken from another shape container with a transformation

shapes:The other container from which to take the shapes from
trans:The transformation to apply

This method takes all shapes from the given container and inserts them into this one after applying the given transformation.

This method has been introduced in version 0.25.3.

(10) Signature: void insert (const Shapes shapes, unsigned int flags)

Description: Inserts the shapes taken from another shape container

shapes:The other container from which to take the shapes from
flags:The filter flags for taking the shapes from the input container (see S... constants)

This method takes all selected shapes from the given container and inserts them into this one.

This method has been introduced in version 0.25.3.

(11) Signature: void insert (const Shapes shapes, unsigned int flags, const ICplxTrans trans)

Description: Inserts the shapes taken from another shape container with a transformation

shapes:The other container from which to take the shapes from
flags:The filter flags for taking the shapes from the input container (see S... constants)
trans:The transformation to apply

This method takes all selected shapes from the given container and inserts them into this one after applying the given transformation.

This method has been introduced in version 0.25.3.

(12) Signature: void insert (const Region region)

Description: Inserts the polygons from the region into this shape container

region:The region to insert

This method inserts all polygons from the region into this shape container.

This method has been introduced in version 0.23.

(13) Signature: void insert (const Region region, const ICplxTrans trans)

Description: Inserts the polygons from the region into this shape container with a transformation

region:The region to insert
trans:The transformation to apply

This method inserts all polygons from the region into this shape container. Before a polygon is inserted, the given transformation is applied.

This method has been introduced in version 0.23.

(14) Signature: void insert (const Region region, const DCplxTrans trans)

Description: Inserts the polygons from the region into this shape container with a transformation (given in micrometer units)

region:The region to insert
trans:The transformation to apply (displacement in micrometer units)

This method inserts all polygons from the region into this shape container. Before a polygon is inserted, the given transformation is applied.

This method has been introduced in version 0.25.

(15) Signature: void insert (const Edges edges)

Description: Inserts the edges from the edge collection into this shape container

edges:The edges to insert

This method inserts all edges from the edge collection into this shape container.

This method has been introduced in version 0.23.

(16) Signature: void insert (const Edges edges, const ICplxTrans trans)

Description: Inserts the edges from the edge collection into this shape container with a transformation

edges:The edges to insert
trans:The transformation to apply

This method inserts all edges from the edge collection into this shape container. Before an edge is inserted, the given transformation is applied.

This method has been introduced in version 0.23.

(17) Signature: void insert (const Edges edges, const DCplxTrans trans)

Description: Inserts the edges from the edge collection into this shape container with a transformation (given in micrometer units)

edges:The edges to insert
trans:The transformation to apply (displacement in micrometer units)

This method inserts all edges from the edge collection into this shape container. Before an edge is inserted, the given transformation is applied.

This method has been introduced in version 0.25.

(18) Signature: void insert (const EdgePairs edge_pairs)

Description: Inserts the edges from the edge pair collection into this shape container

edges:The edge pairs to insert

This method inserts all edge pairs from the edge pair collection into this shape container.

This method has been introduced in version 0.26.

(19) Signature: void insert (const EdgePairs edge_pairs, const ICplxTrans trans)

Description: Inserts the edge pairs from the edge pair collection into this shape container with a transformation

edges:The edge pairs to insert
trans:The transformation to apply

This method inserts all edge pairs from the edge pair collection into this shape container. Before an edge pair is inserted, the given transformation is applied.

This method has been introduced in version 0.26.

(20) Signature: void insert (const EdgePairs edge_pairs, const DCplxTrans trans)

Description: Inserts the edge pairs from the edge pair collection into this shape container with a transformation (given in micrometer units)

edges:The edge pairs to insert
trans:The transformation to apply (displacement in micrometer units)

This method inserts all edge pairs from the edge pair collection into this shape container. Before an edge pair is inserted, the given transformation is applied.

This method has been introduced in version 0.26.

(21) Signature: void insert (const Texts texts)

Description: Inserts the texts from the text collection into this shape container

texts:The texts to insert

This method inserts all texts from the text collection into this shape container.

This method has been introduced in version 0.27.

(22) Signature: void insert (const Texts texts, const ICplxTrans trans)

Description: Inserts the texts from the text collection into this shape container with a transformation

edges:The texts to insert
trans:The transformation to apply

This method inserts all texts from the text collection into this shape container. Before an text is inserted, the given transformation is applied.

This method has been introduced in version 0.27.

(23) Signature: void insert (const Texts texts, const DCplxTrans trans)

Description: Inserts the texts from the text collection into this shape container with a transformation (given in micrometer units)

edges:The text to insert
trans:The transformation to apply (displacement in micrometer units)

This method inserts all texts from the text collection into this shape container. Before an text is inserted, the given transformation is applied.

This method has been introduced in version 0.27.

(24) Signature: Shape insert (const Box box)

Description: Inserts a box into the shapes list

Returns:A reference to the new shape (a Shape object)

Starting with version 0.16, this method returns a reference to the newly created shape

(25) Signature: Shape insert (const DBox box)

Description: Inserts a micrometer-unit box into the shapes list

Returns:A reference to the new shape (a Shape object)

This method behaves like the insert version with a Box argument, except that it will internally translate the box from micrometer to database units.

This variant has been introduced in version 0.25.

(26) Signature: Shape insert (const Path path)

Description: Inserts a path into the shapes list

Returns:A reference to the new shape (a Shape object)

Starting with version 0.16, this method returns a reference to the newly created shape

(27) Signature: Shape insert (const DPath path)

Description: Inserts a micrometer-unit path into the shapes list

Returns:A reference to the new shape (a Shape object)

This method behaves like the insert version with a Path argument, except that it will internally translate the path from micrometer to database units.

This variant has been introduced in version 0.25.

(28) Signature: Shape insert (const Edge edge)

Description: Inserts an edge into the shapes list

Starting with version 0.16, this method returns a reference to the newly created shape

(29) Signature: Shape insert (const DEdge edge)

Description: Inserts a micrometer-unit edge into the shapes list

Returns:A reference to the new shape (a Shape object)

This method behaves like the insert version with a Edge argument, except that it will internally translate the edge from micrometer to database units.

This variant has been introduced in version 0.25.

(30) Signature: Shape insert (const EdgePair edge_pair)

Description: Inserts an edge pair into the shapes list

This method has been introduced in version 0.26.

(31) Signature: Shape insert (const DEdgePair edge_pair)

Description: Inserts a micrometer-unit edge pair into the shapes list

Returns:A reference to the new shape (a Shape object)

This method behaves like the insert version with a EdgePair argument, except that it will internally translate the edge pair from micrometer to database units.

This variant has been introduced in version 0.26.

(32) Signature: Shape insert (const Point point)

Description: Inserts an point into the shapes list

This variant has been introduced in version 0.28.

(33) Signature: Shape insert (const DPoint point)

Description: Inserts a micrometer-unit point into the shapes list

Returns:A reference to the new shape (a Shape object)

This method behaves like the insert version with a Point argument, except that it will internally translate the point from micrometer to database units.

This variant has been introduced in version 0.28.

(34) Signature: Shape insert (const Text text)

Description: Inserts a text into the shapes list

Returns:A reference to the new shape (a Shape object)

Starting with version 0.16, this method returns a reference to the newly created shape

(35) Signature: Shape insert (const DText text)

Description: Inserts a micrometer-unit text into the shapes list

Returns:A reference to the new shape (a Shape object)

This method behaves like the insert version with a Text argument, except that it will internally translate the text from micrometer to database units.

This variant has been introduced in version 0.25.

(36) Signature: Shape insert (const SimplePolygon simple_polygon)

Description: Inserts a simple polygon into the shapes list

Returns:A reference to the new shape (a Shape object)

Starting with version 0.16, this method returns a reference to the newly created shape

(37) Signature: Shape insert (const DSimplePolygon simple_polygon)

Description: Inserts a micrometer-unit simple polygon into the shapes list

Returns:A reference to the new shape (a Shape object)

This method behaves like the insert version with a SimplePolygon argument, except that it will internally translate the polygon from micrometer to database units.

This variant has been introduced in version 0.25.

(38) Signature: Shape insert (const Polygon polygon)

Description: Inserts a polygon into the shapes list

Returns:A reference to the new shape (a Shape object)

Starting with version 0.16, this method returns a reference to the newly created shape

(39) Signature: Shape insert (const DPolygon polygon)

Description: Inserts a micrometer-unit polygon into the shapes list

Returns:A reference to the new shape (a Shape object)

This method behaves like the insert version with a Polygon argument, except that it will internally translate the polygon from micrometer to database units.

This variant has been introduced in version 0.25.

(40) Signature: Shape insert (const Box box, unsigned long property_id)

Description: Inserts a box with properties into the shapes list

Returns:A reference to the new shape (a Shape object)

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

(41) Signature: Shape insert (const DBox box, unsigned long property_id)

Description: Inserts a micrometer-unit box with properties into the shapes list

Returns:A reference to the new shape (a Shape object)

This method behaves like the insert version with a Box argument and a property ID, except that it will internally translate the box from micrometer to database units.

This variant has been introduced in version 0.25.

(42) Signature: Shape insert (const Path path, unsigned long property_id)

Description: Inserts a path with properties into the shapes list

Returns:A reference to the new shape (a Shape object)

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

(43) Signature: Shape insert (const DPath path, unsigned long property_id)

Description: Inserts a micrometer-unit path with properties into the shapes list

Returns:A reference to the new shape (a Shape object)

This method behaves like the insert version with a Path argument and a property ID, except that it will internally translate the path from micrometer to database units.

This variant has been introduced in version 0.25.

(44) Signature: Shape insert (const Edge edge, unsigned long property_id)

Description: Inserts an edge with properties into the shapes list

Returns:A reference to the new shape (a Shape object)

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.

(45) Signature: Shape insert (const DEdge edge, unsigned long property_id)

Description: Inserts a micrometer-unit edge with properties into the shapes list

Returns:A reference to the new shape (a Shape object)

This method behaves like the insert version with a Edge argument and a property ID, except that it will internally translate the edge from micrometer to database units.

This variant has been introduced in version 0.25.

(46) Signature: Shape insert (const EdgePair edge_pair, unsigned long property_id)

Description: Inserts an edge pair with properties into the shapes list

Returns:A reference to the new shape (a Shape object)

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 has been introduced in version 0.26.

(47) Signature: Shape insert (const DEdgePair edge_pair, unsigned long property_id)

Description: Inserts a micrometer-unit edge pair with properties into the shapes list

Returns:A reference to the new shape (a Shape object)

This method behaves like the insert version with a EdgePair argument and a property ID, except that it will internally translate the edge pair from micrometer to database units.

This variant has been introduced in version 0.26.

(48) Signature: Shape insert (const Text text, unsigned long property_id)

Description: Inserts a text with properties into the shapes list

Returns:A reference to the new shape (a Shape object)

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

(49) Signature: Shape insert (const DText text, unsigned long property_id)

Description: Inserts a micrometer-unit text with properties into the shapes list

Returns:A reference to the new shape (a Shape object)

This method behaves like the insert version with a Text argument and a property ID, except that it will internally translate the text from micrometer to database units.

This variant has been introduced in version 0.25.

(50) Signature: Shape insert (const SimplePolygon simple_polygon, unsigned long property_id)

Description: Inserts a simple polygon with properties into the shapes list

Returns:A reference to the new shape (a Shape object)

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

(51) Signature: Shape insert (const DSimplePolygon simple_polygon, unsigned long property_id)

Description: Inserts a micrometer-unit simple polygon with properties into the shapes list

Returns:A reference to the new shape (a Shape object)

This method behaves like the insert version with a SimplePolygon argument and a property ID, except that it will internally translate the simple polygon from micrometer to database units.

This variant has been introduced in version 0.25.

(52) Signature: Shape insert (const Polygon polygon, unsigned long property_id)

Description: Inserts a polygon with properties into the shapes list

Returns:A reference to the new shape (a Shape object)

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

(53) Signature: Shape insert (const DPolygon polygon, unsigned long property_id)

Description: Inserts a micrometer-unit polygon with properties into the shapes list

Returns:A reference to the new shape (a Shape object)

This method behaves like the insert version with a Polygon argument and a property ID, except that it will internally translate the polygon from micrometer to database units.

This variant has been introduced in version 0.25.

insert_as_edges

(1) Signature: void insert_as_edges (const EdgePairs edge_pairs)

Description: Inserts the edge pairs from the edge pair collection as individual edges into this shape container

edge_pairs:The edge pairs to insert

This method inserts all edge pairs from the edge pair collection into this shape container. Each edge from the edge pair is inserted individually into the shape container.

This method has been introduced in version 0.23.

(2) Signature: void insert_as_edges (const EdgePairs edge_pairs, const ICplxTrans trans)

Description: Inserts the edge pairs from the edge pair collection as individual into this shape container with a transformation

edges:The edge pairs to insert
trans:The transformation to apply

This method inserts all edge pairs from the edge pair collection into this shape container. Each edge from the edge pair is inserted individually into the shape container. Before each edge is inserted into the shape collection, the given transformation is applied.

This method has been introduced in version 0.23.

(3) Signature: void insert_as_edges (const EdgePairs edge_pairs, const DCplxTrans trans)

Description: Inserts the edge pairs from the edge pair collection as individual into this shape container with a transformation (given in micrometer units)

edges:The edge pairs to insert
trans:The transformation to apply (displacement in micrometer units)

This method inserts all edge pairs from the edge pair collection into this shape container. Each edge from the edge pair is inserted individually into the shape container. Before each edge is inserted into the shape collection, the given transformation is applied.

This method has been introduced in version 0.25.

insert_as_polygons

(1) Signature: void insert_as_polygons (const EdgePairs edge_pairs, int e)

Description: Inserts the edge pairs from the edge pair collection as polygons into this shape container

edge_pairs:The edge pairs to insert
e:The extension to apply when converting the edges to polygons (in database units)

This method inserts all edge pairs from the edge pair collection into this shape container. The edge pairs are converted to polygons covering the area between the edges. The extension parameter specifies a sizing which is applied when converting the edge pairs to polygons. This way, degenerated edge pairs (i.e. two point-like edges) do not vanish.

This method has been introduced in version 0.23.

(2) Signature: void insert_as_polygons (const EdgePairs edge_pairs, double e)

Description: Inserts the edge pairs from the edge pair collection as polygons into this shape container

edge_pairs:The edge pairs to insert
e:The extension to apply when converting the edges to polygons (in micrometer units)

This method is identical to the version with a integer-type e parameter, but for this version the e parameter is given in micrometer units.

This method has been introduced in version 0.25.

(3) Signature: void insert_as_polygons (const EdgePairs edge_pairs, const ICplxTrans e, int trans)

Description: Inserts the edge pairs from the edge pair collection as polygons into this shape container with a transformation

edges:The edge pairs to insert
e:The extension to apply when converting the edges to polygons (in database units)
trans:The transformation to apply

This method inserts all edge pairs from the edge pair collection into this shape container. The edge pairs are converted to polygons covering the area between the edges. The extension parameter specifies a sizing which is applied when converting the edge pairs to polygons. This way, degenerated edge pairs (i.e. two point-like edges) do not vanish. Before a polygon is inserted into the shape collection, the given transformation is applied.

This method has been introduced in version 0.23.

(4) Signature: void insert_as_polygons (const EdgePairs edge_pairs, const DCplxTrans e, double trans)

Description: Inserts the edge pairs from the edge pair collection as polygons into this shape container with a transformation

edges:The edge pairs to insert
e:The extension to apply when converting the edges to polygons (in micrometer units)
trans:The transformation to apply (displacement in micrometer units)

This method is identical to the version with a integer-type e and trans parameter, but for this version the e parameter is given in micrometer units and the trans parameter is a micrometer-unit transformation.

This method has been introduced in version 0.25.

insert_box

Signature: Shape insert_box (const Box box)

Description: Inserts a box into the shapes list

Returns:A reference to the new shape (a Shape object)

Use of this method is deprecated. Use insert instead

Starting with version 0.16, this method returns a reference to the newly created shape

insert_box_with_properties

Signature: Shape insert_box_with_properties (const Box box, unsigned long property_id)

Description: Inserts a box with properties into the shapes list

Returns:A reference to the new shape (a Shape object)

Use of this method is deprecated. Use insert instead

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

insert_edge

Signature: Shape insert_edge (const Edge edge)

Description: Inserts an edge into the shapes list

Use of this method is deprecated. Use insert instead

Starting with version 0.16, this method returns a reference to the newly created shape

insert_edge_with_properties

Signature: Shape insert_edge_with_properties (const Edge edge, unsigned long property_id)

Description: Inserts an edge with properties into the shapes list

Returns:A reference to the new shape (a Shape object)

Use of this method is deprecated. Use insert instead

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.

insert_path

Signature: Shape insert_path (const Path path)

Description: Inserts a path into the shapes list

Returns:A reference to the new shape (a Shape object)

Use of this method is deprecated. Use insert instead

Starting with version 0.16, this method returns a reference to the newly created shape

insert_path_with_properties

Signature: Shape insert_path_with_properties (const Path path, unsigned long property_id)

Description: Inserts a path with properties into the shapes list

Returns:A reference to the new shape (a Shape object)

Use of this method is deprecated. Use insert instead

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

insert_point

Signature: Shape insert_point (const Point point)

Description: Inserts an point into the shapes list

Use of this method is deprecated. Use insert instead

This variant has been introduced in version 0.28.

insert_polygon

Signature: Shape insert_polygon (const Polygon polygon)

Description: Inserts a polygon into the shapes list

Returns:A reference to the new shape (a Shape object)

Use of this method is deprecated. Use insert instead

Starting with version 0.16, this method returns a reference to the newly created shape

insert_polygon_with_properties

Signature: Shape insert_polygon_with_properties (const Polygon polygon, unsigned long property_id)

Description: Inserts a polygon with properties into the shapes list

Returns:A reference to the new shape (a Shape object)

Use of this method is deprecated. Use insert instead

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

insert_simple_polygon

Signature: Shape insert_simple_polygon (const SimplePolygon simple_polygon)

Description: Inserts a simple polygon into the shapes list

Returns:A reference to the new shape (a Shape object)

Use of this method is deprecated. Use insert instead

Starting with version 0.16, this method returns a reference to the newly created shape

insert_simple_polygon_with_properties

Signature: Shape insert_simple_polygon_with_properties (const SimplePolygon simple_polygon, unsigned long property_id)

Description: Inserts a simple polygon with properties into the shapes list

Returns:A reference to the new shape (a Shape object)

Use of this method is deprecated. Use insert instead

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

insert_text

Signature: Shape insert_text (const Text text)

Description: Inserts a text into the shapes list

Returns:A reference to the new shape (a Shape object)

Use of this method is deprecated. Use insert instead

Starting with version 0.16, this method returns a reference to the newly created shape

insert_text_with_properties

Signature: Shape insert_text_with_properties (const Text text, unsigned long property_id)

Description: Inserts a text with properties into the shapes list

Returns:A reference to the new shape (a Shape object)

Use of this method is deprecated. Use insert instead

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

is_const_object?

Signature: [const] bool is_const_object?

Description: Returns a value indicating whether the reference is a const reference

Use of this method is deprecated. Use _is_const_object? instead

This method returns true, if self is a const reference. In that case, only const methods may be called on self.

is_empty?

Signature: [const] bool is_empty?

Description: Returns a value indicating whether the shapes container is empty

This method has been introduced in version 0.20.

is_valid?

Signature: [const] bool is_valid? (const Shape shape)

Description: Tests 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.

layout

Signature: Layout ptr layout

Description: Gets the layout object the shape container belongs to

This method returns nil if the shape container does not belong to a layout.

This method has been added in version 0.28.

new

Signature: [static] new Shapes ptr new

Description: Creates a new object of this class

Python specific notes:
This method is the default initializer of the object.

replace

(1) Signature: Shape replace (const Shape shape, const Box box)

Description: Replaces the given shape with a box

Returns:A reference to the new shape (a Shape 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.

(2) Signature: Shape replace (const Shape shape, const DBox box)

Description: Replaces the given shape with a box given in micrometer units

Returns:A reference to the new shape (a Shape object)

This method behaves like the replace version with a Box argument, except that it will internally translate the box from micrometer to database units.

This variant has been introduced in version 0.25.

(3) Signature: Shape replace (const Shape shape, const Path path)

Description: Replaces the given shape with a path

Returns:A reference to the new shape (a Shape 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.

(4) Signature: Shape replace (const Shape shape, const DPath path)

Description: Replaces the given shape with a path given in micrometer units

Returns:A reference to the new shape (a Shape object)

This method behaves like the replace version with a Path argument, except that it will internally translate the path from micrometer to database units.

This variant has been introduced in version 0.25.

(5) Signature: Shape replace (const Shape shape, const Edge edge)

Description: Replaces 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.

(6) Signature: Shape replace (const Shape shape, const DEdge edge)

Description: Replaces the given shape with an edge given in micrometer units

Returns:A reference to the new shape (a Shape object)

This method behaves like the replace version with an Edge argument, except that it will internally translate the edge from micrometer to database units.

This variant has been introduced in version 0.25.

(7) Signature: Shape replace (const Shape shape, const EdgePair edge_pair)

Description: Replaces the given shape with an edge pair object

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.

This method has been introduced in version 0.26.

(8) Signature: Shape replace (const Shape shape, const DEdgePair edge_pair)

Description: Replaces the given shape with an edge pair given in micrometer units

Returns:A reference to the new shape (a Shape object)

This method behaves like the replace version with an EdgePair argument, except that it will internally translate the edge pair from micrometer to database units.

This variant has been introduced in version 0.26.

(9) Signature: Shape replace (const Shape shape, const Point point)

Description: Replaces the given shape with an point object

This method 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 variant has been introduced in version 0.28.

(10) Signature: Shape replace (const Shape shape, const DPoint point)

Description: Replaces the given shape with an point given in micrometer units

Returns:A reference to the new shape (a Shape object)

This method behaves like the replace version with an Point argument, except that it will internally translate the point from micrometer to database units.

This variant has been introduced in version 0.28.

(11) Signature: Shape replace (const Shape shape, const Text text)

Description: Replaces the given shape with a text object

Returns:A reference to the new shape (a Shape 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.

(12) Signature: Shape replace (const Shape shape, const DText text)

Description: Replaces the given shape with a text given in micrometer units

Returns:A reference to the new shape (a Shape object)

This method behaves like the replace version with a Text argument, except that it will internally translate the text from micrometer to database units.

This variant has been introduced in version 0.25.

(13) Signature: Shape replace (const Shape shape, const SimplePolygon simple_polygon)

Description: Replaces the given shape with a simple polygon

Returns:A reference to the new shape (a Shape 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.

(14) Signature: Shape replace (const Shape shape, const DSimplePolygon simple_polygon)

Description: Replaces the given shape with a simple polygon given in micrometer units

Returns:A reference to the new shape (a Shape object)

This method behaves like the replace version with a SimplePolygon argument, except that it will internally translate the simple polygon from micrometer to database units.

This variant has been introduced in version 0.25.

(15) Signature: Shape replace (const Shape shape, const Polygon polygon)

Description: Replaces the given shape with a polygon

Returns:A reference to the new shape (a Shape 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.

(16) Signature: Shape replace (const Shape shape, const DPolygon polygon)

Description: Replaces the given shape with a polygon given in micrometer units

Returns:A reference to the new shape (a Shape object)

This method behaves like the replace version with a Polygon argument, except that it will internally translate the polygon from micrometer to database units.

This variant has been introduced in version 0.25.

replace_prop_id

Signature: Shape replace_prop_id (const Shape shape, unsigned long property_id)

Description: Replaces (or install) the properties of a shape

Returns:A Shape object representing the new 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.

s_all

Signature: [static] unsigned int s_all

Description: Indicates that all shapes shall be retrieved

Use of this method is deprecated. Use SAll instead

You can use this constant to construct 'except' classes - e.g. to specify 'all shape types except boxes' use

 SAll - SBoxes 

Python specific notes:
The object exposes a readable attribute 'SAll'. This is the getter.

s_all_with_properties

Signature: [static] unsigned int s_all_with_properties

Description: Indicates that all shapes with properties shall be retrieved

Use of this method is deprecated. Use SAllWithProperties instead

Using this selector means to retrieve only shapes with properties.You can use this constant to construct 'except' classes - e.g. to specify 'all shape types with properties except boxes' use

 SAllWithProperties - SBoxes 

Python specific notes:
The object exposes a readable attribute 'SAllWithProperties'. This is the getter.

s_boxes

Signature: [static] unsigned int s_boxes

Description: Indicates that boxes shall be retrieved

Use of this method is deprecated. Use SBoxes instead

Python specific notes:
The object exposes a readable attribute 'SBoxes'. This is the getter.

s_edge_pairs

Signature: [static] unsigned int s_edge_pairs

Description: Indicates that edge pairs shall be retrieved

Use of this method is deprecated. Use SEdgePairs instead

Python specific notes:
The object exposes a readable attribute 'SEdgePairs'. This is the getter.

s_edges

Signature: [static] unsigned int s_edges

Description: Indicates that edges shall be retrieved

Use of this method is deprecated. Use SEdges instead

Python specific notes:
The object exposes a readable attribute 'SEdges'. This is the getter.

s_paths

Signature: [static] unsigned int s_paths

Description: Indicates that paths shall be retrieved

Use of this method is deprecated. Use SPaths instead

Python specific notes:
The object exposes a readable attribute 'SPaths'. This is the getter.

s_points

Signature: [static] unsigned int s_points

Description: Indicates that points shall be retrieved

Use of this method is deprecated. Use SPoints instead

This constant has been added in version 0.28.

Python specific notes:
The object exposes a readable attribute 'SPoints'. This is the getter.

s_polygons

Signature: [static] unsigned int s_polygons

Description: Indicates that polygons shall be retrieved

Use of this method is deprecated. Use SPolygons instead

Python specific notes:
The object exposes a readable attribute 'SPolygons'. This is the getter.

s_properties

Signature: [static] unsigned int s_properties

Description: Indicates that only shapes with properties shall be retrieved

Use of this method is deprecated. Use SProperties instead

You can or-combine this flag with the plain shape types to select a certain shape type, but only those shapes with properties. For example to select boxes with properties, use 'SProperties | SBoxes'.

Python specific notes:
The object exposes a readable attribute 'SProperties'. This is the getter.

s_regions

Signature: [static] unsigned int s_regions

Description: Indicates that objects which can be polygonized shall be retrieved (paths, boxes, polygons etc.)

Use of this method is deprecated. Use SRegions instead

This constant has been added in version 0.27.

Python specific notes:
The object exposes a readable attribute 'SRegions'. This is the getter.

s_texts

Signature: [static] unsigned int s_texts

Description: Indicates that texts be retrieved

Use of this method is deprecated. Use STexts instead

Python specific notes:
The object exposes a readable attribute 'STexts'. This is the getter.

s_user_objects

Signature: [static] unsigned int s_user_objects

Description: Indicates that user objects shall be retrieved

Use of this method is deprecated. Use SUserObjects instead

Python specific notes:
The object exposes a readable attribute 'SUserObjects'. This is the getter.

size

Signature: [const] unsigned long size

Description: Gets the number of shapes in this container

Returns:The number of shapes in this container

This method was introduced in version 0.16

Python specific notes:
This method is also available as 'len(object)'.

transform

(1) Signature: void transform (const Trans trans)

Description: Transforms all shapes with the given transformation

This method will invalidate all references to shapes inside this collection.

It has been introduced in version 0.23.

(2) Signature: void transform (const DTrans trans)

Description: Transforms all shapes with the given transformation (given in micrometer units)

This method will invalidate all references to shapes inside this collection. The displacement of the transformation is given in micrometer units.

It has been introduced in version 0.25.

(3) Signature: void transform (const ICplxTrans trans)

Description: Transforms all shapes with the given complex integer transformation

This method will invalidate all references to shapes inside this collection.

It has been introduced in version 0.23.

(4) Signature: void transform (const DCplxTrans trans)

Description: Transforms all shapes with the given transformation (given in micrometer units)

This method will invalidate all references to shapes inside this collection. The displacement of the transformation is given in micrometer units.

It has been introduced in version 0.25.

(5) Signature: Shape transform (const Shape shape, const Trans trans)

Description: Transforms the shape given by the reference with the given transformation

Returns:A reference (a Shape object) to the new shape

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.

This method has been introduced in version 0.16.

(6) Signature: Shape transform (const Shape shape, const DTrans trans)

Description: Transforms the shape given by the reference with the given transformation, where the transformation is given in micrometer units

trans:The transformation to apply (displacement in micrometer units)
Returns:A reference (a Shape object) to the new shape

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. This method has been introduced in version 0.25.

(7) Signature: Shape transform (const Shape shape, const ICplxTrans trans)

Description: Transforms the shape given by the reference with the given complex integer space transformation

Returns:A reference (a Shape object) to the new shape

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.

(8) Signature: Shape transform (const Shape shape, const DCplxTrans trans)

Description: Transforms the shape given by the reference with the given complex transformation, where the transformation is given in micrometer units

trans:The transformation to apply (displacement in micrometer units)
Returns:A reference (a Shape object) to the new shape

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. This method has been introduced in version 0.25.