bring back
This commit is contained in:
parent
4d416f1053
commit
be525814b0
2 changed files with 18 additions and 2 deletions
|
@ -245,8 +245,7 @@ proc decodeCtxInternal(inherited: Ctx, node: XmlNode): Ctx =
|
|||
if strokeOpacity.len == 0:
|
||||
strokeOpacity = parts[1].strip()
|
||||
else:
|
||||
when defined(pixieDebugSvg):
|
||||
maybeLogPair(parts[0], parts[1])
|
||||
discard
|
||||
elif pair.len > 0:
|
||||
when defined(pixieDebugSvg):
|
||||
echo "Invalid style pair: ", pair
|
||||
|
|
|
@ -79,6 +79,23 @@ proc decodeCtxInternal(inherited: Ctx, node: XmlNode): Ctx =
|
|||
fillOpacity = node.attr("fill-opacity")
|
||||
strokeOpacity = node.attr("stroke-opacity")
|
||||
|
||||
when defined(pixieDebugSvg):
|
||||
proc maybeLogPair(k, v: string) =
|
||||
if k notin [
|
||||
"fill-rule", "fill", "stroke", "stroke-width", "stroke-linecap",
|
||||
"stroke-linejoin", "stroke-miterlimit", "stroke-dasharray",
|
||||
"transform", "style", "version", "viewBox", "width", "height",
|
||||
"xmlns", "x", "y", "x1", "x2", "y1", "y2", "id", "d", "cx", "cy",
|
||||
"r", "points", "rx", "ry", "enable-background", "xml:space",
|
||||
"xmlns:xlink", "data-name", "role", "class", "opacity",
|
||||
"fill-opacity", "stroke-opacity"
|
||||
]:
|
||||
echo k, ": ", v
|
||||
|
||||
if node.attrs() != nil:
|
||||
for k, v in node.attrs():
|
||||
maybeLogPair(k, v)
|
||||
|
||||
let pairs = style.split(';')
|
||||
for pair in pairs:
|
||||
let parts = pair.split(':')
|
||||
|
|
Loading…
Reference in a new issue