types

package
v0.2.2 Latest Latest
Warning

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

Go to latest
Published: Aug 1, 2019 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Overview

Package types provides pdfcpu's base types.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Point

type Point struct {
	X, Y float64
}

Point represents a user space location.

func (Point) String added in v0.1.21

func (p Point) String() string

type Rectangle

type Rectangle struct {
	LL, UR Point
}

Rectangle represents a rectangular region in userspace.

func NewRectangle

func NewRectangle(llx, lly, urx, ury float64) *Rectangle

NewRectangle returns a new rectangle for given corner coordinates.

func (Rectangle) AspectRatio

func (r Rectangle) AspectRatio() float64

AspectRatio returns the relation between width and height of a rectangle.

func (Rectangle) Center added in v0.1.21

func (r Rectangle) Center() Point

Center returns the center point of a rectangle.

func (Rectangle) Contains added in v0.1.21

func (r Rectangle) Contains(p Point) bool

Contains returns true if rectangle r contains point p.

func (Rectangle) Height

func (r Rectangle) Height() float64

Height returns the vertical span of a rectangle in userspace.

func (Rectangle) Landscape added in v0.1.21

func (r Rectangle) Landscape() bool

Landscape returns true if r is in landscape mode.

func (Rectangle) Portrait added in v0.1.21

func (r Rectangle) Portrait() bool

Portrait returns true if r is in portrait mode.

func (Rectangle) String

func (r Rectangle) String() string

func (Rectangle) Width

func (r Rectangle) Width() float64

Width returns the horizontal span of a rectangle in userspace.

Jump to

Keyboard shortcuts

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