ps

package
v1.0.20 Latest Latest
Warning

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

Go to latest
Published: Apr 30, 2026 License: MIT Imports: 11 Imported by: ? 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

View Source
var DefaultOptions = Options{
	ImageEncoding: canvas.Lossless,
}

Functions

This section is empty.

Types

type Format

type Format int
const (
	PostScript Format = iota
	EncapsulatedPostScript
)

type Options

type Options struct {
	Format
	canvas.ImageEncoding
}

type PS

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

PS is an PostScript renderer. Be aware that PostScript does not support transparency of colors.

func New

func New(w io.Writer, width, height float64, opts *Options) *PS

New returns an PostScript renderer.

func (*PS) Close

func (r *PS) Close() error

func (*PS) RenderImage

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

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

func (*PS) RenderPath

func (r *PS) 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 (*PS) RenderText

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

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

func (*PS) Size

func (r *PS) 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