tex

package
v0.2.5 Latest Latest
Warning

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

Go to latest
Published: Dec 5, 2026 License: Apache-2.0, MIT Imports: 12 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 TeX

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

TeX writes a PGF picture for pdfLaTeX or LuaLaTeX in PDF mode.

func New

func New(w io.Writer, width, height float64) *TeX

New returns a TeX/PGF renderer.

func (*TeX) Close

func (r *TeX) Close() error

Close finished and closes the TeX file.

func (*TeX) Err

func (r *TeX) Err() error

Err returns the first output or image decoding failure.

func (*TeX) RenderClippedImage

func (r *TeX) RenderClippedImage(img image.Image, m canvas.Matrix, clip *canvas.Path)

RenderClippedImage uses the image-local, Y-up clip supplied by canvas.

func (*TeX) RenderClippedPath

func (r *TeX) RenderClippedPath(path *canvas.Path, style canvas.Style, m canvas.Matrix, clip *canvas.Path)

RenderClippedPath preserves path-local clipping.

func (*TeX) RenderClippedText

func (r *TeX) RenderClippedText(text *canvas.Text, m canvas.Matrix, clip *canvas.Path)

RenderClippedText clips outlined glyphs in text-local space.

func (*TeX) RenderImage

func (r *TeX) RenderImage(img image.Image, m canvas.Matrix)

RenderImage renders an image to the canvas using a transformation matrix.

func (*TeX) RenderPath

func (r *TeX) RenderPath(path *canvas.Path, style canvas.Style, m canvas.Matrix)

RenderPath renders a path to the canvas using a style and a transformation matrix.

func (*TeX) RenderText

func (r *TeX) RenderText(text *canvas.Text, m canvas.Matrix)

RenderText renders a text object to the canvas using a transformation matrix.

func (*TeX) Size

func (r *TeX) Size() (float64, float64)

Size returns the size of the canvas in millimeters.

Jump to

Keyboard shortcuts

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