Draws a circle on the canvas handle.
Example:
# Example for svg_circle
h = svg_start("test.svg", 100, 100)
svg_circle(h, 50, 50, 20)
svg_end(h)
Attach a definition to the canvas handle.
Example:
# Example for svg_def
h = svg_start("test.svg", 100, 100)
svg_def(h)
svg_def_end(h)
svg_end(h)
Ends a definition in handle.
Example:
# Example for svg_def_end
h = svg_start("test.svg", 100, 100)
svg_def(h)
svg_def_end(h)
svg_end(h)
Attach a description to the canvas handle.
Example:
# Example for svg_desc
h = svg_start("test.svg", 100, 100)
svg_desc(h, "Test SVG")
svg_end(h)
Draws an ellipse on the canvas handle.
Example:
# Example for svg_ellipse
h = svg_start("test.svg", 100, 100)
svg_ellipse(h, 50, 50, 30, 20)
svg_end(h)
Signals completion of the SVG canvas handle.
Example:
# Example for svg_end
h = svg_start("test.svg", 100, 100)
svg_end(h)
Draws a grid on the canvas handle.
Example:
# Example for svg_grid
h = svg_start("test.svg", 100, 100)
svg_grid(h, 10, 10, 0, 0, 100)
svg_end(h)
Attach a group definition to the canvas handle.
Example:
# Example for svg_group
h = svg_start("test.svg", 100, 100)
svg_group(h)
svg_group_end(h)
svg_end(h)
Ends a group definition in handle.
Example:
# Example for svg_group_end
h = svg_start("test.svg", 100, 100)
svg_group(h)
svg_group_end(h)
svg_end(h)
Links an image to the SVG canvas handle.
Example:
# Example for svg_image
h = svg_start("test.svg", 100, 100)
svg_image(h, 0, 0, 50, 50, "test.png")
svg_end(h)
Draws a line on the canvas handle.
Example:
# Example for svg_line
h = svg_start("test.svg", 100, 100)
svg_line(h, 0, 0, 100, 100)
svg_end(h)
Places a link on the canvas handle.
Example:
# Example for svg_link
h = svg_start("test.svg", 100, 100)
svg_link(h, "https://example.com", "Link")
svg_link_end(h)
svg_end(h)
Ends a link definition in handle.
Example:
# Example for svg_link_end
h = svg_start("test.svg", 100, 100)
svg_link(h, "https://example.com", "Link")
svg_link_end(h)
svg_end(h)
Plots a point on the canvas handle.
Example:
# Example for svg_plot
h = svg_start("test.svg", 100, 100)
svg_plot(h, 50, 50)
svg_end(h)
Draws a polygon on the canvas handle.
Example:
# Example for svg_polygon
h = svg_start("test.svg", 100, 100)
svg_polygon(h, to_typed([0, 50, 100], "[]int"), to_typed([0, 100, 0], "[]int"))
svg_end(h)
Draws a polyline on the canvas handle.
Example:
# Example for svg_polyline
h = svg_start("test.svg", 100, 100)
svg_polyline(h, to_typed([0, 50, 100], "[]int"), to_typed([0, 50, 100], "[]int"))
svg_end(h)
Draws a rectangle on the canvas handle.
Example:
# Example for svg_rect
h = svg_start("test.svg", 100, 100)
svg_rect(h, 10, 10, 80, 80)
svg_end(h)
Draws a rounded rectangle on the canvas handle.
Example:
# Example for svg_roundrect
h = svg_start("test.svg", 100, 100)
svg_roundrect(h, 10, 10, 80, 80, 5, 5)
svg_end(h)
Draws a square on the canvas handle.
Example:
# Example for svg_square
h = svg_start("test.svg", 100, 100)
svg_square(h, 10, 10, 80)
svg_end(h)
Returns a handle to a new SVG canvas. You must use this call to initiate the image creation process.
Returns an empty string on failure or a handle name on success.
Example:
# Example for svg_start
h = svg_start("test.svg", 100, 100)
svg_end(h)
Writes text to the SVG canvas handle.
Example:
# Example for svg_text
h = svg_start("test.svg", 100, 100)
svg_text(h, 50, 50, "Hello")
svg_end(h)
Places a title on the canvas handle.
Example:
# Example for svg_title
h = svg_start("test.svg", 100, 100)
svg_title(h, "Test")
svg_end(h)