svg

package module
v0.0.0-...-def0138 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 22, 2023 License: MIT Imports: 3 Imported by: 1

README

go-app-svg

Svg support for go-app

Example

func (c*circle) Render() app.UI {
	return app.Div().Body(
		svg.Svg(
			attr.Width(100),
			attr.Height(100),
			attr.ViewBox(0, 0, 20, 20),
			attr.Fill("black"),
			svg.Circle(
				attr.Cx(10),
				attr.Cy(10),
				attr.R(10),
			),
		),
	)
}

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Namespace = "http://www.w3.org/2000/svg"

Functions

func A

func A(attrsOrElements ...any) app.HTMLElem

func Animate

func Animate(attrsOrElements ...any) app.HTMLElem

func AnimateMotion

func AnimateMotion(attrsOrElements ...any) app.HTMLElem

func Circle

func Circle(attrsOrElements ...any) app.HTMLElem

func ClipPath

func ClipPath(attrsOrElements ...any) app.HTMLElem

func Defs

func Defs(elements ...app.UI) app.HTMLElem

func Desc

func Desc(desc string) app.HTMLElem

Desc provides an accessible, long-text description of any SVG container element or graphics element.

func Discard

func Discard(attrs ...Attribute) app.HTMLElem

Discard allows authors to specify the time at which particular elements are to be discarded, thereby reducing the resources required by an SVG user agent.

func Element

func Element(tag string, stringAttrsOrElements ...any) app.HTMLElem

Element is for creating generic elements not currently defined in the package

func Ellipse

func Ellipse(attrsOrElements ...any) app.HTMLElem

func FeBlend

func FeBlend(attrsOrElements ...any) app.HTMLElem

func FeColorMatrix

func FeColorMatrix(attrsOrElements ...any) app.HTMLElem

func FeComponentTransfer

func FeComponentTransfer(attrsOrElements ...any) app.HTMLElem

func FeComposite

func FeComposite(attrsOrElements ...any) app.HTMLElem

func FeConvolveMatrix

func FeConvolveMatrix(attrsOrElements ...any) app.HTMLElem

func FeDiffuseLighting

func FeDiffuseLighting(attrsOrElements ...any) app.HTMLElem

func FeDisplacementMap

func FeDisplacementMap(attrsOrElements ...any) app.HTMLElem

func FeDistantLight

func FeDistantLight(attrsOrElements ...any) app.HTMLElem

func FeDropShadow

func FeDropShadow(attrsOrElements ...any) app.HTMLElem

func FeFlood

func FeFlood(attrsOrElements ...any) app.HTMLElem

func FeFuncA

func FeFuncA(attrsOrElements ...any) app.HTMLElem

func FeFuncB

func FeFuncB(attrsOrElements ...any) app.HTMLElem

func FeFuncG

func FeFuncG(attrsOrElements ...any) app.HTMLElem

func FeFuncR

func FeFuncR(attrsOrElements ...any) app.HTMLElem

func FeGaussianBlur

func FeGaussianBlur(attrsOrElements ...any) app.HTMLElem

func FeImage

func FeImage(attrsOrElements ...any) app.HTMLElem

func FeMerge

func FeMerge(attrsOrElements ...any) app.HTMLElem

func FeMergeNode

func FeMergeNode(attrsOrElements ...any) app.HTMLElem

func FeOffset

func FeOffset(attrsOrElements ...any) app.HTMLElem

func FePointLight

func FePointLight(attrsOrElements ...any) app.HTMLElem

func FeSpecularLighting

func FeSpecularLighting(attrsOrElements ...any) app.HTMLElem

func FeSpotLight

func FeSpotLight(attrsOrElements ...any) app.HTMLElem

func FeTile

func FeTile(attrsOrElements ...any) app.HTMLElem

func FeTurbulence

func FeTurbulence(attrsOrElements ...any) app.HTMLElem

func Filter

func Filter(attrsOrElements ...any) app.HTMLElem

func ForeignObject

func ForeignObject(attrsOrElements ...any) app.HTMLElem

func G

func G(attrsOrElements ...any) app.HTMLElem

func If

func If(value bool, trueStringAttrOrElem any, falseStringAttrOrElem any) any

func IfSlice

func IfSlice(value bool, trueStringAttrOrElem []any, falseStringAttrOrElem []any) []any

func Image

func Image(attrsOrElements ...any) app.HTMLElem

func Line

func Line(attrsOrElements ...any) app.HTMLElem

func LinearGradient

func LinearGradient(attrsOrElements ...any) app.HTMLElem

func MPath

func MPath(attrsOrElements ...any) app.HTMLElem

func Marker

func Marker(attrsOrElements ...any) app.HTMLElem

func Mask

func Mask(attrsOrElements ...any) app.HTMLElem

func Metadata

func Metadata(data any) app.HTMLElem

func Path

func Path(attrsOrElements ...any) app.HTMLElem

func Pattern

func Pattern(attrsOrElements ...any) app.HTMLElem

func Percent

func Percent(number Number) interface{}

func Polygon

func Polygon(attrsOrElements ...any) app.HTMLElem

func Polyline

func Polyline(attrsOrElements ...any) app.HTMLElem

func RadialGradient

func RadialGradient(attrsOrElements ...any) app.HTMLElem

func Rect

func Rect(attrsOrElements ...any) app.HTMLElem

func Set

func Set(attrs ...Attribute) app.HTMLElem

func Stop

func Stop(attrsOrElements ...any) app.HTMLElem

func Svg

func Svg(stringAttrsOrElements ...any) app.HTMLElem

func Switch

func Switch(attrsOrElements ...any) app.HTMLElem

func Symbol

func Symbol(attrsOrElements ...any) app.HTMLElem

func Text

func Text(stringAttrsOrElements ...any) app.HTMLElem

func TextPath

func TextPath(stringAttrsOrElements ...any) app.HTMLElem

func Title

func Title(value string, attrs ...Attribute) app.HTMLElem

func Tspan

func Tspan(value string, stringAttrsOrElements ...any) app.HTMLElem

func Use

func Use(attrs ...Attribute) app.HTMLElem

func View

func View(attrs ...Attribute) app.HTMLElem

Types

type Attribute

type Attribute interface {
	Name() string
	Value() any
}

type Length

type Length interface{}

type LengthOrPercent

type LengthOrPercent interface{}

type Number

type Number interface{}

type NumberOrPercent

type NumberOrPercent interface{}

Directories

Path Synopsis
examples

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL