geo

package
v0.8.0 Latest Latest
Warning

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

Go to latest
Published: Jun 4, 2020 License: AGPL-3.0, AGPL-3.0 Imports: 3 Imported by: 0

README

geo

geometry definitions for gradex

Documentation

Index

Constants

View Source
const (
	AnchorsLayer      = "anchors"
	AnchorReference   = "ref-anchor"
	ChromeLayer       = "chrome"
	TextFieldsLayer   = "textfields"
	TextPrefillsLayer = "textprefills"
	ComboBoxesLayer   = "comboboxes"
	PagesLayer        = "pages"
	ImagesLayer       = "images"
	Translate         = "translate"
	SVGElement        = "svg-"
	JPGElement        = "jpg-"
	Previous          = "previous"
	PXIN              = float64(96)                //pixels per inch
	PPIN              = float64(72)                //points per inch
	PPMM              = float64(PPIN * 1.0 / 25.4) //points per millimetre
	PPPX              = float64(PPIN / PXIN)       // points per pixel

)

Variables

This section is empty.

Functions

func ConvertPDFRectToImageRectangle added in v0.5.0

func ConvertPDFRectToImageRectangle(rect []float64) (image.Rectangle, error)

func ConvertToImageRectangle added in v0.5.0

func ConvertToImageRectangle(rect Rect) image.Rectangle

For converting SVG to IMG coordinates (for optical checkboxes)

Types

type Dim

type Dim struct {
	Width        float64 `json:"width"`
	Height       float64 `json:"height"`
	DynamicWidth bool    `json:"dynamicWidth"` //dynamicW
}

type Point

type Point struct {
	X float64 `json:"x"`
	Y float64 `json:"y"`
}

type Rect

type Rect struct {
	Corner Point `json:"corner"`
	Dim    Dim   `json:"dim"`
}

Jump to

Keyboard shortcuts

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