MCPcopy Create free account

hub / github.com/tdewolff/canvas / functions

Functions1,447 in github.com/tdewolff/canvas

MethodCubeTo
CubeTo adds a cubic Bézier path with control points (cpx1,cpy1) and (cpx2,cpy2) and end point (x,y).
canvas.go:516
MethodCurvature
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
MethodDPI
DPI returns the resolution in dots-per-inch.
canvas.go:38
MethodData
Data returns the raw path data.
path.go:147
MethodDecode
(b []byte)
cmd/pdftext/encoding.go:33
MethodDecode
(b []byte)
cmd/pdftext/encoding.go:48
MethodDecode
(b []byte)
cmd/pdftext/encoding.go:63
MethodDecode
(b []byte)
cmd/pdftext/encoding.go:92
MethodDecorate
Decorate will return the decoration path over a given width in millimeters.
font.go:770
MethodDecorate
(r Renderer, m Matrix, face *FontFace, text *Path, w float64)
font.go:817
MethodDecorate
(r Renderer, m Matrix, face *FontFace, text *Path, w float64)
font.go:855
MethodDecorate
(r Renderer, m Matrix, face *FontFace, text *Path, w float64)
font.go:892
MethodDecorate
(r Renderer, m Matrix, face *FontFace, text *Path, w float64)
font.go:930
MethodDecorate
(r Renderer, m Matrix, face *FontFace, text *Path, w float64)
font.go:970
MethodDecorate
(r Renderer, m Matrix, face *FontFace, text *Path, w float64)
font.go:1020
MethodDecorate
(r Renderer, m Matrix, face *FontFace, text *Path, w float64)
font.go:1065
MethodDecorate
(r Renderer, m Matrix, face *FontFace, text *Path, w float64)
font.go:1122
MethodDecorate
(r Renderer, m Matrix, face *FontFace, text *Path, w float64)
font.go:1178
MethodDecorate
(r Renderer, m Matrix, face *FontFace, text *Path, w float64)
font.go:1248
MethodDestroy
Destroy should be called when using HarfBuzz to free the C resources.
font.go:373
MethodDestroy
Destroy destroys the allocated C memory.
text/harfbuzz.go:49
MethodDestroy
Destroy destroys the allocated C memory.
text/harfbuzz_cgo.go:56
MethodDistanceToPoint
DistanceToPoint returns the distance between the rectangle and a point.
util.go:518
MethodDiv
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
MethodDiv
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
MethodDot
Dot returns the dot product between the matrix and the given vector, i.e. applying the transformation.
util.go:640
MethodDraw
(p canvasFont.Pather, x, y float64, cid uint32)
latex.go:316
MethodDraw
()
renderers/opengl/opengl.go:107
MethodDrawImage
DrawImage draws the image, scaled to fit the destination rectangle.
renderers/gonumplot.go:182
FunctionEmbeddingLevels
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
MethodEmpty
()
path.go:106
MethodEncode
(b []byte)
cmd/pdftext/encoding.go:29
MethodEncode
(b []byte)
cmd/pdftext/encoding.go:44
MethodEncode
(b []byte)
cmd/pdftext/encoding.go:59
MethodEncode
(b []byte)
cmd/pdftext/encoding.go:76
MethodEquals
Equals returns true if all interior points of one are interior of the other, and the same for exterior points.
path_intersection.go:2458
MethodEquals
Equals returns true when two font face are equal.
font.go:634
MethodEquals
Equals returns true if rectangles are equal with tolerance Epsilon.
util.go:424
MethodEquals
Equals returns true if both matrices are equal with a tolerance of Epsilon.
util.go:850
MethodExpand
Expand expands the rectangle.
util.go:469
MethodFill
Fill fills the current path and resets the path.
canvas.go:536
MethodFill
Fill fills the given path.
renderers/gonumplot.go:135
MethodFillString
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
MethodFillStroke
FillStroke fills and then strokes the current path and resets the path.
canvas.go:558
MethodFillStroke
FillStroke fills and strokes a path.
renderers/gochart.go:149
FunctionFindLocalFont
FindLocalFont finds the path to a font from the system's fonts.
font.go:184
MethodFitImage
FitImage fits an image to a rectangle using different fit strategies.
canvas.go:566
MethodFonts
Fonts returns the list of fonts used.
text.go:1128
MethodFromLinear
(color.Color)
colors.go:280
MethodFromLinear
FromLinear decodes color from color space.
colors.go:299
MethodFromLinear
FromLinear decodes color from color space.
colors.go:328
MethodFromLinear
FromLinear decodes color from color space.
colors.go:369
MethodFromUnicode
(s string)
cmd/pdftext/encoding.go:147
MethodFromUnicode
(s string)
cmd/pdftext/encoding.go:214
FunctionFuzz
Fuzz is a fuzz test.
tests/latex/main.go:8
FunctionFuzz
Fuzz is a fuzz test.
tests/svg/main.go:8
MethodGet
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
MethodGet
(name string, scale float64)
latex.go:116
MethodGetDPI
GetDPI gets the DPI for the renderer.
renderers/gochart.go:62
MethodGetPages
()
cmd/pdftext/reader.go:424
MethodGobDecode
GobDecode implements the gob interface.
path.go:162
MethodGobEncode
GobEncode implements the gob interface.
path.go:152
FunctionGrid
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
MethodGridsnap
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
MethodHadamard
Hadamard returns the Hadamard product, or the element-wise product, of the point.
util.go:299
MethodHas
Has returns true if there are secant/tangent intersections.
path_intersection_util.go:123
MethodHas
Has returns true if paint has a color or pattern.
canvas.go:125
MethodHas
(r rune)
cmd/pdftext/encoding.go:24
MethodHas
(r rune)
cmd/pdftext/encoding.go:39
MethodHas
(r rune)
cmd/pdftext/encoding.go:54
MethodHas
(r rune)
cmd/pdftext/encoding.go:72
MethodHasDecoration
HasDecoration returns true if the font face has decorations enabled.
font.go:644
MethodHasScaling
HasScaling is true if the matrix contains a scaling component.
util.go:818
MethodHasSecant
HasSecant returns true when there are secant intersections, i.e. the curves intersect and cross (they cut).
path_intersection_util.go:128
MethodHasSubpaths
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
MethodHasTangent
HasTangent returns true when there are tangent intersections, i.e. the curves intersect but don't cross (they touch).
path_intersection_util.go:138
MethodHasTranslation
HasTranslation is true if the matrix contains a translational component.
util.go:803
MethodHeights
Heights returns the top and bottom position of the first and last line respectively.
text.go:1086
MethodInterpolateX
(q Point, x float64)
util.go:355
MethodInterpolateY
(q Point, y float64)
util.go:359
MethodIntersections
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
MethodIsDir
IsDir return file whether a directory
examples/html-canvas/files.go:73
MethodIsFlat
IsFlat returns true if the path consists of solely line segments, that is only MoveTo, LineTo and Close commands.
path.go:1436
MethodIsIdentity
()
util.go:798
MethodIsRotation
IsRotation is true if the matrix consists of only rotational components, i.e. no scaling or skew transformations (but may translate).
util.go:823
MethodIsScaling
IsScaling is true if the matrix consists of only scaling components, i.e. no rotation, or skew transformations (but may translate).
util.go:813
MethodJoin
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
MethodJoin
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
MethodJoin
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
MethodJoin
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
FunctionLCHGradient
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
MethodLen
()
path_intersection.go:1613
MethodLen
Len returns the number of segments.
polyline.go:26
MethodLess
(i, j int)
path_intersection.go:1617
MethodLess
(i, j int)
cmd/pdftext/writer.go:44
MethodLineHeight
LineHeight returns the height (ascent+descent) of a line.
font.go:694
MethodLineTo
LineTo adds a linear path to (x,y).
canvas.go:506
MethodLinebreak
Linebreak breaks a list of items using a greedy line breaking algorithm. This is much faster than Knuth's algorithm.
text.go:627
MethodLinebreak
Linebreak breaks a list of items using a greedy line breaking algorithm. This is much faster than Knuth's algorithm.
text.go:642
FunctionLinebreakGlyphs
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
← previousnext →901–1,000 of 1,447, ranked by callers