types

package
v0.1.22 Latest Latest
Warning

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

Go to latest
Published: Mar 25, 2019 License: Apache-2.0 Imports: 1 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

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