pdfdraw

package
v0.0.0-...-3435f2a Latest Latest
Warning

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

Go to latest
Published: Nov 22, 2023 License: BSD-3-Clause Imports: 4 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Object

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

Object represents a set of PDF instructions to draw a PDF graphic

func New

func New() *Object

New creates a new PDF object.

func NewStandalone

func NewStandalone() *Object

NewStandalone creates a new PDF object encapsulated in q ... Q .

func (*Object) Circle

func (pd *Object) Circle(x, y, radiusX, radiusY bag.ScaledPoint) *Object

Circle draws a circle. TODO: document where it starts/ends etc.

func (*Object) Clip

func (pd *Object) Clip() *Object

Clip clips the sub path using the even-odd rule.

func (*Object) Close

func (pd *Object) Close() *Object

Close closes the sub path.

func (*Object) Color

func (pd *Object) Color(col color.Color) *Object

Color sets the stroking and nonstroking color

func (*Object) ColorNonstroking

func (pd *Object) ColorNonstroking(col color.Color) *Object

ColorNonstroking sets the non stroking color. If the color is the color “none”, then no color will be set.

func (*Object) ColorStroking

func (pd *Object) ColorStroking(col color.Color) *Object

ColorStroking sets the stroking color

func (*Object) Curveto

func (pd *Object) Curveto(control1x, control1y, control2x, control2y, x1, y1 bag.ScaledPoint) *Object

Curveto appends a bezier curve from the current point to point 1 controlled by control points 1 and 2.

func (*Object) Endpath

func (pd *Object) Endpath() *Object

Endpath ends the current path.

func (*Object) Fill

func (pd *Object) Fill() *Object

Fill fills the current object.

func (*Object) LineWidth

func (pd *Object) LineWidth(wd bag.ScaledPoint) *Object

LineWidth sets the line width.

func (*Object) Lineto

func (pd *Object) Lineto(x, y bag.ScaledPoint) *Object

Lineto draws a straight line from the current point to the point given at x and y.

func (*Object) Literal

func (pd *Object) Literal(s string) *Object

Literal inserts a PDF literal.

func (*Object) Moveto

func (pd *Object) Moveto(x, y bag.ScaledPoint) *Object

Moveto moves the cursor relative to the current point.

func (*Object) Rect

func (pd *Object) Rect(x, y, wd, ht bag.ScaledPoint) *Object

Rect draws a rectangle.

func (*Object) Restore

func (pd *Object) Restore() *Object

Restore restores the graphics state.

func (*Object) Save

func (pd *Object) Save() *Object

Save saves the graphics state.

func (*Object) SetDash

func (pd *Object) SetDash(dasharray []uint, dashphase uint) *Object

SetDash sets the dash pattern. Arguments in dasharray must be > 0

func (*Object) String

func (pd *Object) String() string

String returns the PDF instructions used for

func (*Object) Stroke

func (pd *Object) Stroke() *Object

Stroke paints the current object without filling it.

func (*Object) StrokeFill

func (pd *Object) StrokeFill() *Object

StrokeFill paints the current object and fills it.

Jump to

Keyboard shortcuts

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