foreword

package
v0.1.3 Latest Latest
Warning

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

Go to latest
Published: Oct 10, 2024 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Split

func Split(text string) []string

Types

type ForewordView

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

ForewordView draws a first lines of large text

func New

func New(text fn.String, font *impress.Font, lineHeight int, foreground fn.Color, lineCount int) *ForewordView

New creates a ForewordView

func (*ForewordView) Draw

func (v *ForewordView) Draw(w *impress.Window, rect image.Rectangle)

Draw draws a view element. Width of rect parameter is used to split a text into sublines

func (*ForewordView) Size

func (v *ForewordView) Size(size image.Point) image.Point

Size returns size of a view element. Width of size parameter is used to split a text into sublines

Jump to

Keyboard shortcuts

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