MCPcopy Index your code

hub / github.com/tdewolff/canvas / functions

Functions1,447 in github.com/tdewolff/canvas

↓ 7 callersMethodCoords
Coords returns the list of coordinates of the polyline.
polyline.go:53
↓ 7 callersMethodFit
Fit shrinks the canvas' size that so all elements fit with a given margin in millimeters.
canvas.go:837
↓ 7 callersMethodGetArray
(val any)
cmd/pdftext/reader.go:355
↓ 7 callersMethodIsDashed
IsDashed returns true if the style has dashes
canvas.go:189
↓ 7 callersMethodIsTranslation
IsTranslation is true if the matrix consists of only translational components, i.e. no rotation, scaling, or skew transformations.
util.go:808
↓ 7 callersFunctionPNG
PNG returns a PNG writer and accepts the following options: canvas.Resolution, canvas.Colorspace, image/png.Encoder
renderers/renderers.go:69
↓ 7 callersMethodPPEM
PPEM returns the pixels-per-EM for a given resolution of the font face.
font.go:685
↓ 7 callersFunctionParseSVG
(r io.Reader)
svg.go:1109
↓ 7 callersMethodPos
()
cmd/pdftext/reader.go:890
↓ 7 callersFunctionPrimitiveCell
PrimitiveCell is a (primitive) cell used for tiling.
path_tiling.go:10
↓ 7 callersFunctionScaleDash
(scale float64, offset float64, d []float64)
canvas.go:158
↓ 7 callersMethodSetStrokeCapper
SetStrokeCapper sets the line cap function to be used for stroke end points. The default stroke capper is a butt cap.
canvas.go:463
↓ 7 callersMethodString
()
svg.go:1367
↓ 7 callersMethodTop
()
path_intersection.go:452
↓ 7 callersMethodTranslate
Translate translates the rect.
util.go:429
↓ 7 callersFunctioncubicBezierDeriv
(p0, p1, p2, p3 Point, t float64)
path_util.go:557
↓ 7 callersFunctionellipseCurvatureRadius
(rx, ry float64, sweep bool, theta float64)
path_util.go:35
↓ 7 callersMethodparseNumber
(v string)
svg.go:134
↓ 6 callersMethodCoordSystemView
()
canvas.go:289
↓ 6 callersFunctionDrawPreview
DrawPreview draws the canvas's preview to a Context.
preview.go:24
↓ 6 callersMethodHeights
Heights returns the maximum top, ascent, descent, and bottom heights of the line, where top and bottom are equal to ascent and descent respectively wi
text.go:137
↓ 6 callersMethodIsRigid
IsRigid is true if the matrix is orthogonal and consists of only isometric transformations: translation, rotation, and reflection.
util.go:833
↓ 6 callersMethodLoadFont
LoadFont loads a font from memory.
font.go:465
↓ 6 callersMethodNewPage
NewPage starts adds a new page where further rendering will be written to.
renderers/pdf/pdf.go:70
↓ 6 callersMethodNext
()
cmd/pdftext/reader.go:894
↓ 6 callersMethodOr
Or returns the boolean path operation of path p OR q, i.e. the union of both. It It removes all self-intersections and overlapping areas, orients all
path_intersection.go:164
↓ 6 callersMethodOverlapsLine
(a, b Point)
util.go:553
↓ 6 callersMethodPush
(item *SweepPoint)
path_intersection.go:447
↓ 6 callersMethodRender
(_ io.Writer, src []byte, n ast.Node)
markdown.go:181
↓ 6 callersMethodReplaceArcs
ReplaceArcs replaces ArcTo commands by CubeTo commands and returns a new path.
path.go:1462
↓ 6 callersMethodSetColorSpace
(ColorSpace)
colors.go:80
↓ 6 callersMethodSetFace
SetFace sets the font face.
text.go:491
↓ 6 callersMethodSetView
SetView sets the current affine transformation matrix through which all operations will be transformed. See `Matrix` for how transformations work.
canvas.go:328
↓ 6 callersMethodSettle
Settle returns the "settled"/flattened path, a visually identical version of the original. It removes all self-intersections and overlapping areas, or
path_intersection.go:130
↓ 6 callersMethodSmoothen
Smoothen returns a new path that smoothens out a path using cubic Béziers between all the path points. It makes sure that the curvature is smooth alon
polyline.go:141
↓ 6 callersMethodStroke
Stroke strokes the current path and resets the path.
canvas.go:547
↓ 6 callersMethodText
Text draws a text blob.
renderers/gochart.go:187
↓ 6 callersMethodToScanxScanner
ToScanxScanner rasterizes the path to *scanx.Scanner using the given rasterizer, height, and resolution.
path.go:2526
↓ 6 callersMethodTranslate
Translate moves the view.
canvas.go:343
↓ 6 callersMethodXor
Xor returns the boolean path operation of path p XOR q, i.e. the symmetric difference of both. It removes all self-intersections and overlapping areas
path_intersection.go:181
↓ 6 callersFunctioncubicBezierNormal
return the normal at the right-side of the curve (when increasing t)
path_util.go:593
↓ 6 callersFunctioncubicBezierPos
(p0, p1, p2, p3 Point, t float64)
path_util.go:549
↓ 6 callersFunctiondraw
(ctx *canvas.Context, y float64, title string, p, q *canvas.Path)
resources/docs/relation/main.go:49
↓ 6 callersFunctionellipseSplit
ellipseSplit returns the new mid point, the two large parameters and the ok bool, the rest stays the same
path_util.go:149
↓ 6 callersFunctionflattenSmoothCubicBezier
split the curve and replace it by lines as long as (maximum deviation <= tolerance) is maintained
path_util.go:779
↓ 6 callersMethodparseColorComponent
(v string)
svg.go:207
↓ 6 callersFunctionparseTextString
(b []byte)
cmd/pdftext/util.go:70
↓ 6 callersFunctionquadraticBezierDeriv
(p0, p1, p2 Point, t float64)
path_util.go:440
↓ 6 callersFunctionquadraticBezierSplit
(p0, p1, p2 Point, t float64)
path_util.go:509
↓ 6 callersFunctionquadraticToCubicBezier
Béziers /////////////////////////////////////////////////////
path_util.go:391
↓ 6 callersMethodreadInt32N
(n int)
latex_dvi.go:337
↓ 6 callersMethodreadUint32N
(n int)
latex_dvi.go:320
↓ 6 callersFunctionstrokeCubicBezier
see Flat, precise flattening of cubic Bézier path and offset curves, by T.F. Hain et al., 2005, https://www.sciencedirect.com/science/article/pii/S00
path_util.go:885
↓ 6 callersMethodwriteBytes
(b []byte)
cmd/pdftext/writer.go:65
↓ 6 callersMethodwriteVal
(i interface{})
renderers/pdf/writer.go:173
↓ 5 callersMethodCompareV
(b *SweepPoint)
path_intersection.go:1109
↓ 5 callersMethodContainsPoint
ContainsPoint returns true if the rectangle contains or touches an edge.
util.go:478
↓ 5 callersMethodCoords
Coords returns all the coordinates of the segment start/end points. It omits zero-length CloseCmds.
path.go:386
↓ 5 callersMethodEigen
Eigen returns the matrix eigenvalues and eigenvectors. The first eigenvalue is related to the first eigenvector, and so for the second pair. Eigenvect
util.go:747
↓ 5 callersMethodGetName
(val any)
cmd/pdftext/reader.go:319
↓ 5 callersMethodImage
()
image/image.go:35
↓ 5 callersMethodInterpolateY
(x float64)
path_intersection.go:295
↓ 5 callersMethodJoin
Join joins path q to p and returns the extended path p (or q if p is empty). It's like executing the commands in q to p in sequence, where if the firs
path.go:313
↓ 5 callersMethodLineTo
LineTo both starts a shape and draws a line to a given point from the previous point.
renderers/gochart.go:106
↓ 5 callersFunctionNew
New returns a portable document format (PDF) renderer.
renderers/pdf/pdf.go:33
↓ 5 callersMethodPixOffset
PixOffset returns the index of the first element of Pix that corresponds to the pixel at (x, y).
image/image.go:229
↓ 5 callersMethodPixOffset
PixOffset returns the index of the first element of Pix that corresponds to the pixel at (x, y).
image/image.go:332
↓ 5 callersMethodReflectYAbout
ReflectYAbout adds a vertical reflection transformation about y.
util.go:714
↓ 5 callersMethodRenderImage
(img image.Image, m Matrix)
canvas.go:210
↓ 5 callersMethodRenderViewTo
RenderViewTo transforms and renders the accumulated canvas drawing operations to another renderer.
canvas.go:852
↓ 5 callersMethodReset
Reset clears the path but retains the same memory. This can be used in loops where you append and process paths every iteration, and avoid new memory
path.go:142
↓ 5 callersMethodRotateAbout
RotateAbout adds a rotation transformation about (x,y) with rot in degrees counter clockwise.
util.go:666
↓ 5 callersMethodScale
Scale adds a scaling transformation in sx and sy. When scale is negative it will flip those axes.
util.go:672
↓ 5 callersMethodSetColor
SetColor sets the current drawing color. Note that fill color and stroke color are the same, so if you want different fill and stroke colors then you
renderers/gonumplot.go:69
↓ 5 callersMethodSetStroke
SetStroke sets the stroking paint.
renderers/pdf/writer.go:995
↓ 5 callersMethodSetZIndex
SetZIndex sets the z-index.
canvas.go:780
↓ 5 callersMethodString
String returns the content of the text box.
text.go:1061
↓ 5 callersMethodToPath
ToPath converts the polyline to a path. If the last coordinate equals the first one, we close the path.
polyline.go:58
↓ 5 callersMethodToUnicode
([]byte)
cmd/pdftext/encoding.go:109
↓ 5 callersMethodTranslate
Translate adds a translation in x and y.
util.go:648
↓ 5 callersMethodWeight
Weight returns the font weight (FontRegular, FontBold, ...)
font.go:39
↓ 5 callersMethodWithin
Within is the same as Contains but with the shapes swapped.
path_intersection.go:2475
↓ 5 callersMethodcomputeSweepFields
type eventSliceH []*SweepPoint func (a eventSliceH) Len() int { return len(a) } func (a eventSliceH) Less(i, j int) bool { return a[i].LessH(a[j])
path_intersection.go:1641
↓ 5 callersMethoddirection
direction returns the direction of the path at the given index into Path.d and t in [0.0,1.0]. Path must not contain subpaths, and will return the pat
path.go:674
↓ 5 callersFunctiondrawPath
(c *canvas.Context, x, y float64, path string, moveto bool)
resources/docs/paths/main.go:36
↓ 5 callersFunctiondrawText
(c *canvas.Context, x, y float64, text string)
resources/docs/paths/main.go:53
↓ 5 callersFunctionellipseNormal
ellipseNormal returns the normal to the right at angle theta of the ellipse, given rotation phi.
path_util.go:48
↓ 5 callersFunctionintersectionRayCircle
https://mathworld.wolfram.com/Circle-LineIntersection.html
path_intersection_util.go:799
↓ 5 callersFunctioninvSpeedPolynomialChebyshevApprox
polynomialApprox returns a function y(x) that maps the parameter x [xmin,xmax] to the integral of fp. For a circle tmin and tmax would be 0 and 2PI re
util.go:1245
↓ 5 callersFunctionisWhiteSpace
(b byte)
cmd/pdftext/util.go:16
↓ 5 callersMethodparseColor
(v string)
svg.go:232
↓ 5 callersFunctionparseFloat
(v any)
cmd/pdftext/main.go:345
↓ 5 callersMethodparseUrlID
(val string)
svg.go:878
↓ 5 callersFunctionpdfReadVal
(r *pdfReader, ref pdfRef, b []byte)
cmd/pdftext/reader.go:607
↓ 5 callersMethodpop
()
svg.go:123
↓ 5 callersFunctionquadraticBezierPos
see http://www.caffeineowl.com/graphics/2d/vectorial/cubic2quad01.html func cubicToQuadraticBeziers(p0, p1, p2, p3 Point, tolerance float64) [][3]Poin
path_util.go:433
↓ 5 callersFunctionrelate
relate uses the Bentley-Ottmann algorithm to classify geometry intersections using DE-9IM.
path_intersection.go:2713
↓ 5 callersMethodswapChild
(a, b *SweepNode)
path_intersection.go:632
↓ 5 callersMethodupdateHeight
()
path_intersection.go:621
↓ 5 callersMethodwriteClasses
(w io.Writer)
renderers/svg/svg.go:126
← previousnext →201–300 of 1,447, ranked by callers