Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Index your code
hub
/
github.com/tdewolff/canvas
/ functions
Functions
1,447 in github.com/tdewolff/canvas
⨍
Functions
1,447
◇
Types & classes
214
↓ 2 callers
Function
KnuthLinebreak
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 callers
Function
Line
Line returns a line segment of from (0,0) to (x,y).
shapes.go:8
↓ 2 callers
Method
List
List returns all subsetted IDs in the order of appearance.
font.go:172
↓ 2 callers
Function
LoadSystemFont
LoadSystemFont loads a font from the system's fonts.
font.go:245
↓ 2 callers
Method
ModTime
Mode return file modify time
examples/html-canvas/files.go:68
↓ 2 callers
Method
Mode
Mode return file mode
examples/html-canvas/files.go:63
↓ 2 callers
Function
New
New returns a TeX/PGF renderer.
renderers/tex/tex.go:24
↓ 2 callers
Function
New
New returns a scalable vector graphics (SVG) renderer.
renderers/svg/svg.go:53
↓ 2 callers
Function
NewFontSubsetter
NewFontSubsetter returns a new font subsetter.
font.go:153
↓ 2 callers
Function
NewPDFReader
(reader io.Reader, password string)
cmd/pdftext/reader.go:32
↓ 2 callers
Function
NewVisvalingamWhyatt
(filter CoordinateFilter)
path_simplify.go:68
↓ 2 callers
Method
Next
()
cmd/pdftext/util.go:99
↓ 2 callers
Function
PDF
PDF returns a PDF writer and accepts the following options: canvas/renderers/pdf.*Options
renderers/renderers.go:227
↓ 2 callers
Function
PS
PS returns a PostScript writer and accepts the following options: canvas/renderers/ps.*Options
renderers/renderers.go:257
↓ 2 callers
Function
ParseLaTeX
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 callers
Method
ReflectY
ReflectY adds a vertical reflection transformation, i.e. Scale(1,-1).
util.go:709
↓ 2 callers
Method
Remove
(n *SweepNode)
path_intersection.go:935
↓ 2 callers
Method
RenderDecorationsTo
(r Renderer, m Matrix, resolution Resolution)
text.go:1238
↓ 2 callers
Method
RenderTo
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 callers
Method
Reset
Reset resets the rich text to its initial state.
text.go:457
↓ 2 callers
Function
SVG
SVG returns an SVG writer and accepts the following options: canvas/renderers/svg.*Options
renderers/renderers.go:181
↓ 2 callers
Function
ScriptRotation
(script Script)
text/text.go:146
↓ 2 callers
Method
SetStroke
SetStroke sets the color, gradient, or pattern to be used for stroke operations. The default stroke color is transparent.
canvas.go:428
↓ 2 callers
Method
SetTextPosition
SetTextPosition sets the text position.
renderers/pdf/writer.go:1133
↓ 2 callers
Method
SetTextRenderMode
SetTextRenderMode sets the text rendering mode.
renderers/pdf/writer.go:1151
↓ 2 callers
Method
Simplify
(ps []*Path, tolerance float64)
path_simplify.go:74
↓ 2 callers
Function
SpaceGlue
(glyphs []Glyph, i int)
text/linebreak.go:722
↓ 2 callers
Method
SplitAt
SplitAt splits the path into separate paths at the specified intervals (given in millimeters) along the path.
path.go:1594
↓ 2 callers
Method
Start
Start returns the current path segment start position.
path_scanner.go:126
↓ 2 callers
Method
String
()
path_intersection.go:96
↓ 2 callers
Method
String
()
cmd/pdftext/util.go:166
↓ 2 callers
Method
ToLinear
(start, end Point)
colors.go:132
↓ 2 callers
Method
ToVectorRasterizer
ToVectorRasterizer rasterizes the path to *vector.Rasterizer using the given rasterizer and resolution.
path.go:2468
↓ 2 callers
Method
TransformFunc
TransformFunc transforms the path by the given function: (x,y)=>(x,y). It modifies the path in-place.
path.go:1359
↓ 2 callers
Method
WindingsAt
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 callers
Method
WriteImage
WriteImage writes an inline image.
text.go:561
↓ 2 callers
Method
WriteLaTeX
WriteLaTeX writes an inline LaTeX formula.
text.go:569
↓ 2 callers
Function
addLineArcIntersection
handle line-arc intersections and their peculiarities regarding angles
path_intersection_util.go:496
↓ 2 callers
Method
addPath
(path vg.Path)
renderers/gonumplot.go:111
↓ 2 callers
Function
angleBetweenExclusive
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 callers
Function
arcToCube
(start Point, rx, ry, phi float64, large, sweep bool, end Point)
path_util.go:173
↓ 2 callers
Method
authenticateUser
(password []byte)
cmd/pdftext/encrypt.go:136
↓ 2 callers
Method
calcDemerits
(item Item, ratio float64, flagged bool)
text/linebreak.go:354
↓ 2 callers
Function
changeColorSpace
(dst draw.Image, src image.Image, f colorFunc)
renderers/rasterizer/util.go:13
↓ 2 callers
Function
close
(fd, callback)
examples/html-canvas/wasm_exec.js:37
↓ 2 callers
Method
compareV
(b *SweepPoint)
path_intersection.go:1096
↓ 2 callers
Function
compileShader
(source string, shaderType uint32)
renderers/opengl/opengl.go:120
↓ 2 callers
Function
cubicBezierNumInflections
(p0, p1, p2, p3 Point)
path_util.go:652
↓ 2 callers
Function
dashStart
(offset float64, d []float64)
path.go:1760
↓ 2 callers
Function
doTestPDFText
(t *testing.T, subsetFonts bool, expectedSize int, filename string)
renderers/pdf/pdf_test.go:76
↓ 2 callers
Function
draw2
(ctx *canvas.Context, y float64, p, q *canvas.Path)
resources/boolean/main.go:59
↓ 2 callers
Method
drawShape
(tag string, attrs map[string]string)
svg.go:1043
↓ 2 callers
Function
drawTextAndMoveDown
(c *canvas.Context, x float64, text *canvas.Text)
examples/text-document/main.go:69
↓ 2 callers
Function
ellipseDeriv2
(rx, ry, phi float64, theta float64)
path_util.go:27
↓ 2 callers
Function
fetch
(filename string, bounds *osm.Bounds)
examples/amsterdam-centre/main.go:25
↓ 2 callers
Function
formatRGBA
(c color.RGBA)
colors_test.go:284
↓ 2 callers
Function
gaussLegendre5
Gauss-Legendre quadrature integration from a to b with n=5
util.go:1105
↓ 2 callers
Function
gaussLegendre7
Gauss-Legendre quadrature integration from a to b with n=7
util.go:1117
↓ 2 callers
Function
genFloat64s
(n int)
util_test.go:381
↓ 2 callers
Method
getBuiltinEncoding
(fontType pdfName, fontDescriptor pdfDict)
cmd/pdftext/encoding.go:530
↓ 2 callers
Method
getColor
(col color.RGBA)
renderers/tex/tex.go:49
↓ 2 callers
Function
getContents
(pdf *pdfReader, obj any)
cmd/pdftext/main.go:315
↓ 2 callers
Function
getObjects
(pdf *pdfReader, page int)
cmd/pdftext/main.go:276
↓ 2 callers
Method
getPattern
(gradient canvas.Gradient, m canvas.Matrix)
renderers/pdf/writer.go:1560
↓ 2 callers
Method
init
(width, height float64, viewbox [4]float64)
svg.go:102
↓ 2 callers
Function
intersectionCircleCircle
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 callers
Function
intersectionEllipseEllipse
(zs Intersections, c0, r0 Point, phi0, thetaStart0, thetaEnd0 float64, c1, r1 Point, phi1, thetaStart1, thetaE
path_intersection_util.go:671
↓ 2 callers
Function
intersectionLineLineBentleyOttmann
F. Antonio, "Faster Line Segment Intersection", Graphics Gems III, 1992
path_intersection_util.go:187
↓ 2 callers
Function
intersectionRayLine
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 callers
Function
isDelimiter
(b byte)
cmd/pdftext/util.go:20
↓ 2 callers
Function
isIncreasing
(a, b Point)
path_intersection_test.go:150
↓ 2 callers
Method
loadFont
(fontname string, cmap map[uint32]rune, fontsize, scale float64, data []byte)
latex.go:301
↓ 2 callers
Function
lum
(col color.RGBA)
resources/docs/colors/main.go:37
↓ 2 callers
Method
mainLoop
(b int, tolerance float64, retry int)
text/linebreak.go:373
↓ 2 callers
Function
newPDFStreamReader
(b []byte)
cmd/pdftext/reader.go:886
↓ 2 callers
Method
offset
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 callers
Method
parseAttributes
(l *xml.Lexer)
svg.go:358
↓ 2 callers
Function
parseDate
(b []byte)
cmd/pdftext/util.go:81
↓ 2 callers
Function
parseName
(b []byte)
cmd/pdftext/util.go:45
↓ 2 callers
Method
parsePaint
(v string)
svg.go:225
↓ 2 callers
Method
parseTransform
(v string)
svg.go:297
↓ 2 callers
Method
parseViewBox
(attrWidth, attrHeight, attrViewBox string)
svg.go:72
↓ 2 callers
Function
patternGradFunction
(grad canvas.Grad)
renderers/pdf/writer.go:1595
↓ 2 callers
Function
polynomialChebyshevApprox
(N int, f func(float64) float64, xmin, xmax, ymin, ymax float64)
util.go:1258
↓ 2 callers
Function
printable
(s string)
cmd/pdftext/util.go:191
↓ 2 callers
Function
quadraticBezierDeriv2
(p0, p1, p2 Point)
path_util.go:447
↓ 2 callers
Function
read
(filename string)
examples/chile/main.go:16
↓ 2 callers
Method
readObject
(ref pdfRef)
cmd/pdftext/reader.go:458
↓ 2 callers
Method
readObjectAt
(ref pdfRef, i int)
cmd/pdftext/reader.go:516
↓ 2 callers
Method
readTrailer
(startxref int)
cmd/pdftext/reader.go:250
↓ 2 callers
Method
rebalance
(n *SweepNode)
path_intersection.go:755
↓ 2 callers
Method
renderPath
(path *canvas.Path, fill canvas.Paint)
renderers/gio/gio.go:88
↓ 2 callers
Function
reorderSpans
(spans []TextSpan)
text.go:283
↓ 2 callers
Method
rotateLeft
()
path_intersection.go:643
↓ 2 callers
Method
rotateRight
()
path_intersection.go:658
↓ 2 callers
Function
scriptDirection
(mode WritingMode, orient TextOrientation, script text.Script, level int, direction text.Direction)
text.go:244
↓ 2 callers
Method
setFill
(paint canvas.Paint)
renderers/tex/tex.go:96
↓ 2 callers
Method
setInt32
(addr, v)
examples/html-canvas/wasm_exec.js:116
↓ 2 callers
Method
setStyling
(props []cssProperty)
svg.go:855
↓ 2 callers
Function
splitAtIntersections
func splitOverlappingAtIntersections(zs []Point, queue *SweepEvents, s *SweepPoint, isA bool) bool { changed := false for prev := s.node.Prev(); pre
path_intersection.go:1251
← previous
next →
501–600 of 1,447, ranked by callers