Module libreda_db::source · [−]
Re-export of most traits. This can be useful if only traits should be used but not the rest.
pub use crate::hierarchy::traits::*;
pub use crate::hierarchy::util::*;
pub use crate::l2n::*;
pub use crate::layout::traits::*;
pub use crate::layout::util::*;
pub use crate::netlist::traits::*;
pub use crate::netlist::util::*;
pub use crate::reference_access::*;
pub use crate::traits::*;
Calculate the area of a geometry.
Calculation of the ‘bounding box’, i.e. the smallest rectangle that contains the geometrical object.
Calculate the doubled oriented area of a geometry. Using the doubled area allows to compute the area without using fractions. This is especially helpful when computing in integer coordinates.
Transform the geometrical object by transforming each point of it.
Mirror at the x or y axis.
Rotate by a integer multiple of 90 degrees.
Scale the geometrical shape. Scaling center is the origin
Translate the geometrical object by a vector.
Try the calculation of the ‘bounding box’, i.e. the smallest rectangle that contains the geometrical object. In some cases this is not always possible, so the try might fail. For instance a set of polygons does not have a bounding box if the set is empty.
This trait defines the type-casting of the coordinate types for geometrical objects.
Try to compute the bounding box while consuming the data. This is intended to be used for computing bounding boxes over iterators.
Compute the winding number of a geometrical object around a point. The winding number is used to check if a point is contained in a shape.