Documentation ¶
Index ¶
- func Abs(x int) int
- func FileExists(filename string) bool
- func Max(x, y int) int
- func Min(x, y int) int
- type Point
- func (point Point) CairoLineTo(ctx *cairo.Context)
- func (point Point) CairoMoveTo(ctx *cairo.Context)
- func (point Point) DistanceTo(pt Point) float64
- func (point Point) ManhattanDistanceTo(pt Point) int
- func (point Point) Negated() Point
- func (point Point) Rotated(angle float64) Point
- func (point Point) TranslatedBy(pt Point) Point
- func (point Point) TranslatedByXY(x, y int) Point
- type PointF
- func (point PointF) CairoLineTo(ctx *cairo.Context)
- func (point PointF) CairoMoveTo(ctx *cairo.Context)
- func (point PointF) Length() float64
- func (point PointF) MultipliedBy(value float64) PointF
- func (point PointF) Negated() PointF
- func (point PointF) Normalized() PointF
- func (point PointF) Rotated(angle float64) PointF
- func (point PointF) RotatedDegree(angle float64) PointF
- func (point PointF) ToPoint() Point
- type Rectangle
- func (rect Rectangle) Contains(point Point) bool
- func (rect Rectangle) Format() string
- func (rect Rectangle) GetLTRB() (int, int, int, int)
- func (rect Rectangle) GetXYWH() (int, int, int, int)
- func (rect Rectangle) Height() int
- func (rect *Rectangle) MoveLTRB(leftOffset int, topOffset int, rightOffset int, bottomOffset int)
- func (rect Rectangle) Scaled(scale float32) Rectangle
- func (rect Rectangle) SetToCairo(ctx *cairo.Context)
- func (rect Rectangle) Size() Point
- func (rect Rectangle) Width() int
- func (rect Rectangle) X() int
- func (rect Rectangle) Y() int
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func FileExists ¶
Types ¶
type Point ¶
type Point struct {
X, Y int
}
func (Point) CairoLineTo ¶
func (Point) CairoMoveTo ¶
func (Point) DistanceTo ¶
func (Point) ManhattanDistanceTo ¶
func (Point) TranslatedBy ¶
func (Point) TranslatedByXY ¶
type PointF ¶
type PointF struct {
X, Y float64
}
func NewPointFFromPoint ¶
func (PointF) CairoLineTo ¶
func (PointF) CairoMoveTo ¶
func (PointF) MultipliedBy ¶
func (PointF) Normalized ¶
func (PointF) RotatedDegree ¶
type Rectangle ¶
type Rectangle struct {
// contains filtered or unexported fields
}
func NewRectangleFromLTRB ¶
func NewRectangleFromPoints ¶
func NewRectangleFromXYWH ¶
func (Rectangle) SetToCairo ¶
Click to show internal directories.
Click to hide internal directories.