MCPcopy Index your code

hub / github.com/tdewolff/canvas / functions

Functions1,447 in github.com/tdewolff/canvas

↓ 2 callersFunctionKnuthLinebreak
KnuthLinebreak breaks a list of items using Donald Knuth's line breaking algorithm. See Donald E. Knuth and Michael F. Plass, "Breaking Paragraphs int
text/linebreak.go:507
↓ 2 callersFunctionLine
Line returns a line segment of from (0,0) to (x,y).
shapes.go:8
↓ 2 callersMethodList
List returns all subsetted IDs in the order of appearance.
font.go:172
↓ 2 callersFunctionLoadSystemFont
LoadSystemFont loads a font from the system's fonts.
font.go:245
↓ 2 callersMethodModTime
Mode return file modify time
examples/html-canvas/files.go:68
↓ 2 callersMethodMode
Mode return file mode
examples/html-canvas/files.go:63
↓ 2 callersFunctionNew
New returns a TeX/PGF renderer.
renderers/tex/tex.go:24
↓ 2 callersFunctionNew
New returns a scalable vector graphics (SVG) renderer.
renderers/svg/svg.go:53
↓ 2 callersFunctionNewFontSubsetter
NewFontSubsetter returns a new font subsetter.
font.go:153
↓ 2 callersFunctionNewPDFReader
(reader io.Reader, password string)
cmd/pdftext/reader.go:32
↓ 2 callersFunctionNewVisvalingamWhyatt
(filter CoordinateFilter)
path_simplify.go:68
↓ 2 callersMethodNext
()
cmd/pdftext/util.go:99
↓ 2 callersFunctionPDF
PDF returns a PDF writer and accepts the following options: canvas/renderers/pdf.*Options
renderers/renderers.go:227
↓ 2 callersFunctionPS
PS returns a PostScript writer and accepts the following options: canvas/renderers/ps.*Options
renderers/renderers.go:257
↓ 2 callersFunctionParseLaTeX
ParseLaTeX parses a LaTeX formatted string into a path. It requires latex and dvisvgm to be installed on the machine. The content is surrounded by:
latex_bin.go:34
↓ 2 callersMethodReflectY
ReflectY adds a vertical reflection transformation, i.e. Scale(1,-1).
util.go:709
↓ 2 callersMethodRemove
(n *SweepNode)
path_intersection.go:935
↓ 2 callersMethodRenderDecorationsTo
(r Renderer, m Matrix, resolution Resolution)
text.go:1238
↓ 2 callersMethodRenderTo
RenderTo renders the text and its decorations converted to paths, calling r.RenderPath on the renderer. Note that text lines are drawn downwards start
text.go:1251
↓ 2 callersMethodReset
Reset resets the rich text to its initial state.
text.go:457
↓ 2 callersFunctionSVG
SVG returns an SVG writer and accepts the following options: canvas/renderers/svg.*Options
renderers/renderers.go:181
↓ 2 callersFunctionScriptRotation
(script Script)
text/text.go:146
↓ 2 callersMethodSetStroke
SetStroke sets the color, gradient, or pattern to be used for stroke operations. The default stroke color is transparent.
canvas.go:428
↓ 2 callersMethodSetTextPosition
SetTextPosition sets the text position.
renderers/pdf/writer.go:1133
↓ 2 callersMethodSetTextRenderMode
SetTextRenderMode sets the text rendering mode.
renderers/pdf/writer.go:1151
↓ 2 callersMethodSimplify
(ps []*Path, tolerance float64)
path_simplify.go:74
↓ 2 callersFunctionSpaceGlue
(glyphs []Glyph, i int)
text/linebreak.go:722
↓ 2 callersMethodSplitAt
SplitAt splits the path into separate paths at the specified intervals (given in millimeters) along the path.
path.go:1594
↓ 2 callersMethodStart
Start returns the current path segment start position.
path_scanner.go:126
↓ 2 callersMethodString
()
path_intersection.go:96
↓ 2 callersMethodString
()
cmd/pdftext/util.go:166
↓ 2 callersMethodToLinear
(start, end Point)
colors.go:132
↓ 2 callersMethodToVectorRasterizer
ToVectorRasterizer rasterizes the path to *vector.Rasterizer using the given rasterizer and resolution.
path.go:2468
↓ 2 callersMethodTransformFunc
TransformFunc transforms the path by the given function: (x,y)=>(x,y). It modifies the path in-place.
path.go:1359
↓ 2 callersMethodWindingsAt
Windings returns the number of windings at the given point, i.e. the sum of windings for each time a ray from (x,y) towards (∞,y) intersects the path.
path.go:907
↓ 2 callersMethodWriteImage
WriteImage writes an inline image.
text.go:561
↓ 2 callersMethodWriteLaTeX
WriteLaTeX writes an inline LaTeX formula.
text.go:569
↓ 2 callersFunctionaddLineArcIntersection
handle line-arc intersections and their peculiarities regarding angles
path_intersection_util.go:496
↓ 2 callersMethodaddPath
(path vg.Path)
renderers/gonumplot.go:111
↓ 2 callersFunctionangleBetweenExclusive
angleBetweenExclusive is true when theta is in range (lower,upper) excluding the end points. Angles can be outside the [0,2PI) range.
util.go:112
↓ 2 callersFunctionarcToCube
(start Point, rx, ry, phi float64, large, sweep bool, end Point)
path_util.go:173
↓ 2 callersMethodauthenticateUser
(password []byte)
cmd/pdftext/encrypt.go:136
↓ 2 callersMethodcalcDemerits
(item Item, ratio float64, flagged bool)
text/linebreak.go:354
↓ 2 callersFunctionchangeColorSpace
(dst draw.Image, src image.Image, f colorFunc)
renderers/rasterizer/util.go:13
↓ 2 callersFunctionclose
(fd, callback)
examples/html-canvas/wasm_exec.js:37
↓ 2 callersMethodcompareV
(b *SweepPoint)
path_intersection.go:1096
↓ 2 callersFunctioncompileShader
(source string, shaderType uint32)
renderers/opengl/opengl.go:120
↓ 2 callersFunctioncubicBezierNumInflections
(p0, p1, p2, p3 Point)
path_util.go:652
↓ 2 callersFunctiondashStart
(offset float64, d []float64)
path.go:1760
↓ 2 callersFunctiondoTestPDFText
(t *testing.T, subsetFonts bool, expectedSize int, filename string)
renderers/pdf/pdf_test.go:76
↓ 2 callersFunctiondraw2
(ctx *canvas.Context, y float64, p, q *canvas.Path)
resources/boolean/main.go:59
↓ 2 callersMethoddrawShape
(tag string, attrs map[string]string)
svg.go:1043
↓ 2 callersFunctiondrawTextAndMoveDown
(c *canvas.Context, x float64, text *canvas.Text)
examples/text-document/main.go:69
↓ 2 callersFunctionellipseDeriv2
(rx, ry, phi float64, theta float64)
path_util.go:27
↓ 2 callersFunctionfetch
(filename string, bounds *osm.Bounds)
examples/amsterdam-centre/main.go:25
↓ 2 callersFunctionformatRGBA
(c color.RGBA)
colors_test.go:284
↓ 2 callersFunctiongaussLegendre5
Gauss-Legendre quadrature integration from a to b with n=5
util.go:1105
↓ 2 callersFunctiongaussLegendre7
Gauss-Legendre quadrature integration from a to b with n=7
util.go:1117
↓ 2 callersFunctiongenFloat64s
(n int)
util_test.go:381
↓ 2 callersMethodgetBuiltinEncoding
(fontType pdfName, fontDescriptor pdfDict)
cmd/pdftext/encoding.go:530
↓ 2 callersMethodgetColor
(col color.RGBA)
renderers/tex/tex.go:49
↓ 2 callersFunctiongetContents
(pdf *pdfReader, obj any)
cmd/pdftext/main.go:315
↓ 2 callersFunctiongetObjects
(pdf *pdfReader, page int)
cmd/pdftext/main.go:276
↓ 2 callersMethodgetPattern
(gradient canvas.Gradient, m canvas.Matrix)
renderers/pdf/writer.go:1560
↓ 2 callersMethodinit
(width, height float64, viewbox [4]float64)
svg.go:102
↓ 2 callersFunctionintersectionCircleCircle
https://math.stackexchange.com/questions/256100/how-can-i-find-the-points-at-which-two-circles-intersect https://gist.github.com/jupdike/bfe5eb23d1c39
path_intersection_util.go:820
↓ 2 callersFunctionintersectionEllipseEllipse
(zs Intersections, c0, r0 Point, phi0, thetaStart0, thetaEnd0 float64, c1, r1 Point, phi1, thetaStart1, thetaE
path_intersection_util.go:671
↓ 2 callersFunctionintersectionLineLineBentleyOttmann
F. Antonio, "Faster Line Segment Intersection", Graphics Gems III, 1992
path_intersection_util.go:187
↓ 2 callersFunctionintersectionRayLine
TODO: bezier-bezier intersection TODO: bezier-ellipse intersection For Bézier-Bézier intersections: see T.W. Sederberg, "Computer Aided Geometric Desi
path_intersection_util.go:782
↓ 2 callersFunctionisDelimiter
(b byte)
cmd/pdftext/util.go:20
↓ 2 callersFunctionisIncreasing
(a, b Point)
path_intersection_test.go:150
↓ 2 callersMethodloadFont
(fontname string, cmap map[uint32]rune, fontsize, scale float64, data []byte)
latex.go:301
↓ 2 callersFunctionlum
(col color.RGBA)
resources/docs/colors/main.go:37
↓ 2 callersMethodmainLoop
(b int, tolerance float64, retry int)
text/linebreak.go:373
↓ 2 callersFunctionnewPDFStreamReader
(b []byte)
cmd/pdftext/reader.go:886
↓ 2 callersMethodoffset
offset returns the rhs and lhs paths from offsetting a path (must not have subpaths). It closes rhs and lhs when p is closed as well.
path_stroke.go:446
↓ 2 callersMethodparseAttributes
(l *xml.Lexer)
svg.go:358
↓ 2 callersFunctionparseDate
(b []byte)
cmd/pdftext/util.go:81
↓ 2 callersFunctionparseName
(b []byte)
cmd/pdftext/util.go:45
↓ 2 callersMethodparsePaint
(v string)
svg.go:225
↓ 2 callersMethodparseTransform
(v string)
svg.go:297
↓ 2 callersMethodparseViewBox
(attrWidth, attrHeight, attrViewBox string)
svg.go:72
↓ 2 callersFunctionpatternGradFunction
(grad canvas.Grad)
renderers/pdf/writer.go:1595
↓ 2 callersFunctionpolynomialChebyshevApprox
(N int, f func(float64) float64, xmin, xmax, ymin, ymax float64)
util.go:1258
↓ 2 callersFunctionprintable
(s string)
cmd/pdftext/util.go:191
↓ 2 callersFunctionquadraticBezierDeriv2
(p0, p1, p2 Point)
path_util.go:447
↓ 2 callersFunctionread
(filename string)
examples/chile/main.go:16
↓ 2 callersMethodreadObject
(ref pdfRef)
cmd/pdftext/reader.go:458
↓ 2 callersMethodreadObjectAt
(ref pdfRef, i int)
cmd/pdftext/reader.go:516
↓ 2 callersMethodreadTrailer
(startxref int)
cmd/pdftext/reader.go:250
↓ 2 callersMethodrebalance
(n *SweepNode)
path_intersection.go:755
↓ 2 callersMethodrenderPath
(path *canvas.Path, fill canvas.Paint)
renderers/gio/gio.go:88
↓ 2 callersFunctionreorderSpans
(spans []TextSpan)
text.go:283
↓ 2 callersMethodrotateLeft
()
path_intersection.go:643
↓ 2 callersMethodrotateRight
()
path_intersection.go:658
↓ 2 callersFunctionscriptDirection
(mode WritingMode, orient TextOrientation, script text.Script, level int, direction text.Direction)
text.go:244
↓ 2 callersMethodsetFill
(paint canvas.Paint)
renderers/tex/tex.go:96
↓ 2 callersMethodsetInt32
(addr, v)
examples/html-canvas/wasm_exec.js:116
↓ 2 callersMethodsetStyling
(props []cssProperty)
svg.go:855
↓ 2 callersFunctionsplitAtIntersections
func splitOverlappingAtIntersections(zs []Point, queue *SweepEvents, s *SweepPoint, isA bool) bool { changed := false for prev := s.node.Prev(); pre
path_intersection.go:1251
← previousnext →501–600 of 1,447, ranked by callers