summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 761dcc1)
raw | patch | inline | side by side (parent: 761dcc1)
author | ishmal <ishmal@users.sourceforge.net> | |
Thu, 27 Apr 2006 06:12:22 +0000 (06:12 +0000) | ||
committer | ishmal <ishmal@users.sourceforge.net> | |
Thu, 27 Apr 2006 06:12:22 +0000 (06:12 +0000) |
src/extension/internal/odf.cpp | patch | blob | history |
index d950f4d1a1fc22d1fca526ef2ee82392389bfdc8..1487293bbcf9d18faeddc5ddf0db1021be9c26bf 100644 (file)
{
gi.style = "linear";
SPLinearGradient *linGrad = SP_LINEARGRADIENT(gradient);
+ gi.x1 = linGrad->x1.value;
+ gi.y1 = linGrad->y1.value;
+ gi.x2 = linGrad->x2.value;
+ gi.y2 = linGrad->y2.value;
}
else if (SP_IS_RADIALGRADIENT(gradient))
{
gi.style = "radial";
SPRadialGradient *radGrad = SP_RADIALGRADIENT(gradient);
+ gi.cx = radGrad->cx.computed * 100.0;//ODG cx is percentages
+ gi.cy = radGrad->cy.computed * 100.0;
}
else
{
{
GradientInfo gi(*giter);
outs.printf("<draw:gradient draw:name=\"%s\" ", gi.name.c_str());
- outs.printf("draw:display-name=\"%s\"", gi.name.c_str());
+ outs.printf("draw:display-name=\"%s\" ", gi.name.c_str());
+ outs.printf("draw:style=\"%s\" ", gi.style.c_str());
+ if (gi.style == "linear")
+ {
+ }
+ else if (gi.style == "gradient")
+ {
+ outs.printf("draw:cx=\".2f%%\" draw:cy=\".2f%%\" ", gi.cx, gi.cy);
+ }
+ else
+ {
+ g_warning("unsupported gradient style '%s'", gi.style.c_str());
+ }
outs.printf("/>\n");
}