package di

Import Path
	github.com/go-text/typesetting/di (on go.dev)

Dependency Relation
	imports one package, and imported by 2 packages

Involved Source Files direction.go
Package-Level Type Names (total 3)
/* sort by: | */
Axis indicates the axis of layout for a piece of text. func Direction.Axis() Axis const Horizontal const Vertical
Direction indicates the layout direction of a piece of text. Axis returns the layout axis for d. Harfbuzz returns the equivalent direction used by harfbuzz. HasVerticalOrientation returns true if the direction has set up an orientation for vertical text (typically using [SetSideways] or [SetUpright]) IsSideways returns true if the direction is vertical with a 'sideways' orientation. When shaping vertical text, 'sideways' means that the glyphs are rotated by 90°, clock-wise. This flag should be used by renderers to properly rotate the glyphs when drawing. IsVertical returns whether d is laid out on a vertical axis. If the return value is false, d is on the horizontal axis. Progression returns the text layout progression for d. SetProgression sets the progression, preserving the others bits. SetSideways makes d vertical with 'sideways' or 'upright' orientation, preserving only the progression. SwitchAxis switches from horizontal to vertical (and vice versa), preserving the progression. func Direction.SwitchAxis() Direction const DirectionBTT const DirectionLTR const DirectionRTL const DirectionTTB
Progression indicates how text is read within its Axis relative to the top left corner. func Direction.Progression() Progression func (*Direction).SetProgression(p Progression) const FromTopLeft const TowardTopLeft
Package-Level Constants (total 8)
DirectionBTT is for Bottom-to-Top text.
DirectionLTR is for Left-to-Right text.
DirectionRTL is for Right-to-Left text.
DirectionTTB is for Top-to-Bottom text.
FromTopLeft indicates text in which a reader starts reading at the top left corner of the text and moves away from it. DirectionLTR and DirectionTTB are examples of FromTopLeft Progression.
const Horizontal Axis = false
TowardTopLeft indicates text in which a reader starts reading at the opposite end of the text's Axis from the top left corner and moves towards it. DirectionRTL and DirectionBTT are examples of TowardTopLeft progression.
const Vertical Axis = true