
I like the gsave/grestore option, as initclip may mess with clipping from earlier in the file, perhaps. Something like this:
--- ps.cpp 2 Mar 2005 02:31:31 -0000 1.56 +++ ps.cpp 18 Mar 2005 19:07:53 -0000 @@ -664,6 +664,8 @@ if (style->fill.type == SP_PAINT_TYPE_COLOR || SP_IS_GRADIENT (SP_STYLE_FILL_SERVER (style))) { Inkscape::SVGOStringStream os;
+ os << "gsave\n"; + print_fill_style(os, style);
print_bpath(os, bpath->path); @@ -701,6 +703,9 @@ } } } + + os << "grestore\n"; + fprintf(_stream, "%s", os.str().c_str()); }
Also, I am trying to make it so the units in the ellipse properties dialog (from a right click) is displayed in the default units of the document. I see a function to get the default units of a document, but I am unclear on how to get the current document. Any ideas?
-Michael Forbes
------------------------------------------------------------ Student System Operator binx.mbhs.edu BEN Manager http://ben.mbhs.edu BNC Internet Division http://bnc.mbhs.edu MBHS Webmaster http://www.mbhs.edu BlazerNet President http://blazernet.mbhs.edu Computer Team Co-President http://computerteam.mbhs.edu MBLUG President http://mblug.mbhs.edu ------------------------------------------------------------
On Fri, 18 Mar 2005 mental@...3... wrote:
--- extension/internal/ps.cpp 2 Mar 2005 02:31:31 -0000 1.56 +++ extension/internal/ps.cpp 18 Mar 2005 18:22:27 -0000 @@ -683,6 +683,7 @@ if (g->gradientTransform_set) { os << "grestore\n"; }
os << "initclip\n"; } } else { if (style->fill.type == SP_PAINT_TYPE_COLOR) {
@@ -699,6 +700,7 @@ if (g->gradientTransform_set) { os << "grestore\n"; }
os << "initclip\n"; } } fprintf(_stream, "%s", os.str().c_str());
Probably a better solution is to simply make the gsave/grestore unconditional. initclip completely resets the clipping state, which is bad if we want to implement SVG clipping properly later.
-mental