miniprogram

package
v0.3.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 25, 2026 License: Apache-2.0 Imports: 19 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Measurer

type Measurer interface {
	// Width is the advance of text in font, a CSS font shorthand.
	Width(font, text string) float64
}

Measurer measures text in the host's fonts.

type TextEngine

type TextEngine struct {
	// contains filtered or unexported fields
}

TextEngine is driver.TextEngine over a Measurer.

func NewTextEngine

func NewTextEngine(m Measurer) *TextEngine

NewTextEngine returns an engine measuring with m.

func (*TextEngine) Prepare

Prepare implements driver.TextEngine.

type TextLayout

type TextLayout struct {
	// contains filtered or unexported fields
}

TextLayout is the text laid out at its final size: what the render layer draws.

func (*TextLayout) Attachment

func (l *TextLayout) Attachment(i int) (driver.Bounds, bool)

Attachment implements core.AttachmentLayout.

func (*TextLayout) CaretRect

func (l *TextLayout) CaretRect(c driver.Caret) (driver.Bounds, bool)

CaretRect implements driver.TextHitTester.

func (*TextLayout) HitTest

func (l *TextLayout) HitTest(p driver.Point) driver.Caret

HitTest implements driver.TextHitTester.

func (*TextLayout) RangeRects

func (l *TextLayout) RangeRects(start, end int, out []driver.Bounds) []driver.Bounds

RangeRects implements driver.TextHitTester.

func (*TextLayout) Release

func (*TextLayout) Release()

Release implements driver.TextLayout.

func (*TextLayout) TextLines

func (l *TextLayout) TextLines() []driver.TextLine

TextLines implements core.LineLayout.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL