Documentation ¶
Index ¶
- type BoundingBox
- func (bb BoundingBox) Center() (x, y float64)
- func (bb BoundingBox) Contains(x, y float64) bool
- func (bb BoundingBox) Height() float64
- func (bb *BoundingBox) Include(other BoundingBox)
- func (bb BoundingBox) IsZero() bool
- func (bb BoundingBox) Size() (width, height float64)
- func (bb BoundingBox) SizeIsZero() bool
- func (bb BoundingBox) String() string
- func (bb BoundingBox) Validate() error
- func (bb BoundingBox) Width() float64
- type StringsTable
- func (t StringsTable) CellBoundingBox(row, col int) *BoundingBox
- func (t StringsTable) CellExists(row, col int) bool
- func (t StringsTable) CellText(row, col int) string
- func (t StringsTable) HasCellBoundingBoxes() bool
- func (t StringsTable) NumRowCells(row int) int
- func (t StringsTable) NumRows() int
- type Table
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BoundingBox ¶
type BoundingBox struct { XMin float64 `json:"xMin" xml:"xMin,attr"` YMin float64 `json:"yMin" xml:"yMin,attr"` XMax float64 `json:"xMax" xml:"xMax,attr"` YMax float64 `json:"yMax" xml:"yMax,attr"` }
BoundingBox is a rectangular bounding box
func (BoundingBox) Center ¶
func (bb BoundingBox) Center() (x, y float64)
Center returns the x/y coordinates of the box center
func (BoundingBox) Contains ¶
func (bb BoundingBox) Contains(x, y float64) bool
Contains returns if the point x/y is contained within the box
func (*BoundingBox) Include ¶
func (bb *BoundingBox) Include(other BoundingBox)
Include modifies bb to include other. If the size of bb is zero, then all values from other will be assigned.
func (BoundingBox) IsZero ¶
func (bb BoundingBox) IsZero() bool
IsZero returns if all values are zero
func (BoundingBox) Size ¶
func (bb BoundingBox) Size() (width, height float64)
Size returns the width and height of the BoundingBox
func (BoundingBox) SizeIsZero ¶
func (bb BoundingBox) SizeIsZero() bool
SizeIsZero returns if the area of the box is zero
func (BoundingBox) String ¶
func (bb BoundingBox) String() string
func (BoundingBox) Validate ¶
func (bb BoundingBox) Validate() error
type StringsTable ¶
type StringsTable [][]string
StringsTable implements Table for a 2D slice of strings.
func (StringsTable) CellBoundingBox ¶
func (t StringsTable) CellBoundingBox(row, col int) *BoundingBox
func (StringsTable) CellExists ¶
func (t StringsTable) CellExists(row, col int) bool
func (StringsTable) CellText ¶
func (t StringsTable) CellText(row, col int) string
func (StringsTable) HasCellBoundingBoxes ¶
func (t StringsTable) HasCellBoundingBoxes() bool
func (StringsTable) NumRowCells ¶
func (t StringsTable) NumRowCells(row int) int
func (StringsTable) NumRows ¶
func (t StringsTable) NumRows() int
type Table ¶
type Table interface { NumRows() int // NumRowCells returns the number of cells in a row. // Rows may have less cells than the whole table has columns. // Returns zero for a non existing row. NumRowCells(row int) int // CellExists returns if there is a cell available at the given row and column position. CellExists(row, col int) bool // CellText returns the text of a cell // or an empty string if the cell does not exist. CellText(row, col int) string // HasCellBoundingBoxes returns if cell bounding boxes are available. // See CellBoundingBox HasCellBoundingBoxes() bool // CellBoundingBox returns the bounding box of a cell // or nil if the cell does not exist or has no bounding box information. // See HasCellBoundingBoxes CellBoundingBox(row, col int) *BoundingBox }
Click to show internal directories.
Click to hide internal directories.