index 417755e1973f19354dcae0a2367486cfa64ef04f..7098027c7847dd4dfc3316c1cff9b1ba0b50902d 100644 (file)
* Silveira Neto <silveiraneto@gmail.com>
* Jim Clarke <Jim.Clarke@sun.com>
* Jon A. Cruz <jon@joncruz.org>
+ * Abhishek Sharma
*
* Copyright (C) 2008,2009 Authors
*
unsigned int a = SP_RGBA32_A_U(rgba);
char buf[80];
snprintf(buf, 79, "Color.rgb(0x%02x, 0x%02x, 0x%02x, %s)",
- r, g, b, DSTR((double)a/256.0));
+ r, g, b, DSTR((double)a/255.0));
JavaFXOutput::String s = buf;
return s;
}
/**
* Fill
*/
- SPIPaint fill = style->fill;
+ SPIPaint const &fill = style->fill;
if (fill.isColor())
{
// see color.h for how to parse SPColor
*/
if (style->stroke_opacity.value > 0)
{
- SPIPaint stroke = style->stroke;
+ SPIPaint const &stroke = style->stroke;
out(" stroke: %s\n",
rgba(stroke.value.color, SP_SCALE24_TO_FLOAT(style->stroke_opacity.value)).c_str());
double strokewidth = style->stroke_width.value;
// convert the path to only lineto's and cubic curveto's:
Geom::Scale yflip(1.0, -1.0);
- Geom::Matrix tf = sp_item_i2d_affine(item) * yflip;
+ Geom::Matrix tf = item->i2d_affine() * yflip;
Geom::PathVector pathv = pathv_to_linear_and_cubic_beziers( curve->get_pathvector() * tf );
//Count the NR_CURVETOs/LINETOs (including closing line segment)
// convert the path to only lineto's and cubic curveto's:
Geom::Scale yflip(1.0, -1.0);
- Geom::Matrix tf = sp_item_i2d_affine(item) * yflip;
+ Geom::Matrix tf = item->i2d_affine() * yflip;
Geom::PathVector pathv = pathv_to_linear_and_cubic_beziers( curve->get_pathvector() * tf );
//Count the NR_CURVETOs/LINETOs (including closing line segment)
* Check the type of node and process
*/
String id;
- if (!obj->id)
+ if (!obj->getId())
{
char buf[16];
sprintf(buf, "id%d", idindex++);
}
else
{
- id = obj->id;
+ id = obj->getId();
}
if (SP_IS_ITEM(obj))
{
* Check the type of node and process
*/
String id;
- if (!obj->id)
+ if (!obj->getId())
{
char buf[16];
sprintf(buf, "id%d", idindex++);
}
else
{
- id = obj->id;
+ id = obj->getId();
}
if (SP_IS_ITEM(obj)) {
SPShape *shape = SP_SHAPE(item);
SPCurve *curve = shape->curve;
if (!curve->is_empty()) {
- out(" %s(),\n", id.c_str());
+ String jfxid = sanatize(id);
+ out(" %s(),\n", jfxid.c_str());
}
}
}
fill-column:99
End:
*/
-// vim: filetype=cpp:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:encoding=utf-8:textwidth=99 :
+// vim: filetype=cpp:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:fileencoding=utf-8:textwidth=99 :