我目前正在将我的一些应用程序从 ImageMagick MVG 移植到 SVG 输出。我大量使用了 MVG 的“push graphics-context”命令,现在想知道,在 SVG 中这个等价物是什么?
简而言之,“推送图形上下文”的作用(从其他来源复制):
When a graphic context is pushed, options set after the context is pushed
(such as coordinate transformations, color settings, etc.) are saved to a
new graphic context. This allows related options to be saved on a graphic
context "stack" in order to support hierarchical nesting of options. When
"pop graphic-context" is used to pop the current graphic context, the
options in effect during the "push graphic-context" operation are restored.
是否相当于使用嵌套的 SVG 文档,如下例所示?
<svg>
...
<svg>
...
</svg>
...
</svg>
还是我应该使用其他东西?
提前致谢!