7.7
3 Svg Style
(require simple-svg) | package: simple-svg |
each shape and group can have multiple styles: stroke, fill etc.
sstyle is a struct, use sstyle-new, sstyle-clone, sstyle-get and sstyle-set! to manage it.
sstyle used in svg-use-shape and svg-show-group.
struct
(struct sstyle ( fill fill-rule fill-opacity stroke stroke-width stroke-linecap stroke-linejoin stroke-miterlimit stroke-dasharray stroke-dashoffset translate rotate scale skewX skewY fil-gradient)) fill : string? fill-rule : (or/c #f 'nonzero 'evenodd 'inerit) fill-opacity : (or/c #f (between/c 0 1)) stroke : (or/c #f string?) stroke-width : (or/c #f natural?) stroke-linecap : (or/c #f 'butt 'round 'square 'inherit) stroke-linejoin : (or/c #f 'miter 'round 'bevel) stroke-miterlimit : (or/c #f (>=/c 1)) stroke-dasharray : (or/c #f string?) stroke-dashoffset : (or/c #f natural?) translate : (or/c #f (cons/c natural? natural?)) rotate : (or/c #f integer?) scale : (or/c #f natural? (cons/c natural? natural?)) skewX : (or/c #f natural?) skewY : (or/c #f natural?) fil-gradient : (or/c #f string?)
procedure
(sstyle-new) → sstyle/c
init a empty svg style.
procedure
(sstyle-clone sstyle) → sstyle/c
sstyle : sstyle/c
init a empty svg style.
procedure
(sstyle-get sstyle key) → sstyle/c
sstyle : sstyle/c key : symbol?
get a sstyle property.
procedure
(sstyle-set! sstyle key val) → void?
sstyle : sstyle/c key : symbol? val : any/c
set a sstyle property.