content

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Mar 4, 2024 License: BSD-3-Clause Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Block

type Block interface {
	TextElement

	Kind() Block

	// Lines returns the lines contained within the block.
	Lines() []Line
}

type Element

type Element interface {
	// Bounds returns the boundary of the element relative to the page.
	Bounds() geometry.Rect
}

type Line

type Line interface {
	TextElement

	Kind() Line
}

type Page

type Page interface {
	// 1-based page number.
	Number() int

	// Physical page size.
	Size() geometry.Size

	Elements() []Element
}

type TextElement

type TextElement interface {
	Element

	// Text returns the complete, unmodified text of the element (including
	// leading or trailing space). Multi-line elements separate lines using
	// newline characters (`\n`).
	Text() string

	// RangeBounds returns the boundary of the characters from start to end. Panics
	// if the range starts or ends outside the element text.
	RangeBounds(start, end int) geometry.Rect
}

Jump to

Keyboard shortcuts

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