Versions in this module Expand all Collapse all v0 v0.2.2 Feb 13, 2024 v0.2.1 Feb 11, 2024 v0.2.0 Feb 11, 2024 v0.1.0 Jan 2, 2024 v0.0.6 Jan 2, 2024 v0.0.5 Mar 16, 2023 v0.0.4 Nov 28, 2022 Changes in this version + func FormatStrideForWidth(format Format, width int) int + type Antialias int + const AntialiasBest + const AntialiasDefault + const AntialiasFast + const AntialiasGood + const AntialiasGray + const AntialiasNone + const AntialiasSubpixel + type Content int + const ContentAlpha + const ContentColor + const ContentColorAlpha + type Context struct + func Create(target *Surface) *Context + func WrapContext(p uintptr) *Context + func (v *Context) Antialias() Antialias + func (v *Context) Arc(xc, yc, radius, angle1, angle2 float64) + func (v *Context) ArcNegative(xc, yc, radius, angle1, angle2 float64) + func (v *Context) Clip() + func (v *Context) ClipExtents() (x1, y1, x2, y2 float64) + func (v *Context) ClipPreserve() + func (v *Context) Close() + func (v *Context) ClosePath() + func (v *Context) CopyPage() + func (v *Context) CurrentPoint() (x, y float64) + func (v *Context) CurveTo(x1, y1, x2, y2, x3, y3 float64) + func (v *Context) Dash() (dashes []float64, offset float64) + func (v *Context) DashCount() int + func (v *Context) DeviceToUser(x, y float64) (float64, float64) + func (v *Context) DeviceToUserDistance(x, y float64) (float64, float64) + func (v *Context) Fill() + func (v *Context) FillExtents() (x1, y1, x2, y2 float64) + func (v *Context) FillPreserve() + func (v *Context) FillRule() FillRule + func (v *Context) FontExtents() FontExtents + func (v *Context) GroupTarget() *Surface + func (v *Context) IdentityMatrix() + func (v *Context) InClip(x, y float64) bool + func (v *Context) InFill(x, y float64) bool + func (v *Context) InStroke(x, y float64) bool + func (v *Context) LineCap() LineCap + func (v *Context) LineJoin() LineJoin + func (v *Context) LineTo(x, y float64) + func (v *Context) LineWidth() float64 + func (v *Context) MaskSurface(surface *Surface, surfaceX, surfaceY float64) + func (v *Context) Matrix() *Matrix + func (v *Context) MiterLimit() float64 + func (v *Context) MoveTo(x, y float64) + func (v *Context) Native() uintptr + func (v *Context) NewPath() + func (v *Context) NewSubPath() + func (v *Context) Operator() Operator + func (v *Context) Paint() + func (v *Context) PaintWithAlpha(alpha float64) + func (v *Context) PopGroupToSource() + func (v *Context) PushGroup() + func (v *Context) PushGroupWithContent(content Content) + func (v *Context) Rectangle(x, y, w, h float64) + func (v *Context) ResetClip() + func (v *Context) Restore() + func (v *Context) Rotate(angle float64) + func (v *Context) Save() + func (v *Context) Scale(sx, sy float64) + func (v *Context) SelectFontFace(family string, slant FontSlant, weight FontWeight) + func (v *Context) SetAntialias(antialias Antialias) + func (v *Context) SetDash(dashes []float64, offset float64) + func (v *Context) SetFillRule(fillRule FillRule) + func (v *Context) SetFontSize(size float64) + func (v *Context) SetLineCap(lineCap LineCap) + func (v *Context) SetLineJoin(lineJoin LineJoin) + func (v *Context) SetLineWidth(width float64) + func (v *Context) SetMatrix(matrix *Matrix) + func (v *Context) SetMiterLimit(limit float64) + func (v *Context) SetOperator(op Operator) + func (v *Context) SetSource(p *Pattern) + func (v *Context) SetSourceRGB(red, green, blue float64) + func (v *Context) SetSourceRGBA(red, green, blue, alpha float64) + func (v *Context) SetSourceSurface(surface *Surface, x, y float64) + func (v *Context) SetTolerance(tolerance float64) + func (v *Context) ShowPage() + func (v *Context) ShowText(utf8 string) + func (v *Context) Status() Status + func (v *Context) Stroke() + func (v *Context) StrokeExtents() (x1, y1, x2, y2 float64) + func (v *Context) StrokePreserve() + func (v *Context) Target() *Surface + func (v *Context) TextExtents(utf8 string) TextExtents + func (v *Context) Tolerance() float64 + func (v *Context) Transform(matrix *Matrix) + func (v *Context) Translate(tx, ty float64) + func (v *Context) UserToDevice(x, y float64) (float64, float64) + func (v *Context) UserToDeviceDistance(dx, dy float64) (float64, float64) + type FillRule int + const FillRuleEvenOdd + const FillRuleWinding + type Filter int + const FilterBest + const FilterBilinear + const FilterFast + const FilterGaussian + const FilterGood + const FilterNearest + type FontExtents struct + Ascent float64 + Descent float64 + Height float64 + MaxXAdvance float64 + MaxYAdvance float64 + type FontOptions struct + func CreateFontOptions() *FontOptions + func (o *FontOptions) Antialias() Antialias + func (o *FontOptions) Copy() *FontOptions + func (o *FontOptions) Equal(other *FontOptions) bool + func (o *FontOptions) Hash() uint32 + func (o *FontOptions) HintMetrics() HintMetrics + func (o *FontOptions) HintStyle() HintStyle + func (o *FontOptions) Merge(other *FontOptions) + func (o *FontOptions) SetAntialias(antialias Antialias) + func (o *FontOptions) SetHintMetrics(hintMetrics HintMetrics) + func (o *FontOptions) SetHintStyle(hintStyle HintStyle) + func (o *FontOptions) SetSubpixelOrder(subpixelOrder SubpixelOrder) + func (o *FontOptions) SetVariations(variations string) + func (o *FontOptions) Status() Status + func (o *FontOptions) SubpixelOrder() SubpixelOrder + func (o *FontOptions) Variations() string + type FontSlant int + const FontSlantItalic + const FontSlantNormal + const FontSlantOblique + type FontWeight int + const FontWeightBold + const FontWeightNormal + type Format int + const FormatA1 + const FormatA8 + const FormatARGB32 + const FormatInvalid + const FormatRGB16_565 + const FormatRGB24 + const FormatRGB30 + type HintMetrics int + const HintMetricsDefault + const HintMetricsOff + const HintMetricsOn + type HintStyle int + const HintStyleDefault + const HintStyleFull + const HintStyleMedium + const HintStyleNone + const HintStyleSlight + type LineCap int + const LineCapButt + const LineCapRound + const LineCapSquare + type LineJoin int + const LineJoinBevel + const LineJoinMiter + const LineJoinRound + type Matrix struct + X0 float64 + Xx float64 + Xy float64 + Y0 float64 + Yx float64 + Yy float64 + func NewMatrix(xx, yx, xy, yy, x0, y0 float64) *Matrix + func (m *Matrix) InitIdentity() + func (m *Matrix) InitRotate(radians float64) + func (m *Matrix) InitScale(sx, sy float64) + func (m *Matrix) InitTranslate(tx, ty float64) + func (m *Matrix) Invert() + func (m *Matrix) Multiply(a, b Matrix) + func (m *Matrix) Native() uintptr + func (m *Matrix) Rotate(radians float64) + func (m *Matrix) Scale(sx, sy float64) + func (m *Matrix) TransformDistance(dx, dy float64) (float64, float64) + func (m *Matrix) TransformPoint(x, y float64) (float64, float64) + func (m *Matrix) Translate(tx, ty float64) + type MimeType string + const MIMETypeJP2 + const MIMETypeJPEG + const MIMETypePNG + const MIMETypeURI + const MIMETypeUniqueID + type Operator int + const OperatorAdd + const OperatorAtop + const OperatorClear + const OperatorColorBurn + const OperatorColorDodge + const OperatorDarken + const OperatorDest + const OperatorDestAtop + const OperatorDestIn + const OperatorDestOut + const OperatorDestOver + const OperatorDifference + const OperatorExclusion + const OperatorHSLColor + const OperatorHSLHue + const OperatorHSLLuminosity + const OperatorHSLSaturation + const OperatorHardLight + const OperatorIn + const OperatorLighten + const OperatorMultiply + const OperatorOut + const OperatorOver + const OperatorOverlay + const OperatorSaturate + const OperatorScreen + const OperatorSoftLight + const OperatorSource + const OperatorXOR + type Pattern struct + func NewPatternForSurface(s *Surface) (*Pattern, error) + func NewPatternFromRGB(red, green, blue float64) (*Pattern, error) + func NewPatternFromRGBA(red, green, blue, alpha float64) (*Pattern, error) + func NewPatternLinear(x0, y0, x1, y1 float64) (*Pattern, error) + func NewPatternRadial(x0, y0, r0, x1, y1, r1 float64) (*Pattern, error) + func (v *Pattern) AddColorStopRGB(offset, red, green, blue float64) error + func (v *Pattern) AddColorStopRGBA(offset, red, green, blue, alpha float64) error + func (v *Pattern) Native() uintptr + func (v *Pattern) PatternGetFilter() Filter + func (v *Pattern) PatternSetFilter(filter Filter) + func (v *Pattern) Status() Status + type Rectangle struct + Height int + Width int + X int + Y int + func RectangleNew(x, y, width, height int) *Rectangle + type Region struct + func RegionCreate() (*Region, error) + func (v *Region) ContainsPoint(x, y int) bool + func (v *Region) ContainsRectangle(rectangle *Rectangle) RegionOverlap + func (v *Region) Copy() (*Region, error) + func (v *Region) CreateRectangle(rectangle *Rectangle) (*Region, error) + func (v *Region) CreateRectangles(rectangles ...*Rectangle) (*Region, error) + func (v *Region) Equal(region *Region) bool + func (v *Region) Extents(extents *Rectangle) + func (v *Region) Intersect(other *Region) (*Region, error) + func (v *Region) IntersectRectangle(rectangle *Rectangle) (*Region, error) + func (v *Region) IsEmpty() bool + func (v *Region) Native() uintptr + func (v *Region) NumRectangles() int + func (v *Region) Rectangle(nth int) *Rectangle + func (v *Region) Status() Status + func (v *Region) Substract(other *Region) (*Region, error) + func (v *Region) SubstractRectangle(rectangle *Rectangle) (*Region, error) + func (v *Region) Translate(dx, dy int) + func (v *Region) Union(other *Region) (*Region, error) + func (v *Region) UnionRectangle(rectangle *Rectangle) (*Region, error) + func (v *Region) Xor(other *Region) (*Region, error) + func (v *Region) XorRectangle(rectangle *Rectangle) (*Region, error) + type RegionOverlap int + const RegionOverlapIn + const RegionOverlapOut + const RegionOverlapPart + type Status int + const StatusClipNotRepresentable + const StatusDeviceError + const StatusDeviceTypeMismatch + const StatusFileNotFound + const StatusFontTypeMismatch + const StatusInvalidClusters + const StatusInvalidContent + const StatusInvalidDSCComment + const StatusInvalidDash + const StatusInvalidFormat + const StatusInvalidIndex + const StatusInvalidMatrix + const StatusInvalidPathData + const StatusInvalidPopGroup + const StatusInvalidRestore + const StatusInvalidSize + const StatusInvalidSlant + const StatusInvalidStatus + const StatusInvalidStride + const StatusInvalidString + const StatusInvalidVisual + const StatusInvalidWeight + const StatusNegativeCount + const StatusNoCurrentPoint + const StatusNoMemory + const StatusNullPointer + const StatusPatternTypeMismatch + const StatusReadError + const StatusSuccess + const StatusSurfaceFinished + const StatusSurfaceTypeMismatch + const StatusTempFileError + const StatusUserFontError + const StatusUserFontImmutable + const StatusUserFontNotImplemented + const StatusWriteError + func (s Status) Error() string + func (s Status) String() string + func (s Status) ToError() error + type SubpixelOrder int + const SubpixelOrderBGR + const SubpixelOrderDefault + const SubpixelOrderRGB + const SubpixelOrderVBGR + const SubpixelOrderVRGB + type Surface struct + func CreateImageSurface(format Format, width, height int) *Surface + func CreateImageSurfaceForData(data []byte, format Format, width, height, stride int) *Surface + func CreatePDFSurface(fileName string, width float64, height float64) (*Surface, error) + func CreatePNGSurfaceFromPNG(fileName string) (*Surface, error) + func CreateSurfaceFromImage(img image.Image) *Surface + func NewSurface(s uintptr, needsRef bool) *Surface + func WrapSurface(s uintptr) *Surface + func (v *Surface) Close() + func (v *Surface) CopyPage() + func (v *Surface) CreateForRectangle(x, y, width, height float64) *Surface + func (v *Surface) CreateSimilar(content Content, width, height int) *Surface + func (v *Surface) Data() []byte + func (v *Surface) DeviceOffset() (x, y float64) + func (v *Surface) FallbackResolution() (xPPI, yPPI float64) + func (v *Surface) Flush() + func (v *Surface) HasShowTextGlyphs() bool + func (v *Surface) Height() int + func (v *Surface) MarkDirty() + func (v *Surface) MarkDirtyRectangle(x, y, width, height int) + func (v *Surface) MimeData(mimeType MimeType) []byte + func (v *Surface) Native() uintptr + func (v *Surface) SetDeviceOffset(x, y float64) + func (v *Surface) SetFallbackResolution(xPPI, yPPI float64) + func (v *Surface) ShowPage() + func (v *Surface) Status() Status + func (v *Surface) Stride() int + func (v *Surface) Type() SurfaceType + func (v *Surface) Width() int + func (v *Surface) WriteToPNG(fileName string) error + func (v *Surface) WriteToPNGWriter(w io.Writer) error + type SurfaceType int + const SurfaceTypeBeOS + const SurfaceTypeDRM + const SurfaceTypeDirectFB + const SurfaceTypeGL + const SurfaceTypeGlitz + const SurfaceTypeImage + const SurfaceTypeOS2 + const SurfaceTypePDF + const SurfaceTypePS + const SurfaceTypeQt + const SurfaceTypeQuartz + const SurfaceTypeQuartzImage + const SurfaceTypeRecording + const SurfaceTypeSKia + const SurfaceTypeSVG + const SurfaceTypeScript + const SurfaceTypeSubsurface + const SurfaceTypeTee + const SurfaceTypeVG + const SurfaceTypeWin32 + const SurfaceTypeWin32Printing + const SurfaceTypeXCB + const SurfaceTypeXML + const SurfaceTypeXlib + type TextExtents struct + Height float64 + Width float64 + XAdvance float64 + XBearing float64 + YAdvance float64 + YBearing float64