PathrockNetwork Gno Explorer
HomeBlocksTransactionsTokensRealmsPackagesValidatorsAnalytics

PathrockNetwork Gno Explorer — an independent explorer for Gno.land Mainnet (gnoland-1), operated by PathrockNetwork. Not an official Gno.land service.

gnowebarchive RPC

gno.land/p/nt/svg/v0

Package
Open in gnoweb ↗

Overview

Kind
Pure package
Name
v0
Namespace
nt / svg
Files
5 (gnomod.toml)
Exported functions
n/a — not supported for pure packages by the node (vm/qfuncs)
Module
gno.land/p/nt/svg/v0
gno
0.9

Files (5)

  • gnomod.tomltoml
  • doc.gnogno
  • svg.gnogno
  • z0_filetest.gnogno
  • z1_filetest.gnogno
doc.gnogno
1/*2Package svg is a minimalist and extensible SVG generation library for Gno.34It provides a structured way to create and compose SVG elements such as rectangles, circles, text, paths, and more. The package is designed to be modular and developer-friendly, enabling optional attributes and method chaining for ease of use.56Each SVG element embeds a BaseAttrs struct, which supports common SVG attributes like `id`, `class`, `style`, `fill`, `stroke`, and `transform`.78Canvas objects represent the root SVG container and support global dimensions, viewBox configuration, embedded styles, and element composition.910Example:1112	import "gno.land/p/nt/svg/v0"1314	func Foo() string {15		canvas := svg.NewCanvas(200, 200).WithViewBox(0, 0, 200, 200)16		canvas.AddStyle(".my-rect", "stroke:black;stroke-width:2")17		canvas.Append(18			svg.NewRectangle(60, 40, 100, 50, "red").WithClass("my-rect"),19			svg.NewCircle(50, 80, 40, "blue"),20			&svg.Path{D: `M 10,3021			A 20,20 0,0,1 50,3022				A 20,20 0,0,1  90,3023				Q 90,60 50,9024				Q 10,60 10,30 z`, Fill: "magenta"},25			svg.NewText(20, 50, "Hello SVG", "black"),26		)27		mysvg := canvas.Base64()28	}29*/30package svg // import "gno.land/p/nt/svg/v0"31

Functions

not supported for pure packages by the node (vm/qfuncs)

Signatures reconstructed verbatim from vm/qfuncs — interface params keep their inline definitions.