类型 Label

API 文档由 Go 源码生成,内容为英文。

type Label struct {
	Value  string
	Bounds ui.Rect
	// OriginX and OriginY are platform.TextLabel's: the text's sub-pixel position
	// within Bounds.
	OriginX, OriginY float32
	FontSize         float32
	Weight           float32
	Color            ui.Color
	Layer            uint16
	// Mono, MonoFace, CellWidth and Runs describe a fixed-pitch grid line (see
	// ui.Canvas.LabelRuns); Runs is empty for an ordinary label.
	Mono      bool
	MonoFace  ui.MonoFace
	CellWidth float32
	Runs      []ui.TextRun
	// Clip is the region the label may paint into when Clipped (see
	// platform.TextLabel.Clip).
	Clip          ui.Rect
	Clipped       bool
	Bitmap        []byte
	BitmapWidth   int
	BitmapHeight  int
	BitmapStride  int
	BitmapID      uint64
	BitmapVersion uint32
	BitmapUpload  bool
}

Label is one line of text to draw.