Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/asciitosvg/asciitosvg
/ functions
Functions
101 in github.com/asciitosvg/asciitosvg
⨍
Functions
101
◇
Types & classes
9
↓ 20 callers
Method
at
(p Point)
canvas.go:486
↓ 9 callers
Method
Points
Points returns all the points occupied by this Object. Every object has at least one point, and all points are both in-order and contiguous.
object.go:13
↓ 8 callers
Method
isVisited
(p Point)
canvas.go:490
↓ 7 callers
Method
Corners
Corners returns all the corners (change of direction) along the path.
object.go:17
↓ 6 callers
Method
IsText
IsText returns true if the object is textual and does not represent a path.
object.go:23
↓ 6 callers
Method
Objects
Objects returns all the objects found in the underlying grid.
canvas.go:23
↓ 6 callers
Function
scale
(p Point, scaleX, scaleY int)
svg.go:265
↓ 5 callers
Method
String
String implements fmt.Stringer on Point.
point.go:38
↓ 5 callers
Method
Tag
Tag returns the tag of this object, if any.
object.go:29
↓ 5 callers
Method
canRight
(p Point)
canvas.go:512
↓ 5 callers
Method
isCorner
()
char.go:40
↓ 5 callers
Method
isDiagonal
()
char.go:96
↓ 4 callers
Function
NewCanvas
NewCanvas returns a new Canvas, initialized from the provided data. If tabWidth is set to a non-negative value, that value will be used to convert tab
canvas.go:37
↓ 4 callers
Method
canLeft
(p Point)
canvas.go:508
↓ 4 callers
Method
isArrowVertical
()
char.go:80
↓ 4 callers
Method
isDot
()
char.go:104
↓ 4 callers
Method
isHorizontal
()
char.go:52
↓ 4 callers
Method
isTick
()
char.go:100
↓ 4 callers
Method
isVertical
()
char.go:60
↓ 4 callers
Method
visit
(p Point)
canvas.go:494
↓ 3 callers
Method
IsClosed
IsClosed is true if the object is composed of a closed path.
object.go:19
↓ 3 callers
Method
canDown
(p Point)
canvas.go:520
↓ 3 callers
Method
canUp
(p Point)
canvas.go:516
↓ 3 callers
Function
isDiagonalNE
(p1, p2 Point)
point.go:64
↓ 3 callers
Function
isHorizontal
isHorizontal returns true if p1 and p2 are horizontally aligned.
point.go:43
↓ 3 callers
Function
isVertical
isVertical returns true if p1 and p2 are vertically aligned.
point.go:49
↓ 3 callers
Method
seal
seal finalizes the object, setting its text, its corners, and its various rendering hints.
object.go:103
↓ 2 callers
Method
IsDashed
IsDashed is true if this object is a path object, and lines should be drawn dashed.
object.go:21
↓ 2 callers
Method
IsText
()
object.go:56
↓ 2 callers
Method
SetTag
SetTag sets an options tag on this Object so the renderer may look up options.
object.go:27
↓ 2 callers
Method
SetTag
(s string)
object.go:68
↓ 2 callers
Method
Size
Size returns the visual dimensions of the Canvas.
canvas.go:25
↓ 2 callers
Method
Text
Text returns the text associated with this Object if textual, and nil otherwise.
object.go:25
↓ 2 callers
Method
canHorizontal
()
char.go:121
↓ 2 callers
Method
canVertical
()
char.go:125
↓ 2 callers
Function
colorToRGB
colorToRGB matches a color string and returns its RGB components.
color.go:60
↓ 2 callers
Function
escape
(s string)
svg.go:251
↓ 2 callers
Function
flatten
(points []Point, scaleX, scaleY int)
svg.go:273
↓ 2 callers
Function
getCorners
(objs []Object)
canvas_test.go:652
↓ 2 callers
Function
getStrings
(objs []Object)
canvas_test.go:644
↓ 2 callers
Function
getTexts
(objs []Object)
canvas_test.go:629
↓ 2 callers
Method
isArrow
()
char.go:84
↓ 2 callers
Method
isArrowHorizontal
()
char.go:72
↓ 2 callers
Method
isArrowHorizontalLeft
()
char.go:68
↓ 2 callers
Method
isArrowVerticalUp
()
char.go:76
↓ 2 callers
Method
isDashedHorizontal
()
char.go:48
↓ 2 callers
Method
isDashedVertical
()
char.go:56
↓ 2 callers
Function
isDiagonalNW
(p1, p2 Point)
point.go:61
↓ 2 callers
Function
isDiagonalSE
The following functions return true when the diagonals are connected in various compass directions.
point.go:55
↓ 2 callers
Function
isDiagonalSW
(p1, p2 Point)
point.go:58
↓ 2 callers
Method
isObjectEndTag
()
char.go:14
↓ 2 callers
Method
isObjectStartTag
()
char.go:10
↓ 2 callers
Method
isSpace
()
char.go:31
↓ 2 callers
Function
pointsToCorners
pointsToCorners returns all the corners (points at which there is a change of directionality) for a path. It additionally returns a truth value indica
object.go:175
↓ 1 callers
Function
CanvasToSVG
CanvasToSVG renders the supplied asciitosvg.Canvas to SVG, based on the supplied options.
svg.go:61
↓ 1 callers
Method
EnclosingObjects
EnclosingObjects returns the set of objects that contain this point in order from most to least specific.
canvas.go:31
↓ 1 callers
Method
EnclosingObjects
(p Point)
canvas.go:166
↓ 1 callers
Method
HasPoint
HasPoint returns true if the object contains the supplied Point coordinates.
object.go:15
↓ 1 callers
Method
Options
Options returns a map of options to apply to Objects based on the object's tag. This maps tag name to a map of option names to options.
canvas.go:28
↓ 1 callers
Method
canDiagonal
(p Point)
canvas.go:524
↓ 1 callers
Method
canDiagonalFrom
Diagonal transitions are special: you can move lines diagonally, you can move diagonally from corners to edges or lines, but you cannot move diagonall
char.go:110
↓ 1 callers
Function
expandTabs
The expandTabs function pads tab characters to the specified width of spaces for the provided line of input. We cannot simply pad based on byte-offset
canvas.go:100
↓ 1 callers
Method
findObjects
findObjects finds all objects (lines, polygons, and text) within the underlying grid.
canvas.go:187
↓ 1 callers
Function
getPoints
Private details.
canvas_test.go:621
↓ 1 callers
Method
isDashed
()
char.go:64
↓ 1 callers
Method
isDiagonalNorthEast
()
char.go:88
↓ 1 callers
Method
isDiagonalSouthEast
()
char.go:92
↓ 1 callers
Method
isPathStart
isPathStart returns true on any form of ascii art that can start a graph.
char.go:36
↓ 1 callers
Method
isRoundedCorner
()
char.go:44
↓ 1 callers
Method
isTagDefinitionSeparator
()
char.go:18
↓ 1 callers
Method
isTextCont
()
char.go:27
↓ 1 callers
Method
isTextStart
()
char.go:22
↓ 1 callers
Function
mainImpl
()
cmd/a2s/a2s.go:31
↓ 1 callers
Method
next
The next returns the points that can be used to make progress, scanning (in order) horizontal progress to the left or right, vertical progress above o
canvas.go:295
↓ 1 callers
Function
parseHexColor
(c string)
color.go:11
↓ 1 callers
Method
scanPath
scanPath tries to complete a total path (for lines or polygons) starting with some partial path. It recurses when it finds multiple unvisited outgoing
canvas.go:245
↓ 1 callers
Method
scanText
scanText extracts a line of text.
canvas.go:381
↓ 1 callers
Function
textColor
textColor returns an accessible text color to use on top of a supplied background color. The formula used for calculating whether the contrast is acce
color.go:74
↓ 1 callers
Method
unvisit
(p Point)
canvas.go:500
Function
BenchmarkT
(b *testing.B)
canvas_test.go:576
Method
Corners
()
object.go:48
Method
HasPoint
HasPoint determines whether the supplied point lives inside the object. Since we support complex convex and concave polygons, we need to do a full poi
object.go:86
Method
IsClosed
()
object.go:52
Method
IsDashed
()
object.go:60
Method
Len
()
object.go:140
Method
Less
Less returns in order top most, then left most.
object.go:144
Method
Objects
()
canvas.go:154
Method
Options
()
canvas.go:162
Method
Points
()
object.go:44
Method
Size
()
canvas.go:158
Method
String
()
object.go:76
Method
String
()
canvas.go:150
Method
Swap
(i, j int)
object.go:141
Method
Tag
()
object.go:72
Function
TestCanvasToSVG
(t *testing.T)
svg_test.go:13
Function
TestNewCanvas
(t *testing.T)
canvas_test.go:13
Function
TestNewCanvasBroken
(t *testing.T)
canvas_test.go:457
Function
TestParseHexColor
(t *testing.T)
color_test.go:12
Function
TestPointsToCorners
(t *testing.T)
canvas_test.go:532
Method
Text
()
object.go:64
next →
1–100 of 101, ranked by callers