VerticalTextLayout


class VerticalTextLayout


Represents the result of laying out text vertically.

This class encapsulates the result of a vertical text layout process. It stores the layout's properties and provides methods to draw the layout on a Canvas.

Summary

Nested types

Builder class for creating instances of VerticalTextLayout.

Public functions

Unit
draw(canvas: Canvas, x: @Px Float, y: @Px Float)

Draws this text layout onto the specified Canvas.

Public properties

Int
Float
Int

The text orientation used for building this vertical layout.

TextPaint

The TextPaint used for building this vertical layout.

Int
CharSequence
Float

The width constraint of the vertical text in pixels.

Public functions

draw

Added in 1.0.0-alpha01
fun draw(canvas: Canvas, x: @Px Float, y: @Px Float): Unit

Draws this text layout onto the specified Canvas.

Parameters
canvas: Canvas

The Canvas to draw onto.

x: @Px Float

The horizontal offset in pixels. The drawing origin is the top-right corner.

y: @Px Float

The vertical offset in pixels. The drawing origin is the top-right corner.

Public properties

end

Added in 1.0.0-alpha01
val endInt

height

Added in 1.0.0-alpha01
val heightFloat

orientation

Added in 1.0.0-alpha01
val orientationInt

The text orientation used for building this vertical layout.

paint

Added in 1.0.0-alpha01
val paintTextPaint

The TextPaint used for building this vertical layout. Do not mutate this paint instance.

start

Added in 1.0.0-alpha01
val startInt

text

Added in 1.0.0-alpha01
val textCharSequence

width

Added in 1.0.0-alpha01
val widthFloat

The width constraint of the vertical text in pixels.