Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/tdewolff/canvas
/ functions
Functions
1,447 in github.com/tdewolff/canvas
⨍
Functions
1,447
◇
Types & classes
214
Method
CubeTo
CubeTo adds a cubic Bézier path with control points (cpx1,cpy1) and (cpx2,cpy2) and end point (x,y).
canvas.go:516
Method
Curvature
Curvature returns the curvature of the path at the given segment and t in [0.0,1.0] along that path. It is zero for straight lines and for non-existin
path.go:836
Method
DPI
DPI returns the resolution in dots-per-inch.
canvas.go:38
Method
Data
Data returns the raw path data.
path.go:147
Method
Decode
(b []byte)
cmd/pdftext/encoding.go:33
Method
Decode
(b []byte)
cmd/pdftext/encoding.go:48
Method
Decode
(b []byte)
cmd/pdftext/encoding.go:63
Method
Decode
(b []byte)
cmd/pdftext/encoding.go:92
Method
Decorate
Decorate will return the decoration path over a given width in millimeters.
font.go:770
Method
Decorate
(r Renderer, m Matrix, face *FontFace, text *Path, w float64)
font.go:817
Method
Decorate
(r Renderer, m Matrix, face *FontFace, text *Path, w float64)
font.go:855
Method
Decorate
(r Renderer, m Matrix, face *FontFace, text *Path, w float64)
font.go:892
Method
Decorate
(r Renderer, m Matrix, face *FontFace, text *Path, w float64)
font.go:930
Method
Decorate
(r Renderer, m Matrix, face *FontFace, text *Path, w float64)
font.go:970
Method
Decorate
(r Renderer, m Matrix, face *FontFace, text *Path, w float64)
font.go:1020
Method
Decorate
(r Renderer, m Matrix, face *FontFace, text *Path, w float64)
font.go:1065
Method
Decorate
(r Renderer, m Matrix, face *FontFace, text *Path, w float64)
font.go:1122
Method
Decorate
(r Renderer, m Matrix, face *FontFace, text *Path, w float64)
font.go:1178
Method
Decorate
(r Renderer, m Matrix, face *FontFace, text *Path, w float64)
font.go:1248
Method
Destroy
Destroy should be called when using HarfBuzz to free the C resources.
font.go:373
Method
Destroy
Destroy destroys the allocated C memory.
text/harfbuzz.go:49
Method
Destroy
Destroy destroys the allocated C memory.
text/harfbuzz_cgo.go:56
Method
DistanceToPoint
DistanceToPoint returns the distance between the rectangle and a point.
util.go:518
Method
Div
Div returns the boolean path operation of path p DIV q, i.e. p divided by q. It removes all self-intersections and overlapping areas, orients all fill
path_intersection.go:215
Method
Div
Div is the same as Path.DivideBy, but faster if paths are already split. Each resulting path is a single filling path followed by its holes as subpath
path_intersection.go:221
Method
Dot
Dot returns the dot product between the matrix and the given vector, i.e. applying the transformation.
util.go:640
Method
Draw
(p canvasFont.Pather, x, y float64, cid uint32)
latex.go:316
Method
Draw
()
renderers/opengl/opengl.go:107
Method
DrawImage
DrawImage draws the image, scaled to fit the destination rectangle.
renderers/gonumplot.go:182
Function
EmbeddingLevels
EmbeddingLevels returns the embedding levels for each rune of a mixed LTR/RTL string. A change in level means a change in direction.
text/fribidi_cgo.go:16
Method
Empty
()
path.go:106
Method
Encode
(b []byte)
cmd/pdftext/encoding.go:29
Method
Encode
(b []byte)
cmd/pdftext/encoding.go:44
Method
Encode
(b []byte)
cmd/pdftext/encoding.go:59
Method
Encode
(b []byte)
cmd/pdftext/encoding.go:76
Method
Equals
Equals returns true if all interior points of one are interior of the other, and the same for exterior points.
path_intersection.go:2458
Method
Equals
Equals returns true when two font face are equal.
font.go:634
Method
Equals
Equals returns true if rectangles are equal with tolerance Epsilon.
util.go:424
Method
Equals
Equals returns true if both matrices are equal with a tolerance of Epsilon.
util.go:850
Method
Expand
Expand expands the rectangle.
util.go:469
Method
Fill
Fill fills the current path and resets the path.
canvas.go:536
Method
Fill
Fill fills the given path.
renderers/gonumplot.go:135
Method
FillString
FillString fills in text at the specified location using the given font. If the font size is zero, the text is not drawn.
renderers/gonumplot.go:143
Method
FillStroke
FillStroke fills and then strokes the current path and resets the path.
canvas.go:558
Method
FillStroke
FillStroke fills and strokes a path.
renderers/gochart.go:149
Function
FindLocalFont
FindLocalFont finds the path to a font from the system's fonts.
font.go:184
Method
FitImage
FitImage fits an image to a rectangle using different fit strategies.
canvas.go:566
Method
Fonts
Fonts returns the list of fonts used.
text.go:1128
Method
FromLinear
(color.Color)
colors.go:280
Method
FromLinear
FromLinear decodes color from color space.
colors.go:299
Method
FromLinear
FromLinear decodes color from color space.
colors.go:328
Method
FromLinear
FromLinear decodes color from color space.
colors.go:369
Method
FromUnicode
(s string)
cmd/pdftext/encoding.go:147
Method
FromUnicode
(s string)
cmd/pdftext/encoding.go:214
Function
Fuzz
Fuzz is a fuzz test.
tests/latex/main.go:8
Function
Fuzz
Fuzz is a fuzz test.
tests/svg/main.go:8
Method
Get
Get maps a glyphID of the original font to the subsetted font. If the glyphID is not subsetted, it will be added to the map.
font.go:161
Method
Get
(name string, scale float64)
latex.go:116
Method
GetDPI
GetDPI gets the DPI for the renderer.
renderers/gochart.go:62
Method
GetPages
()
cmd/pdftext/reader.go:424
Method
GobDecode
GobDecode implements the gob interface.
path.go:162
Method
GobEncode
GobEncode implements the gob interface.
path.go:152
Function
Grid
Grid returns a stroked grid of width w and height h, with grid line thickness r, and the number of cells horizontally and vertically as nx and ny resp
shapes.go:183
Method
Gridsnap
Gridsnap snaps all vertices to a grid with the given spacing. This will significantly reduce numerical issues e.g. for path boolean operations. This o
path_simplify.go:9
Method
Hadamard
Hadamard returns the Hadamard product, or the element-wise product, of the point.
util.go:299
Method
Has
Has returns true if there are secant/tangent intersections.
path_intersection_util.go:123
Method
Has
Has returns true if paint has a color or pattern.
canvas.go:125
Method
Has
(r rune)
cmd/pdftext/encoding.go:24
Method
Has
(r rune)
cmd/pdftext/encoding.go:39
Method
Has
(r rune)
cmd/pdftext/encoding.go:54
Method
Has
(r rune)
cmd/pdftext/encoding.go:72
Method
HasDecoration
HasDecoration returns true if the font face has decorations enabled.
font.go:644
Method
HasScaling
HasScaling is true if the matrix contains a scaling component.
util.go:818
Method
HasSecant
HasSecant returns true when there are secant intersections, i.e. the curves intersect and cross (they cut).
path_intersection_util.go:128
Method
HasSubpaths
HasSubpaths returns true when path p has subpaths. TODO: naming right? A simple path would not self-intersect. Add IsXMonotone and IsFlat as well?
path.go:258
Method
HasTangent
HasTangent returns true when there are tangent intersections, i.e. the curves intersect but don't cross (they touch).
path_intersection_util.go:138
Method
HasTranslation
HasTranslation is true if the matrix contains a translational component.
util.go:803
Method
Heights
Heights returns the top and bottom position of the first and last line respectively.
text.go:1086
Method
InterpolateX
(q Point, x float64)
util.go:355
Method
InterpolateY
(q Point, y float64)
util.go:359
Method
Intersections
Intersections returns a list of points of all intersections of path p with q. The intersection can be tangent (touch) or secant (cross). If the two pa
path_intersection.go:235
Method
IsDir
IsDir return file whether a directory
examples/html-canvas/files.go:73
Method
IsFlat
IsFlat returns true if the path consists of solely line segments, that is only MoveTo, LineTo and Close commands.
path.go:1436
Method
IsIdentity
()
util.go:798
Method
IsRotation
IsRotation is true if the matrix consists of only rotational components, i.e. no scaling or skew transformations (but may translate).
util.go:823
Method
IsScaling
IsScaling is true if the matrix consists of only scaling components, i.e. no rotation, or skew transformations (but may translate).
util.go:813
Method
Join
Join adds a join to a right-hand-side and left-hand-side path, of width 2*halfWidth, around a pivot point with starting and ending normals of n0 and n
path_stroke.go:88
Method
Join
Join adds a join to a right-hand-side and left-hand-side path, of width 2*halfWidth, around a pivot point with starting and ending normals of n0 and n
path_stroke.go:106
Method
Join
Join adds a join to a right-hand-side and left-hand-side path, of width 2*halfWidth, around a pivot point with starting and ending normals of n0 and n
path_stroke.go:134
Method
Join
Join adds a join to a right-hand-side and left-hand-side path, of width 2*halfWidth, around a pivot point with starting and ending normals of n0 and n
path_stroke.go:217
Function
LCHGradient
LCHGradient 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:127
Method
Len
()
path_intersection.go:1613
Method
Len
Len returns the number of segments.
polyline.go:26
Method
Less
(i, j int)
path_intersection.go:1617
Method
Less
(i, j int)
cmd/pdftext/writer.go:44
Method
LineHeight
LineHeight returns the height (ascent+descent) of a line.
font.go:694
Method
LineTo
LineTo adds a linear path to (x,y).
canvas.go:506
Method
Linebreak
Linebreak breaks a list of items using a greedy line breaking algorithm. This is much faster than Knuth's algorithm.
text.go:627
Method
Linebreak
Linebreak breaks a list of items using a greedy line breaking algorithm. This is much faster than Knuth's algorithm.
text.go:642
Function
LinebreakGlyphs
LinebreakGlyphs breaks a slice of glyphs uing the given SFNT font and font size. The indent and width specify the first line's indentation and the max
text/linebreak.go:868
← previous
next →
901–1,000 of 1,447, ranked by callers