geom

Geom

Inherits: Object

Namespace for the library's enums. Never instantiated -- it holds constants and nothing else.

Enumerations

enum ThicknessSpace

SPACE_METERS = 0
Thickness in world units; shrinks on screen with distance.
SPACE_PIXELS = 1
Thickness in screen pixels; constant on-screen size.
SPACE_VIEWPORT = 2
A fraction of the viewport: 100 span its shorter side, so 1 is one percent of it and about 11 pixels at 1080p. The same idea as CSS vmin. Radii and sizes here are whole-ish numbers; strokes come out below 1, and a stroke that should stay a fixed pixel width wants SPACE_PIXELS instead.

enum LineEndCap

CAP_NONE = 0
Cut off exactly at each endpoint.
CAP_SQUARE = 1
Extend by half the thickness at each endpoint.
CAP_ROUND = 2
Extend by half the thickness, rounded.

enum LineGeometry

LINE_BILLBOARD = 1
A flat quad that turns to face the camera.
LINE_VOLUMETRIC = 2
Real tube geometry, with volume.

enum ColorMode

COLOR_SINGLE = 0
One flat color.
COLOR_RADIAL = 1
Interpolate color to color_end from the center outwards.
COLOR_ANGULAR = 2
Interpolate color to color_end around the sweep.

enum PolylineJoin

JOIN_SIMPLE = 0
Corners at plain half-width; the outside of a corner pinches inward.
JOIN_MITER = 1
Corners extended to where the edges meet, clamped on sharp turns.
JOIN_ROUND = 2
As simple, with a disc laid over each joint.
JOIN_BEVEL = 3
The outside of a corner cut off square.

enum BlendMode

BLEND_OPAQUE = 0
Writes depth and sorts against other geometry; hard edges, no fade.
BLEND_TRANSPARENT = 1
Standard alpha compositing. The default.
BLEND_ADDITIVE = 2
Brightens what is behind. Good for glows.
BLEND_MULTIPLY = 3
Darkens what is behind. Good for tints.
BLEND_SUBTRACT = 4
Subtracts this color from the background.
BLEND_TRANSPARENT_DEPTH = 5
Transparent, but writing depth so shapes occlude by position.

enum DashSpace

DASH_METERS = 0
Dash size and spacing are lengths in the shape's own units.
DASH_RELATIVE = 1
Dash size and spacing are multiples of the wall thickness.
DASH_FIXED_COUNT = 2
Dash size is a repeat count; spacing is the empty fraction of a period.

enum DashSnap

SNAP_OFF = 0
Use the dash period as given.
SNAP_TILING = 1
Round to a whole number of periods so the pattern tiles seamlessly.
SNAP_END_TO_END = 2
Round so a dash lands at each end of the shape.

enum DashType

DASH_BASIC = 0
Square dash ends.
DASH_ANGLED = 1
Dash ends sheared into a parallelogram. The shear is 0 by default, which looks exactly like DASH_BASIC; set dash_modifier on GeomDraw, or modifier on GeomDash.
DASH_ROUNDED = 2
Rounded dash ends.

enum DiscType

DISC_DISC = 0
Filled circle.
DISC_PIE = 1
Filled circular sector, bounded by the start and end angle.
DISC_RING = 2
Hollow ring. radius is to the middle of the wall, not the outer edge.
DISC_ARC = 3
A section of a ring, bounded by the start and end angle.