mapteksdk.data.edge_decoration module

Classes for specifying edge decorations from Python.

class EdgeGlyph(value)

Bases: Enum

A glyph to display on an edge.

ARROW = 0

Display an arrow head on the edge.

DOUBLE_ARROW = 1

Display two arrows on the edge.

CROSS = 2

Display a cross on the edge.

TRIPLE_CROSS = 3

Display three crosses on the edge.

CIRCLE = 4

Display a circle on the edge.

UNKNOWN = 255

Represents an unknown edge glyph.

Typically, this indicates the SDK is too old to be fully compatible with the connected application.

class EdgeGlyphLocation(value)

Bases: Enum

Determines where an edge glyph should be displayed.

END = 0

The glyph should be displayed at the end of the edge.

MIDDLE = 1

The glyph should be displayed in the middle of the edge.

BEGINNING = 2

The glyph should be displayed at the start of the edge.

UNKNOWN = 255

Represents an unknown edge glyph location.

Typically, this indicates the SDK is too old to be fully compatible with the connected application.

class EdgeGlyphSize(width, height)

Bases: NamedTuple

Named tuple representing the size of an edge glyph.

A negative width or height can be used to flip the edge decoration in that direction.

For objects constructed by EdgeDecoration, the width and height should always be finite and non-zero.

Parameters:
width: float

The width of the edge glyph in pixels.

height: float

The height of the edge glyph in pixels.

count(value, /)

Return number of occurrences of value.

index(value, start=0, stop=9223372036854775807, /)

Return first index of value.

Raises ValueError if the value is not present.

class EdgeDecoration(glyph, location, size=(32.0, 32.0))

Bases: object

Represents an edge decoration.

Parameters:
  • glyph (EdgeGlyph) – The glyph to display on the edge.

  • location (EdgeGlyphLocation) – The location to display for the glyph.

  • size (tuple[float, float]) – The size in the form (width, height). This is measured in pixels.

Raises:

ValueError – If size contains a zero or non-finite value.

classmethod arrow_at_end()

Get an edge decoration representing an arrow at the end of each edge.

Return type:

Self

classmethod arrow_in_middle()

Get a decoration representing an arrow in the middle of each edge.

Return type:

Self

property glyph: EdgeGlyph

The edge glyph for this decoration.

property location: EdgeGlyphLocation

The location for this edge glyph.

property size: EdgeGlyphSize

The size of the glyph.

The width and height are measured in pixels. A negative width or height can be used to flip the edge decoration in that direction.