MCPcopy Index your code

hub / github.com/tdewolff/canvas / functions

Functions1,447 in github.com/tdewolff/canvas

↓ 293 callersMethodT
T returns the matrix transpose.
util.go:719
↓ 206 callersFunctionEqual
Equal returns true if a and b are equal within an absolute tolerance of Epsilon or within a relative tolerance of Epsilon (relative to the largest of
util.go:24
↓ 183 callersFunctionMustParseSVGPath
MustParseSVGPath parses an SVG path data string and panics if it fails.
path.go:2075
↓ 153 callersMethodDrawPath
DrawPath draws a path at position (x,y) using the current draw state.
canvas.go:638
↓ 137 callersMethodSub
Sub subtracts Q from P.
util.go:265
↓ 128 callersMethodAdd
Add returns a rect that encompasses both the current rect and the given rect.
util.go:451
↓ 122 callersMethodLineTo
LineTo adds a linear path to (x,y).
path.go:411
↓ 101 callersMethodMul
Mul multiplies x and y by f.
util.go:270
↓ 101 callersFunctioncmdLen
cmdLen returns the number of values (float64s) the path command contains.
path.go:79
↓ 85 callersMethodDot
Dot returns the dot product between OP and OQ, i.e. zero if perpendicular and |OP|*|OQ| if aligned.
util.go:307
↓ 84 callersFunctionboSP
(a, b Point, clipping bool)
path_intersection_test.go:500
↓ 80 callersMethodRun
()
cmd/pdftext/main.go:47
↓ 77 callersMethodTranslate
Translate applies a translational transform to the context.
renderers/gonumplot.go:86
↓ 73 callersMethodWrite
Write writes the canvas to an io.Writer using the given writer. See renderers/ for an overview of implementations of canvas.Writer.
canvas.go:877
↓ 68 callersMethodMoveTo
MoveTo moves the path to (x,y) without connecting the path. It starts a new independent subpath. Multiple subpaths can be useful when negating parts
path.go:401
↓ 61 callersFunctionBox
Box returns a box item (a word) of the given fixed width.
text/linebreak.go:164
↓ 60 callersFunctionRectangle
Rectangle returns a rectangle of width w and height h.
shapes.go:31
↓ 51 callersMethodSetFillColor
SetFillColor sets the current fill color.
renderers/gochart.go:82
↓ 51 callersMethodTranslate
Translate translates the path by (x,y). It modifies the path in-place.
path.go:1344
↓ 50 callersMethodDrawText
DrawText draws text at position (x,y) using the current draw state.
canvas.go:662
↓ 50 callersMethodSetFillColor
SetFillColor sets the color to be used for filling operations. The default fill color is black.
canvas.go:413
↓ 50 callersMethodSplit
Split splits the path into its independent subpaths. The path is split before each MoveTo command.
path.go:1573
↓ 48 callersFunctionCircle
Circle returns a circle of radius r.
shapes.go:99
↓ 48 callersMethodClose
Close closes a (sub)path with a LineTo to the start of the path (the most recent MoveTo command). It also signals the path closes as opposed to being
path.go:561
↓ 46 callersMethodSetStrokeColor
SetStrokeColor sets the current stroke color.
renderers/gochart.go:77
↓ 43 callersFunctionNewTextLine
NewTextLine is a simple text line using a single font face, a string (supporting new lines) and horizontal alignment (Left, Center, Right). The text's
text.go:316
↓ 43 callersMethodScale
Scale scales the path by (sx,sy). It modifies the path in-place.
path.go:1349
↓ 41 callersMethodparseDimension
(v string, parent float64)
svg.go:155
↓ 40 callersMethodAppend
Append appends path q to p and returns the extended path p.
path.go:300
↓ 39 callersMethodFace
Face gets the font face given by the font size in points and its style. Fill can be any of Paint, color.Color, or canvas.Pattern.
font.go:334
↓ 38 callersMethodEquals
Equals returns true if p and q are equal within tolerance Epsilon.
path.go:173
↓ 36 callersMethodFace
Face gets the font face given by the font size in points. Other arguments that can be passed: Paint/Pattern/color.Color (=Black), FontStyle (=FontRegu
font.go:483
↓ 36 callersFunctionHex
Hex parses a CSS hexadecimal color such as e.g. #ff0000 or F00.
colors.go:40
↓ 36 callersFunctionNewFontFamily
NewFontFamily returns a new font family.
font.go:365
↓ 36 callersMethodRotate
Rotate rotates the path by deg degrees. It modifies the path in-place.
path.go:1354
↓ 36 callersMethodTransform
(Matrix)
patterns.go:9
↓ 34 callersMethodEnd
End returns the current path segment end position.
path_scanner.go:78
↓ 34 callersMethodwrite
(s string, v ...interface{})
renderers/pdf/writer.go:140
↓ 33 callersMethodBounds
()
renderers/rasterizer/util.go:50
↓ 33 callersFunctionNew
New returns a new canvas with width and height in millimeters, that records all drawing operations into layers. The canvas can then be rendered to any
canvas.go:726
↓ 33 callersFunctionangleNorm
angleNorm returns the angle theta in the range [0,2PI).
util.go:69
↓ 32 callersMethodAngle
Angle returns the angle in radians [0,2PI) between the x-axis and OP.
util.go:327
↓ 32 callersFunctionDPMM
DPMM (dots-per-millimeter) for the resolution of rasterization.
canvas.go:23
↓ 32 callersMethodJoin
(*Path, *Path, float64, Point, Point, Point, float64, float64)
path_stroke.go:78
↓ 32 callersFunctionNewContext
NewContext returns a new context which is a wrapper around a renderer. Contexts maintain the state of the current path, path style, and view transform
canvas.go:244
↓ 32 callersMethodPerpDot
PerpDot returns the perp dot product between OP and OQ, i.e. zero if aligned and |OP|*|OQ| if perpendicular. This is the cross product in two dimensio
util.go:312
↓ 31 callersMethodSize
()
canvas.go:207
↓ 30 callersMethodLength
Length returns the length of the path in millimeters. The length is approximated for cubic Béziers.
path.go:1233
↓ 30 callersMethodRGBA
()
color/color.go:17
↓ 30 callersFunctionsnap
snap "gridsnaps" the floating point to a grid of the given spacing
util.go:126
↓ 29 callersMethodArcTo
ArcTo adds an arc with radii rx and ry, with rot the counter clockwise rotation with respect to the coordinate system in degrees, large and sweep bool
path.go:494
↓ 28 callersMethodAt
(float64, float64)
colors.go:81
↓ 28 callersMethodString
()
util.go:149
↓ 28 callersFunctionmoveWhiteSpace
(b []byte, i int)
cmd/pdftext/util.go:28
↓ 27 callersFunctionInterval
Interval returns true if f is in closed interval [lower-Epsilon,upper+Epsilon] where lower and upper can be interchanged.
util.go:48
↓ 27 callersMethodWriteFace
WriteFace writes a string with a given font face.
text.go:531
↓ 27 callersFunctionenosys
()
examples/html-canvas/wasm_exec.js:8
↓ 26 callersMethodEmpty
Empty returns true if p is an empty path or consists of only MoveTos and Closes.
path.go:168
↓ 26 callersMethodFills
(windings int)
path.go:36
↓ 25 callersMethodNext
()
path_intersection.go:555
↓ 25 callersFunctiontoArcFlags
toArcFlags converts to the largeArc and sweep boolean flags given its value in the path.
path.go:86
↓ 24 callersMethodHasStroke
HasStroke returns true if the style has a stroke
canvas.go:184
↓ 24 callersMethodInterpolate
Interpolate returns a point on PQ that is linearly interpolated by t in [0,1], i.e. t=0 returns P and t=1 returns Q.
util.go:351
↓ 24 callersMethodSetStrokeWidth
SetStrokeWidth sets the stroke width.
renderers/gochart.go:87
↓ 23 callersMethodEncode
([]byte)
cmd/pdftext/encoding.go:18
↓ 23 callersMethodNorm
Norm normalises OP to be of given length.
util.go:337
↓ 23 callersFunctionellipseToCenter
ellipseToCenter converts to the center arc format and returns (centerX, centerY, angleFrom, angleTo) with angles in radians. When angleFrom with range
path_util.go:65
↓ 22 callersMethodDPMM
DPMM returns the resolution in dots-per-millimeter.
canvas.go:33
↓ 22 callersMethodMetrics
Metrics returns the font metrics. See https://developer.apple.com/library/archive/documentation/TextFonts/Conceptual/CocoaTextArchitecture/Art/glyph_m
font.go:666
↓ 22 callersMethodadd
(pos Point, ta, tb, dira, dirb float64, tangent, same bool)
path_intersection_util.go:147
↓ 21 callersMethodBytes
()
cmd/pdftext/encoding.go:108
↓ 21 callersMethodLoadSystemFont
LoadSystemFont loads a font from the system's fonts.
font.go:411
↓ 21 callersMethodSet
(x, y int, c color.Color)
image/image.go:233
↓ 21 callersMethodToText
ToText takes the added text spans and fits them within a given box of certain width and height using Donald Knuth's line breaking algorithm.
text.go:647
↓ 20 callersMethodAdd
Add adds a new point to the polyline.
polyline.go:34
↓ 20 callersMethodEqual
Equal returns true if Paints are equal.
canvas.go:113
↓ 20 callersMethodH
H returns the height of the rectangle.
util.go:409
↓ 20 callersMethodSetStrokeColor
SetStrokeColor sets the color to be used for stroking operations. The default stroke color is transparent.
canvas.go:443
↓ 20 callersMethodStart
Start returns the current path segment start position.
path_scanner.go:41
↓ 19 callersMethodAdd
Add adds Q to P.
util.go:260
↓ 19 callersMethodHasFill
HasFill returns true if the style has a fill
canvas.go:179
↓ 19 callersMethodRenderPath
(path *Path, style Style, m Matrix)
canvas.go:208
↓ 19 callersMethodW
W returns the width of the rectangle.
util.go:404
↓ 19 callersMethodWriteFile
WriteFile writes the canvas to a file using the given writer. See renderers/ for an overview of implementations of canvas.Writer.
canvas.go:882
↓ 19 callersFunctionsolveQuadraticFormula
Numerically stable quadratic formula, lowest root is returned first, see https://math.stackexchange.com/a/2007723
util.go:960
↓ 18 callersMethodGet
(string, float64)
latex_dvi.go:31
↓ 17 callersMethodNot
Not returns the boolean path operation of path p NOT q, i.e. the difference of both. It removes all self-intersections and overlapping areas, orients
path_intersection.go:198
↓ 17 callersMethodRenderTo
(Renderer, *Path)
patterns.go:11
↓ 17 callersMethodReverse
Reverse returns a new path that is the same path as p but in the reverse direction.
path.go:1913
↓ 17 callersMethodScan
Scan scans a new path segment and should be called before the other methods.
path_scanner.go:22
↓ 17 callersMethodStyle
Style returns the style of the font.
font.go:318
↓ 17 callersFunctioncubicBezierSplit
(p0, p1, p2, p3 Point, t float64)
path_util.go:662
↓ 17 callersFunctiondraw
(ctx *canvas.Context, y float64, title string, p, q *canvas.Path)
resources/docs/boolean/main.go:94
↓ 16 callersMethodLoadFontFile
LoadFontFile loads a font from a file.
font.go:429
↓ 16 callersMethodOverlaps
Overlaps returns true if both rectangles overlap.
util.go:569
↓ 16 callersFunctionbentleyOttmann
(ps, qs Paths, op pathOp, fillRule FillRule)
path_intersection.go:1788
↓ 15 callersMethodCopy
Copy returns a copy of p.
path.go:269
↓ 15 callersMethodCubeTo
CubeTo adds a cubic Bézier path with control points (cpx1,cpy1) and (cpx2,cpy2) and end point (x,y).
path.go:473
↓ 15 callersFunctionEllipsePos
EllipsePos returns the position on the ellipse at angle theta.
path_util.go:8
↓ 15 callersFunctionGlue
Glue returns a glue item (a space) where width is the default width, stretch*Tolerance the maximum width, and shrink*Tolerance the minimum width.
text/linebreak.go:172
next →1–100 of 1,447, ranked by callers