MCPcopy Create free account

hub / github.com/tdewolff/canvas / functions

Functions1,447 in github.com/tdewolff/canvas

FunctionLoadLocalFont
LoadLocalFont loads a font from the system's fonts.
font.go:239
MethodLoadLocalFont
LoadLocalFont loads a font from the system's fonts.
font.go:399
FunctionLookupScript
(r rune)
text/harfbuzz_cgo.go:153
MethodMeasureText
MeasureText measures text.
renderers/gochart.go:200
MethodMoveTo
MoveTo moves the path to (x,y) without connecting with the previous path. It starts a new independent subpath. Multiple subpaths can be useful when ne
canvas.go:501
MethodMustLoadFont
MustLoadFont loads a font from memory. It panics on error.
font.go:476
MethodMustLoadFontCollection
MustLoadFontCollection loads a font from a collection file and uses the font at the specified index. It panics on error.
font.go:458
MethodMustLoadFontFile
MustLoadFontFile loads a font from a filea and panics on error.
font.go:440
MethodMustLoadLocalFont
MustLoadLocalFont loads a font from the system's fonts and panics on error.
font.go:405
MethodName
Name returns the name of the font family.
font.go:380
MethodName
Name returns the name of the underlying font.
font.go:639
MethodName
Name return file name
examples/html-canvas/files.go:53
FunctionNew
New returns a Gio renderer of fixed size.
renderers/gio/gio.go:25
FunctionNew
New returns a Fyne renderer.
renderers/fyne/fyne.go:16
FunctionNewFromSize
NewFromSize returns a new canvas of given size in millimeters, that records all drawing operations into layers. The canvas can then be rendered to any
canvas.go:735
FunctionNewGradient
()
colors.go:93
FunctionNewGradientImage
(g canvas.Gradient, zp, size image.Point, res canvas.Resolution)
renderers/rasterizer/util.go:37
FunctionNewGrayA
NewGrayA returns a new [GrayA] image with the given bounds.
image/image.go:489
FunctionNewGrayA32
NewGrayA32 returns a new [GrayA32] image with the given bounds.
image/image.go:583
FunctionNewJPEGImage
NewJPEGImage parses a JPEG image.
image/image.go:148
FunctionNewPNGImage
NewPNGImage parses a PNG image
image/image.go:173
MethodNewPage
NewPage starts a new page.
renderers/pdf/writer.go:856
FunctionNewPathFromData
NewPathFromData returns a new path using the raw data.
path.go:136
FunctionNewRGB
NewRGBA returns a new [RGB] image with the given bounds.
image/image.go:276
FunctionNewRGB48
NewRGB48 returns a new [RGB48] image with the given bounds.
image/image.go:389
FunctionNewShaperSFNT
NewShaperSFNT returns a new text shaper using a SFNT structure.
text/harfbuzz_cgo.go:51
FunctionNewStretch
NewStretch returns a Gio renderer that stretches the view to fit the constraints.
renderers/gio/gio.go:59
MethodNext
()
cmd/pdftext/util.go:145
MethodNot
Not is the same as Path.Not, but faster if paths are already split. Each resulting path is a single filling path followed by its holes as subpaths.
path_intersection.go:204
FunctionOKLCHGradient
OKLCHGradient creates a gradient from (t,L,C,H) values with t∈[0,1] the position, L∈[0,1] the lightness, C∈[0,1] the chroma, and H∈[0,360] the hue.
palettes.go:150
MethodOpaque
()
image/image.go:134
MethodOpaque
Opaque scans the entire image and reports whether it is fully opaque.
image/image.go:384
MethodOpaque
Opaque scans the entire image and reports whether it is fully opaque.
image/image.go:471
MethodOpaque
Opaque scans the entire image and reports whether it is fully opaque.
image/image.go:578
FunctionOpaqueModel
(cm color.Model)
color/color.go:5
MethodOr
Or is the same as Path.Or, but faster if paths are already split. Each resulting path is a single filling path followed by its holes as subpaths.
path_intersection.go:170
MethodOutlineBounds
OutlineBounds returns the rectangle that contains the entire text box, i.e. the glyph outlines (slow).
text.go:1118
MethodOverlaps
Overlaps returns true if the interiors of p and q have at least one point in common. Either they have a secant intersection, one path in contained in
path_intersection.go:250
MethodOverlaps
Overlaps returns true if both shapes have some but not all points in common. This is different from the DE-9IM specification since it does not conside
path_intersection.go:2495
FunctionParallelogramCell
ParallelogramCell is a paralellogram cell with sides of length a and b at an angle of rot degrees used for tiling.
path_tiling.go:33
MethodPath
Path returns the current path segment.
path_scanner.go:83
MethodPath
Path returns the current path segment.
path_scanner.go:165
MethodPointClosed
PointClosed returns true if the last subpath of p is a closed path and the close command is a point and not a line.
path.go:252
FunctionPolylineFromPath
PolylineFromPath returns a polyline from the given path by approximating it by linear line segments, i.e. by flattening.
polyline.go:11
FunctionPolylineFromPathCoords
PolylineFromPathCoords returns a polyline from the given path from each of the start/end coordinates of the segments, i.e. converting all non-linear s
polyline.go:16
MethodPos
Pos extracts the translation component as (tx,ty).
util.go:773
MethodPos
Pos returns the current position of the path, which is the end point of the last command.
canvas.go:496
MethodPos
()
cmd/pdftext/util.go:141
MethodPush
(item *itemVW)
path_simplify.go:234
MethodQuadCurveTo
QuadCurveTo draws a quad curve. cx and cy represent the Bézier control points.
renderers/gochart.go:111
MethodQuadTo
QuadTo adds a quadratic Bézier path with control point (cpx,cpy) and end point (x,y).
canvas.go:511
FunctionRGB
RGB returns a color given by red, green, and blue ∈ [0,1].
colors.go:10
FunctionRGBA
RGBA returns a color given by red, green, blue, and alpha ∈ [0,1] (non alpha premultiplied).
colors.go:20
MethodRGBA
()
color/color.go:47
MethodRGBA
()
color/color.go:73
MethodRGBA
()
color/color.go:94
MethodRGBA64At
(x, y int)
image/image.go:217
MethodRGBA64At
(x, y int)
image/image.go:316
FunctionRGBGradient
RGBCradient creates a gradient from (t,R,G,B) values with t∈[0,1] the position, R∈[0,1] the redness, G∈[0,1] the greenness, and B∈[0,1] the blueness.
palettes.go:114
FunctionRectFromPoints
(ps ...Point)
util.go:384
FunctionRectFromSize
(x, y, w, h float64)
util.go:380
FunctionRectangleCell
RectangleCell is a rectangular cell with width a and height b used for tiling.
path_tiling.go:23
MethodRemoveClass
RemoveClass removes a class from the class list.
renderers/svg/svg.go:151
MethodRenderAsPath
(r Renderer, m Matrix, resolution Resolution)
text.go:1233
MethodRenderImage
RenderImage renders an image to the canvas using a transformation matrix.
canvas.go:762
MethodRenderImage
RenderImage renders an image to the canvas using a transformation matrix.
renderers/pdf/pdf.go:260
MethodRenderImage
RenderImage renders an image to the canvas using a transformation matrix.
renderers/ps/ps.go:241
MethodRenderImage
RenderImage renders an image to the canvas using a transformation matrix.
renderers/htmlcanvas/htmlcanvas.go:228
MethodRenderImage
RenderImage renders an image to the canvas using a transformation matrix.
renderers/gio/gio.go:151
MethodRenderImage
RenderImage renders an image to the canvas using a transformation matrix.
renderers/rasterizer/rasterizer.go:180
MethodRenderImage
RenderImage renders an image to the canvas using a transformation matrix.
renderers/tex/tex.go:242
MethodRenderImage
RenderImage renders an image to the canvas using a transformation matrix.
renderers/svg/svg.go:448
FunctionRenderMarkdown
(ctx *Context, rect Rect, text string, opts *MarkdownOptions)
markdown.go:205
MethodRenderPath
RenderPath renders a path to the canvas using a style and a transformation matrix.
canvas.go:745
MethodRenderPath
RenderPath renders a path to the canvas using a style and a transformation matrix.
renderers/pdf/pdf.go:104
MethodRenderPath
RenderPath renders a path to the canvas using a style and a transformation matrix.
renderers/ps/ps.go:169
MethodRenderPath
RenderPath renders a path to the canvas using a style and a transformation matrix.
renderers/htmlcanvas/htmlcanvas.go:91
MethodRenderPath
RenderPath renders a path to the canvas using a style and a transformation matrix.
renderers/gio/gio.go:130
MethodRenderPath
RenderPath renders a path to the canvas using a style and a transformation matrix.
renderers/rasterizer/rasterizer.go:88
MethodRenderPath
RenderPath renders a path to the canvas using a style and a transformation matrix.
renderers/tex/tex.go:186
MethodRenderPath
RenderPath renders a path to the canvas using a style and a transformation matrix.
renderers/svg/svg.go:176
MethodRenderText
RenderText renders a text object to the canvas using a transformation matrix.
canvas.go:754
MethodRenderText
RenderText renders a text object to the canvas using a transformation matrix.
renderers/pdf/pdf.go:229
MethodRenderText
RenderText renders a text object to the canvas using a transformation matrix.
renderers/ps/ps.go:235
MethodRenderText
RenderText renders a text object to the canvas using a transformation matrix.
renderers/htmlcanvas/htmlcanvas.go:194
MethodRenderText
RenderText renders a text object to the canvas using a transformation matrix.
renderers/gio/gio.go:146
MethodRenderText
RenderText renders a text object to the canvas using a transformation matrix.
renderers/rasterizer/rasterizer.go:175
MethodRenderText
RenderText renders a text object to the canvas using a transformation matrix.
renderers/tex/tex.go:236
MethodRenderText
RenderText renders a text object to the canvas using a transformation matrix.
renderers/svg/svg.go:367
MethodRenderTextTo
(r Renderer, m Matrix, resolution Resolution)
text.go:1244
MethodRenderTo
(r Renderer, m Matrix, s string, resolution Resolution)
font.go:775
MethodRenderTo
RenderTo renders the accumulated canvas drawing operations to another renderer.
canvas.go:847
MethodRenderTo
RenderTo tiles the hatch pattern to the clipping path and renders it to the renderer.
patterns.go:130
MethodReset
Reset empties the canvas.
canvas.go:775
MethodResetStyle
ResetStyle resets the draw state to its default (colors, stroke widths, dashes, ...).
canvas.go:484
MethodResetStyle
ResetStyle resets any style related settings of the renderer.
renderers/gochart.go:56
FunctionResourcesLennaPng
()
examples/html-canvas/files.go:151
FunctionRestoreAssets
RestoreAssets restores an asset under the given directory recursively
examples/html-canvas/files.go:311
FunctionRhombusCell
RhombusCell is a rhombus cell with sides of length a at an angle of 120 degrees used for tiling.
path_tiling.go:28
MethodRotateAbout
RotateAbout rotates the view counter clockwise around (x,y) with rot in degrees.
canvas.go:373
← previousnext →1,001–1,100 of 1,447, ranked by callers