xml - Defining variables in SVG -
i have line filled in svg this:
<path d="m 0 45 l 100 45 l 100 55 l 0 55 z" fill="gray" />
i define thickness variable instead of hardcoding definition along lines of:
<path d="m 0 50 - t l 100 50 - t l 100 50 + t l 0 50 + t z" fill="gray" />
with t = 5
.
is possible in svg document?
svg has no such variables.
you can change attributes of svg elements clients-side (with javascript). more robust , simple way generate finished svg (without variables) on server, can use variables in server-side programming language of choice.
Comments
Post a Comment