brilliant-msg
    Preparing search index...

    Class CircularTextLayout

    A circular text layout, ideal for the Halo device. Text is constrained within a circle inscribed in the defined width/height.

    Implements

    Index

    Constructors

    • Constructs a CircularTextLayout.

      Parameters

      • options: {
            circleMargin?: number;
            fontFamily?: string;
            fontSize: number;
            height: number;
            textAlign?: CanvasTextAlign;
            width: number;
        }

        Configuration options.

      Returns CircularTextLayout

    Properties

    centerX: number
    centerY: number
    circleMargin: number
    fontFamily?: string

    Optional font family name.

    fontSize: number

    The font size in pixels.

    height: number

    The height of the layout in pixels.

    radius: number
    textAlign: CanvasTextAlign

    Text alignment within each line.

    width: number

    The width of the layout in pixels.

    Accessors

    Methods

    • Returns the chord width and x-offset for a line at the given Y position within the circle. Returns null if the line is outside the circle or too narrow to render text.

      Parameters

      • lineY: number
      • lineHeight: number

      Returns null | { width: number; xOffset: number }