Documentation ¶
Index ¶
- Constants
- func CubicRecursiveBezier(points []math.Vector2[float64], ...) []math.Vector2[float64]
- func QuadraticRecursiveBezier(points []math.Vector2[float64], ...) []math.Vector2[float64]
- type CubicCurveRecord
- func (r CubicCurveRecord) ApplyMatrixTransform(transform math2.MatrixTransform, applyTranslation bool) Record
- func (r CubicCurveRecord) BoundingBox() (topLeft, bottomRight math2.Vector2[float64])
- func (r CubicCurveRecord) Equals(other Record) bool
- func (r CubicCurveRecord) GetEnd() math2.Vector2[float64]
- func (r CubicCurveRecord) GetStart() math2.Vector2[float64]
- func (r CubicCurveRecord) IsFlat() bool
- func (r CubicCurveRecord) Reverse() Record
- func (r CubicCurveRecord) SameType(other Record) bool
- func (r CubicCurveRecord) String() string
- func (r CubicCurveRecord) ToLineRecords(scale int64) []Record
- func (r CubicCurveRecord) ToSingleQuadraticRecord() (QuadraticCurveRecord, bool)
- type CubicSplineCurveRecord
- func (r CubicSplineCurveRecord) ApplyMatrixTransform(transform math.MatrixTransform, applyTranslation bool) Record
- func (r CubicSplineCurveRecord) BoundingBox() (topLeft, bottomRight math.Vector2[float64])
- func (r CubicSplineCurveRecord) Equals(other Record) bool
- func (r CubicSplineCurveRecord) GetEnd() math.Vector2[float64]
- func (r CubicSplineCurveRecord) GetStart() math.Vector2[float64]
- func (r CubicSplineCurveRecord) IsFlat() bool
- func (r CubicSplineCurveRecord) Reverse() Record
- func (r CubicSplineCurveRecord) SameType(other Record) bool
- func (r CubicSplineCurveRecord) String() string
- type CurvedRecord
- type LineRecord
- func (r LineRecord) ApplyMatrixTransform(transform math.MatrixTransform, applyTranslation bool) Record
- func (r LineRecord) BoundingBox() (topLeft, bottomRight math.Vector2[float64])
- func (r LineRecord) Delta() math.Vector2[float64]
- func (r LineRecord) Equals(other Record) bool
- func (r LineRecord) GetEnd() math.Vector2[float64]
- func (r LineRecord) GetStart() math.Vector2[float64]
- func (r LineRecord) IsFlat() bool
- func (r LineRecord) Reverse() Record
- func (r LineRecord) SameType(other Record) bool
- func (r LineRecord) String() string
- type MoveRecord
- func (r MoveRecord) ApplyMatrixTransform(transform math.MatrixTransform, applyTranslation bool) Record
- func (r MoveRecord) BoundingBox() (topLeft, bottomRight math.Vector2[float64])
- func (r MoveRecord) Equals(other Record) bool
- func (r MoveRecord) GetEnd() math.Vector2[float64]
- func (r MoveRecord) GetStart() math.Vector2[float64]
- func (r MoveRecord) IsFlat() bool
- func (r MoveRecord) Reverse() Record
- func (r MoveRecord) SameType(other Record) bool
- func (r MoveRecord) String() string
- type QuadraticCurveRecord
- func (r QuadraticCurveRecord) ApplyMatrixTransform(transform math2.MatrixTransform, applyTranslation bool) Record
- func (r QuadraticCurveRecord) BoundingBox() (topLeft, bottomRight math2.Vector2[float64])
- func (r QuadraticCurveRecord) Equals(other Record) bool
- func (r QuadraticCurveRecord) GetEnd() math2.Vector2[float64]
- func (r QuadraticCurveRecord) GetStart() math2.Vector2[float64]
- func (r QuadraticCurveRecord) IsFlat() bool
- func (r QuadraticCurveRecord) Reverse() Record
- func (r QuadraticCurveRecord) SameType(other Record) bool
- func (r QuadraticCurveRecord) String() string
- func (r QuadraticCurveRecord) ToLineRecords(scale int64) []Record
- type Record
- type RecordPair
Constants ¶
View Source
const BezierCurveAngleTolerance = 0.4
View Source
const BezierCurveAngleToleranceEpsilon = 0.01
View Source
const BezierCurveCollinearityEpsilon = 1e-30
View Source
const BezierRecursionLimit = 32
Variables ¶
This section is empty.
Functions ¶
Types ¶
type CubicCurveRecord ¶
type CubicCurveRecord struct {
Control1, Control2 math2.Vector2[float64]
Anchor math2.Vector2[float64]
Start math2.Vector2[float64]
}
func CubicCurveFromQuadraticRecord ¶
func CubicCurveFromQuadraticRecord(q QuadraticCurveRecord) CubicCurveRecord
func (CubicCurveRecord) ApplyMatrixTransform ¶
func (r CubicCurveRecord) ApplyMatrixTransform(transform math2.MatrixTransform, applyTranslation bool) Record
func (CubicCurveRecord) BoundingBox ¶
func (r CubicCurveRecord) BoundingBox() (topLeft, bottomRight math2.Vector2[float64])
func (CubicCurveRecord) Equals ¶
func (r CubicCurveRecord) Equals(other Record) bool
func (CubicCurveRecord) IsFlat ¶
func (r CubicCurveRecord) IsFlat() bool
func (CubicCurveRecord) Reverse ¶
func (r CubicCurveRecord) Reverse() Record
func (CubicCurveRecord) SameType ¶
func (r CubicCurveRecord) SameType(other Record) bool
func (CubicCurveRecord) String ¶
func (r CubicCurveRecord) String() string
func (CubicCurveRecord) ToLineRecords ¶
func (r CubicCurveRecord) ToLineRecords(scale int64) []Record
func (CubicCurveRecord) ToSingleQuadraticRecord ¶
func (r CubicCurveRecord) ToSingleQuadraticRecord() (QuadraticCurveRecord, bool)
ToSingleQuadraticRecord Finds if Cubic curve is a perfect fit of a Quadratic curve (aka, it was upconverted)
type CubicSplineCurveRecord ¶
type CubicSplineCurveRecord struct { Control []math.Vector2[float64] Anchor math.Vector2[float64] Start math.Vector2[float64] }
func (CubicSplineCurveRecord) ApplyMatrixTransform ¶
func (r CubicSplineCurveRecord) ApplyMatrixTransform(transform math.MatrixTransform, applyTranslation bool) Record
func (CubicSplineCurveRecord) BoundingBox ¶
func (r CubicSplineCurveRecord) BoundingBox() (topLeft, bottomRight math.Vector2[float64])
func (CubicSplineCurveRecord) Equals ¶
func (r CubicSplineCurveRecord) Equals(other Record) bool
func (CubicSplineCurveRecord) GetEnd ¶
func (r CubicSplineCurveRecord) GetEnd() math.Vector2[float64]
func (CubicSplineCurveRecord) GetStart ¶
func (r CubicSplineCurveRecord) GetStart() math.Vector2[float64]
func (CubicSplineCurveRecord) IsFlat ¶
func (r CubicSplineCurveRecord) IsFlat() bool
func (CubicSplineCurveRecord) Reverse ¶
func (r CubicSplineCurveRecord) Reverse() Record
func (CubicSplineCurveRecord) SameType ¶
func (r CubicSplineCurveRecord) SameType(other Record) bool
func (CubicSplineCurveRecord) String ¶
func (r CubicSplineCurveRecord) String() string
type CurvedRecord ¶
type LineRecord ¶
func (LineRecord) ApplyMatrixTransform ¶
func (r LineRecord) ApplyMatrixTransform(transform math.MatrixTransform, applyTranslation bool) Record
func (LineRecord) BoundingBox ¶
func (r LineRecord) BoundingBox() (topLeft, bottomRight math.Vector2[float64])
func (LineRecord) Equals ¶
func (r LineRecord) Equals(other Record) bool
func (LineRecord) IsFlat ¶
func (r LineRecord) IsFlat() bool
func (LineRecord) Reverse ¶
func (r LineRecord) Reverse() Record
func (LineRecord) SameType ¶
func (r LineRecord) SameType(other Record) bool
func (LineRecord) String ¶
func (r LineRecord) String() string
type MoveRecord ¶
func (MoveRecord) ApplyMatrixTransform ¶
func (r MoveRecord) ApplyMatrixTransform(transform math.MatrixTransform, applyTranslation bool) Record
func (MoveRecord) BoundingBox ¶
func (r MoveRecord) BoundingBox() (topLeft, bottomRight math.Vector2[float64])
func (MoveRecord) Equals ¶
func (r MoveRecord) Equals(other Record) bool
func (MoveRecord) IsFlat ¶
func (r MoveRecord) IsFlat() bool
func (MoveRecord) Reverse ¶
func (r MoveRecord) Reverse() Record
func (MoveRecord) SameType ¶
func (r MoveRecord) SameType(other Record) bool
func (MoveRecord) String ¶
func (r MoveRecord) String() string
type QuadraticCurveRecord ¶
type QuadraticCurveRecord struct { Control math2.Vector2[float64] Anchor math2.Vector2[float64] Start math2.Vector2[float64] }
func QuadraticCurveFromLineRecord ¶
func QuadraticCurveFromLineRecord(l LineRecord) QuadraticCurveRecord
func (QuadraticCurveRecord) ApplyMatrixTransform ¶
func (r QuadraticCurveRecord) ApplyMatrixTransform(transform math2.MatrixTransform, applyTranslation bool) Record
func (QuadraticCurveRecord) BoundingBox ¶
func (r QuadraticCurveRecord) BoundingBox() (topLeft, bottomRight math2.Vector2[float64])
func (QuadraticCurveRecord) Equals ¶
func (r QuadraticCurveRecord) Equals(other Record) bool
func (QuadraticCurveRecord) GetStart ¶
func (r QuadraticCurveRecord) GetStart() math2.Vector2[float64]
func (QuadraticCurveRecord) IsFlat ¶
func (r QuadraticCurveRecord) IsFlat() bool
func (QuadraticCurveRecord) Reverse ¶
func (r QuadraticCurveRecord) Reverse() Record
func (QuadraticCurveRecord) SameType ¶
func (r QuadraticCurveRecord) SameType(other Record) bool
func (QuadraticCurveRecord) String ¶
func (r QuadraticCurveRecord) String() string
func (QuadraticCurveRecord) ToLineRecords ¶
func (r QuadraticCurveRecord) ToLineRecords(scale int64) []Record
type Record ¶
type Record interface { GetStart() math.Vector2[float64] GetEnd() math.Vector2[float64] Reverse() Record Equals(other Record) bool SameType(other Record) bool ApplyMatrixTransform(transform math.MatrixTransform, applyTranslation bool) Record BoundingBox() (topLeft, bottomRight math.Vector2[float64]) IsFlat() bool String() string }
func FlattenRecord ¶
func LerpRecord ¶
type RecordPair ¶
type RecordPair [2]Record
Click to show internal directories.
Click to hide internal directories.