Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Index your code
hub
/
github.com/tdewolff/canvas
/ types & classes
Types & classes
214 in github.com/tdewolff/canvas
⨍
Functions
1,447
◇
Types & classes
214
↓ 152 callers
TypeAlias
Script
go:generate stringer -type Script Script is the script.
text/harfbuzz.go:138
↓ 52 callers
TypeAlias
dec
renderers/pdf/util.go:29
↓ 45 callers
TypeAlias
pdfName
renderers/pdf/writer.go:150
↓ 42 callers
TypeAlias
dec
util.go:159
↓ 34 callers
TypeAlias
dec
renderers/svg/util.go:26
↓ 30 callers
TypeAlias
dec
renderers/tex/util.go:24
↓ 23 callers
TypeAlias
num
util.go:147
↓ 19 callers
TypeAlias
dec
renderers/ps/ps.go:283
↓ 14 callers
TypeAlias
pdfRef
renderers/pdf/writer.go:149
↓ 13 callers
TypeAlias
pdfName
cmd/pdftext/types.go:15
↓ 10 callers
TypeAlias
CSSColor
CSSColor is a string formatter to convert a color.RGBA to a CSS color (hexadecimal or using rgba()).
util.go:173
↓ 8 callers
TypeAlias
num
renderers/svg/util.go:14
↓ 6 callers
TypeAlias
numEps
util.go:132
↓ 4 callers
TypeAlias
Direction
Direction is the text direction.
text/harfbuzz.go:124
↓ 3 callers
TypeAlias
Resolution
Resolution is used for rasterizing. Higher resolutions will result in larger images.
canvas.go:20
↓ 3 callers
TypeAlias
dec
cmd/pdftext/util.go:164
↓ 2 callers
TypeAlias
eventSliceV
path_intersection.go:1611
↓ 1 callers
TypeAlias
Direction
Direction is the text direction.
text/harfbuzz_cgo.go:159
↓ 1 callers
Struct
MiterJoiner
TODO: should extend limit*halfwidth before bevel MiterJoiner is a miter joiner.
path_stroke.go:128
↓ 1 callers
TypeAlias
Script
Script is the script.
text/harfbuzz_cgo.go:171
↓ 1 callers
TypeAlias
heapVW
path_simplify.go:212
↓ 1 callers
Struct
line
text.go:131
↓ 1 callers
TypeAlias
pdfArray
renderers/pdf/writer.go:151
Class
examples/html-canvas/wasm_exec.js:95
Class
examples/html-canvas/wasm_exec.js:95
TypeAlias
Align
in case of ratio, demerits become about 1e22 Align is the text alignment.
text/linebreak.go:95
Struct
ArcsJoiner
ArcsJoiner is an arcs joiner.
path_stroke.go:197
Struct
BevelJoiner
BevelJoiner is a bevel joiner.
path_stroke.go:85
Struct
Break
text/linebreak.go:191
Struct
Breakpoint
Breakpoint is a (possible) break point in the string.
text/linebreak.go:198
Struct
Breakpoints
Breakpoints is a list of break points.
text/linebreak.go:220
Struct
ButtCapper
ButtCapper is a butt capper.
path_stroke.go:41
Struct
Canvas
Canvas stores all drawing operations as layers that can be re-rendered to other renderers.
canvas.go:719
Interface
Capper
NOTE: implementation inspired from github.com/golang/freetype/raster/stroke.go Capper implements Cap, with rhs the path to append to, halfWidth the ha
path_stroke.go:17
FuncType
ColorFunc
func(float64) color.RGBA
palettes.go:9
Interface
ColorSpace
ColorSpace defines the color space within the RGB color model. All colors passed to this library are assumed to be in the sRGB color space, which is a
colors.go:278
Struct
Context
Context maintains the state for the current path, path style, and view transformation matrix.
canvas.go:235
Struct
ContextState
ContextState defines the state of the context, including fill or stroke style, view and coordinate view.
canvas.go:227
TypeAlias
CoordSystem
CoordSystem is the coordinate system, which can be either of the four cartesian quadrants. Most useful are the I'th and IV'th quadrants. CartesianI i
canvas.go:216
FuncType
CoordinateFilter
func(Point) bool
path_simplify.go:60
Interface
DVIFont
DVIFont draws a rune/glyph to the Pather at a position in millimeters.
latex_dvi.go:35
Interface
DVIFonts
DVIFonts gets a font according to its font name and font size in points. Font names include: cmr: Roman (5--10pt) cmmi: Math Italic (5--10pt) cmsy
latex_dvi.go:30
Struct
Extract
cmd/pdftext/main.go:16
TypeAlias
FillRule
FillRule is the algorithm to specify which area is to be filled and which not, in particular when multiple subpaths overlap. The NonZero rule is the d
path.go:26
Struct
Font
Font defines an SFNT font such as TTF or OTF.
font.go:229
Interface
FontDecorator
FontDecorator is an interface that returns a path given a font face and a width in millimeters.
font.go:802
Struct
FontFace
FontFace defines a font face from a given font. It specifies the font size, color, faux styles and font decorations.
font.go:606
Struct
FontFamily
FontFamily contains a family of fonts (bold, italic, ...). Allowing to select an italic style as the native italic font or to use faux italic if not
font.go:359
Struct
FontMetrics
FontMetrics contains a number of metrics that define a font face. See https://developer.apple.com/library/archive/documentation/TextFonts/Conceptual/C
font.go:649
TypeAlias
FontStyle
FontStyle defines the font style to be used for the font. It specifies a boldness with optionally italic, e.g. FontBlack | FontItalic will specify a b
font.go:17
Struct
FontSubsetter
FontSubsetter holds a map between original glyph IDs and new glyph IDs in a subsetted font.
font.go:147
TypeAlias
FontVariant
FontVariant defines the font variant to be used for the font, such as subscript or smallcaps.
font.go:120
TypeAlias
Format
renderers/ps/ps.go:20
Struct
Fyne
renderers/fyne/fyne.go:10
Struct
GammaColorSpace
GammaColorSpace assumes that input colors and output images are gamma-corrected with the given gamma value. The sRGB space uses a gamma=2.4 for most o
colors.go:308
Struct
Gio
renderers/gio/gio.go:17
Struct
Glyph
Glyph is a shaped glyph for the given font and font size. It specified the glyph ID, the cluster ID, its X and Y advance and offset in font units, and
text/text.go:83
Struct
GoChart
GoChart is a github.com/wcharczuk/go-chart renderer.
renderers/gochart.go:15
Struct
GonumPlot
GonumPlot is a github.com/gonum/plot/vg renderer.
renderers/gonumplot.go:17
TypeAlias
Grad
Grad are the colors and offsets for gradient patterns, sorted by offset.
colors.go:91
Interface
Gradient
Gradient is a gradient pattern for filling.
colors.go:79
Struct
GradientImage
renderers/rasterizer/util.go:31
Struct
GrayA
GrayA is an in-memory image whose At method returns [color.GrayA] values.
image/image.go:398
Struct
GrayA
color/color.go:69
Struct
GrayA32
GrayA32 is an in-memory image whose At method returns [color.RGBA64] values.
image/image.go:498
Struct
GrayA32
color/color.go:90
Struct
GreedyLinebreaker
text.go:635
Struct
HTMLCanvas
HTMLCanvas is an HTMLCanvas renderer.
renderers/htmlcanvas/htmlcanvas.go:14
Struct
HatchPattern
type CanvasPattern struct { c *Canvas cell Matrix } func NewPattern(c *Canvas, cell Matrix) *CanvasPattern { return &CanvasPattern{ c: c,
patterns.go:47
FuncType
Hatcher
Hatcher is a hatch pattern along the cell's axes. The rectangle (x0,y0)-(x1,y1) is expressed in the unit cell's coordinate system, and the returned pa
patterns.go:55
Struct
Image
Image is a raster image that is loaded lazily. Keeping the original bytes allows the renderer to optimize rendering in some cases.
image/image.go:25
TypeAlias
ImageEncoding
ImageEncoding defines whether the embedded image shall be embedded as lossless (typically PNG) or lossy (typically JPG).
image/image.go:16
TypeAlias
ImageFit
ImageFit specifies how an image should fit a rectangle. ImageFill completely fills a rectangle by stretching the image. ImageContain and ImageCover bo
canvas.go:94
Struct
Intersection
Intersection is an intersection between two path segments, e.g. Line x Line. Note that an intersection is tangent also when it is at one of the endpoi
path_intersection_util.go:91
TypeAlias
Intersections
path_intersection_util.go:120
Struct
Item
Item is a box, glue or penalty item.
text/linebreak.go:142
TypeAlias
Items
text/linebreak.go:161
Interface
Joiner
Joiner implements Join, with rhs the right path and lhs the left path to append to, pivot the intersection of both path elements, n0 and n1 the norma
path_stroke.go:77
Struct
KnuthLinebreaker
text.go:617
Struct
LinearColorSpace
LinearColorSpace is the default color space that does not do color space conversion for blending purposes. This is only correct if the input colors an
colors.go:287
Struct
LinearGradient
LinearGradient is a linear gradient pattern between the given start and end points. The color at offset 0 corresponds to the start position, and offse
colors.go:171
Interface
Linebreaker
Linebreaker is an interface for line breaking algorithms. Given a set of items and a desired text width, it will break lines to remain within the give
text/linebreak.go:863
Struct
MarkdownOptions
markdown.go:199
TypeAlias
Matrix
Matrix is used for affine transformations, which are transformations such as translation, scaling, reflection, rotation, shear stretching. See https:
util.go:618
Struct
OpenGL
OpenGL is an open graphics library renderer.
renderers/opengl/opengl.go:16
Struct
Options
renderers/pdf/pdf.go:13
Struct
Options
renderers/ps/ps.go:27
Struct
Options
renderers/svg/svg.go:24
Struct
Options
text/linebreak.go:750
Struct
PDF
PDF is a portable document format renderer.
renderers/pdf/pdf.go:26
Struct
PS
PS is an PostScript renderer. Be aware that PostScript does not support transparency of colors.
renderers/ps/ps.go:34
Struct
Paint
Paint is the type of paint used to fill or stroke a path. It can be either a color or a pattern. Default is transparent (no paint).
canvas.go:106
Struct
Path
Path defines a vector path in 2D using a series of commands (MoveTo, LineTo, QuadTo, CubeTo, ArcTo and Close). Each command consists of a number of fl
path.go:129
Struct
PathReverseScanner
PathReverseScanner scans the path in reverse order.
path_scanner.go:101
Struct
PathScanner
PathScanner scans the path.
path_scanner.go:16
TypeAlias
Paths
path.go:104
Interface
Pattern
patterns.go:8
Struct
Point
Point is a coordinate in 2D space. OP refers to the line that goes through the origin (0,0) and this point (x,y).
util.go:232
Struct
Polyline
Polyline defines a list of points in 2D space that form a polyline. If the last coordinate equals the first coordinate, we assume the polyline to clos
polyline.go:6
Struct
RGB
RGB is an in-memory image whose At method returns [color.RGBA] values.
image/image.go:190
next →
1–100 of 214, ranked by callers