Versions in this module Expand all Collapse all v1 v1.2.0 Aug 8, 2023 v1.1.0 Aug 8, 2023 Changes in this version + func DrawBezierPathWithCreator(bpath CubicBezierPath, creator *pdfcontent.ContentCreator) + func DrawPathWithCreator(path Path, creator *pdfcontent.ContentCreator) + type BasicLine struct + LineColor *pdf.PdfColorDeviceRGB + LineStyle LineStyle + LineWidth float64 + Opacity float64 + X1 float64 + X2 float64 + Y1 float64 + Y2 float64 + func (line BasicLine) Draw(gsName string) ([]byte, *pdf.PdfRectangle, error) + type BoundingBox struct + Height float64 + Width float64 + X float64 + Y float64 + type Circle struct + BorderColor *pdf.PdfColorDeviceRGB + BorderEnabled bool + BorderWidth float64 + FillColor *pdf.PdfColorDeviceRGB + FillEnabled bool + Height float64 + Opacity float64 + Width float64 + X float64 + Y float64 + func (c Circle) Draw(gsName string) ([]byte, *pdf.PdfRectangle, error) + type CubicBezierCurve struct + P0 Point + P1 Point + P2 Point + P3 Point + func NewCubicBezierCurve(x0, y0, x1, y1, x2, y2, x3, y3 float64) CubicBezierCurve + func (curve CubicBezierCurve) AddOffsetXY(offX, offY float64) CubicBezierCurve + func (curve CubicBezierCurve) GetBounds() model.PdfRectangle + type CubicBezierPath struct + Curves []CubicBezierCurve + func NewCubicBezierPath() CubicBezierPath + func (p CubicBezierPath) AppendCurve(curve CubicBezierCurve) CubicBezierPath + func (p CubicBezierPath) Copy() CubicBezierPath + func (p CubicBezierPath) GetBoundingBox() Rectangle + func (p CubicBezierPath) Offset(offX, offY float64) CubicBezierPath + type Line struct + LineColor *pdf.PdfColorDeviceRGB + LineEndingStyle1 LineEndingStyle + LineEndingStyle2 LineEndingStyle + LineStyle LineStyle + LineWidth float64 + Opacity float64 + X1 float64 + X2 float64 + Y1 float64 + Y2 float64 + func (line Line) Draw(gsName string) ([]byte, *pdf.PdfRectangle, error) + type LineEndingStyle int + const LineEndingStyleArrow + const LineEndingStyleButt + const LineEndingStyleNone + type LineStyle int + const LineStyleDashed + const LineStyleSolid + type Path struct + Points []Point + func NewPath() Path + func (p Path) AppendPoint(point Point) Path + func (p Path) Copy() Path + func (p Path) GetBoundingBox() BoundingBox + func (p Path) GetPointNumber(number int) Point + func (p Path) Length() int + func (p Path) Offset(offX, offY float64) Path + func (p Path) RemovePoint(number int) Path + type Point struct + X float64 + Y float64 + func NewPoint(x, y float64) Point + func (p Point) Add(dx, dy float64) Point + func (p Point) AddVector(v Vector) Point + func (p Point) Rotate(theta float64) Point + func (p Point) String() string + type Rectangle struct + BorderColor *pdf.PdfColorDeviceRGB + BorderEnabled bool + BorderWidth float64 + FillColor *pdf.PdfColorDeviceRGB + FillEnabled bool + Height float64 + Opacity float64 + Width float64 + X float64 + Y float64 + func (rect Rectangle) Draw(gsName string) ([]byte, *pdf.PdfRectangle, error) + type Vector struct + Dx float64 + Dy float64 + func NewVector(dx, dy float64) Vector + func NewVectorBetween(a Point, b Point) Vector + func NewVectorPolar(length float64, theta float64) Vector + func (v Vector) Add(other Vector) Vector + func (v Vector) Flip() Vector + func (v Vector) FlipX() Vector + func (v Vector) FlipY() Vector + func (v Vector) GetPolarAngle() float64 + func (v Vector) Magnitude() float64 + func (v Vector) Rotate(phi float64) Vector + func (v Vector) Scale(factor float64) Vector