Positions

Position an object and set how much room it reserves, in points.

Geometry

class creator_studio_doc_format.core.Geometry(*, preset_identifier='', position, size, angle=0, flip_horizontally=False, width_valid=True, height_valid=True, **extra_data)[source]

The bounding box in which an object is positioned.

position and size are in points. position is measured after rotation and size before it, so the object’s center is the center of the rotated bounding box whose top-left corner is position.

field position : Position [Required]

The top-left corner of the object’s axis-aligned bounding box, measured after rotation is applied. Coordinates are absolute within the containing slide, even for an object nested inside a group.

field size : Size [Required]

The width and height of the object’s bounding box, in points, before rotation and flipping are applied. The width or height may be zero for objects without an intrinsic size, such as audio.

field angle : float = 0

The rotation of the object’s bounding box around its center, in degrees measured counterclockwise. It’s written in the range 0 to 360 (exclusive); values outside that range are mapped to the equivalent angle within it.

field flip_horizontally : bool = False

Whether the object is mirrored across the vertical axis through its center, before rotation by angle is applied. A vertical flip is represented by combining a horizontal flip with a 180-degree rotation.

field width_valid : bool = True

Whether the object’s width is valid. When false for an object that can compute its own width, the natural width that fits its text is used instead of the width in size.

field height_valid : bool = True

Whether the object’s height is valid. When false for an object that can compute its own height, the natural height that fits its text is used instead of the height in size.

Offset

class creator_studio_doc_format.core.Offset(*, preset_identifier='', dx=0, dy=0, **extra_data)[source]

A horizontal and vertical displacement, in points.

field dx : float = 0

The horizontal offset, in points.

field dy : float = 0

The vertical offset, in points.

Position

class creator_studio_doc_format.core.Position(*, preset_identifier='', x, y, **extra_data)[source]

A point, in points, in whichever coordinate space the property using it defines, measured downward from that space’s top-left corner.

field x : float [Required]

The horizontal coordinate, in points, increasing to the right.

field y : float [Required]

The vertical coordinate, in points, increasing downward.

Insets

class creator_studio_doc_format.core.Insets(*, preset_identifier='', top=0, bottom=0, left=0, right=0, **extra_data)[source]

Space reserved along each edge of an area, in points.

field top : float = 0

The top inset, in points, in the range 0 to 50000000.

Constraints:
  • ge = 0

  • le = 50000000

field bottom : float = 0

The bottom inset, in points, in the range 0 to 50000000.

Constraints:
  • ge = 0

  • le = 50000000

field left : float = 0

The left inset, in points, in the range 0 to 50000000.

Constraints:
  • ge = 0

  • le = 50000000

field right : float = 0

The right inset, in points, in the range 0 to 50000000.

Constraints:
  • ge = 0

  • le = 50000000

TabStopType

class creator_studio_doc_format.core.TabStopType(*, preset_identifier='', position, kind=None, leader=None, **extra_data)[source]

A tab stop.

field position : float [Required]

The position of the tab stop, in points. Use a position greater than 0; a tab stop at 0 or less is accepted but is dropped the next time the document is opened.

field kind : TabAlignmentKindType | None = None

The alignment of the tab stop; the default is left.

field leader : str | None = None

The string shown in the space before the tab stop (for example, a period for a dotted leader). The default is a single space (a plain gap), so a value of " " is equivalent to omitting the property.

TabAlignmentKindType

class creator_studio_doc_format.core.TabAlignmentKindType(str, Enum)[source]

The alignment of a tab stop.

A field accepts a member or its value, so TabAlignmentKindType.CENTER and 'center' are the same. The member’s name as a string isn’t accepted.

CENTER = 'center'

Text is centered on the tab stop.

DECIMAL = 'decimal'

Text is aligned so that its decimal separator lines up with the tab stop.

LEFT = 'left'

Text begins at the tab stop, running in the paragraph’s writing direction (a leading tab).

RIGHT = 'right'

Text ends at the tab stop, running in the paragraph’s writing direction (a trailing tab).

VerticalAlignmentType

class creator_studio_doc_format.core.VerticalAlignmentType(str, Enum)[source]

Vertical alignment of text within a container.

A field accepts a member or its value, so VerticalAlignmentType.BOTTOM and 'bottom' are the same. The member’s name as a string isn’t accepted.

BOTTOM = 'bottom'

Align the text to the bottom of its container.

CENTER = 'center'

Center the text vertically in its container. Shown in Keynote as Align Middle.

TOP = 'top'

Align the text to the top of its container.

See also

Express lengths and coordinates in the format’s authoring requirements.