Classes | Typedefs | Enumerations
Avoid Namespace Reference

The namespace used by code in the libavoid library. More...

Classes

class  ShapeConnectionPin
 The ShapeConnectionPin class represents a fixed point or "pin" on a shape that can be connected to. More...
 
class  ConnRef
 The ConnRef class represents a connector object. More...
 
class  ConnEnd
 The ConnEnd class represents different possible endpoints for connectors. More...
 
class  Point
 The Point class defines a point in the plane. More...
 
class  PolygonInterface
 A common interface used by the Polygon classes. More...
 
class  Edge
 A line between two points. More...
 
class  Polygon
 A dynamic Polygon, to which points can be easily added and removed. More...
 
class  ReferencingPolygon
 A Polygon which just references its points from other Polygons. More...
 
class  Rectangle
 A Rectangle, a simpler way to define the polygon for square or rectangular shapes. More...
 
class  JunctionRef
 The JunctionRef class represents a fixed or free-floating point that connectors can be attached to. More...
 
class  Router
 The Router class represents a libavoid router instance. More...
 
class  ShapeRef
 The ShapeRef class represents a shape object. More...
 

Typedefs

typedef unsigned int ConnDirFlags
 One or more Avoid::ConnDirFlag options.
 
typedef Point Vector
 A vector, represented by the Point class.
 
typedef Edge BBox
 A bounding box, represented with an Edge between top-left and bottom-right corners.
 
typedef Polygon PolyLine
 A multi-segment line, represented with the Polygon class.
 

Enumerations

enum  ConnType { , ConnType_PolyLine = 1, ConnType_Orthogonal = 2 }
 Describes the type of routing that is performed for each connector. More...
 
enum  ConnDirFlag { ,
  ConnDirUp = 1, ConnDirDown = 2, ConnDirLeft = 4, ConnDirRight = 8,
  ConnDirAll = 15
}
 Flags that can be passed to the ConnEnd constructor to specify which sides of a shape this point should have visibility to if it is located within the shape's area. More...
 
enum  RouterFlag { PolyLineRouting = 1, OrthogonalRouting = 2 }
 Flags that can be passed to the router during initialisation to specify options. More...
 
enum  PenaltyType {
  segmentPenalty = 0, anglePenalty, crossingPenalty, clusterCrossingPenalty,
  fixedSharedPathPenalty, portDirectionPenalty
}
 Types of penalty cases that can be used to improve the quality of the connector routes produced. More...
 
enum  ShapeTransformationType {
  TransformationType_CW90 = 0, TransformationType_CW180 = 1, TransformationType_CW270 = 2, TransformationType_FlipX = 3,
  TransformationType_FlipY = 4
}
 Describes the type of transformation that has been applied to a shape having its transformConnectionPinPositions() method called. More...
 

Detailed Description

The namespace used by code in the libavoid library.

Enumeration Type Documentation

Flags that can be passed to the ConnEnd constructor to specify which sides of a shape this point should have visibility to if it is located within the shape's area.

Like SVG, libavoid considers the Y-axis to point downwards, that is, like screen coordinates the coordinates increase from left-to-right and also from top-to-bottom.

Enumerator
ConnDirUp 

This option specifies the point should be given visibility to the top of the shape that it is located within.

ConnDirDown 

This option specifies the point should be given visibility to the bottom of the shape that it is located within.

ConnDirLeft 

This option specifies the point should be given visibility to the left side of the shape that it is located within.

ConnDirRight 

This option specifies the point should be given visibility to the right side of the shape that it is located within.

ConnDirAll 

This option, provided for convenience, specifies the point should be given visibility to all four sides of the shape that it is located within.

Describes the type of routing that is performed for each connector.

Enumerator
ConnType_PolyLine 

The connector path will be a shortest-path poly-line that routes around obstacles.

ConnType_Orthogonal 

The connector path will be a shortest-path orthogonal poly-line (only vertical and horizontal line segments) that routes around obstacles.

Types of penalty cases that can be used to improve the quality of the connector routes produced.

Enumerator
segmentPenalty 

This penalty is applied for each segment in the connector path beyond the first. This should always normally be set when doing orthogonal routing to prevent step-like connector paths.

anglePenalty 

This penalty is applied in its full amount to tight acute bends in the connector path. A smaller portion of the penalty is applied for slight bends, i.e., where the bend is close to 180 degrees. This is useful for polyline routing where there is some evidence that tighter corners are worse for readability, but that slight bends might not be so bad, especially when smoothed by curves.

crossingPenalty 

This penalty is applied whenever a connector path crosses another connector path. It takes shared paths into consideration and the penalty is only applied if there is an actual crossing.

Note
This penalty is still experimental! It is not recommended for normal use.
clusterCrossingPenalty 

This penalty is applied whenever a connector path crosses a cluster boundary.

Note
This penalty is still experimental! It is not recommended for normal use.
fixedSharedPathPenalty 

This penalty is applied whenever a connector path shares some segments with an immovable portion of an existing connector route (such as the first or last segment of a connector).

Note
This penalty is still experimental! It is not recommended for normal use.
portDirectionPenalty 

This penalty is applied to port selection choice when the other end of the connector being routed does not appear in any of the 90 degree visibility cones centered on the visibility directions for the port.

Note
This penalty is still experimental! It is not recommended for normal use.

Flags that can be passed to the router during initialisation to specify options.

Enumerator
PolyLineRouting 

This option specifies that the router should maintain the structures necessary to allow poly-line connector routing.

OrthogonalRouting 

This option specifies that the router should maintain the structures necessary to allow orthogonal connector routing.

Describes the type of transformation that has been applied to a shape having its transformConnectionPinPositions() method called.

Enumerator
TransformationType_CW90 

The shape has been rotated clockwise by 90 degrees.

TransformationType_CW180 

The shape has been rotated clockwise by 180 degrees.

TransformationType_CW270 

The shape has been rotated clockwise by 270 degrees.

TransformationType_FlipX 

The shape has been flipped horizontally in the X-dimension.

TransformationType_FlipY 

The shape has been flipped vertically in the Y-dimension.