summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 06bb11d)
raw | patch | inline | side by side (parent: 06bb11d)
author | cilix42 <cilix42@users.sourceforge.net> | |
Sat, 5 Jan 2008 02:45:08 +0000 (02:45 +0000) | ||
committer | cilix42 <cilix42@users.sourceforge.net> | |
Sat, 5 Jan 2008 02:45:08 +0000 (02:45 +0000) |
src/box3d-context.cpp | patch | blob | history | |
src/box3d-side.cpp | patch | blob | history | |
src/box3d-side.h | patch | blob | history |
diff --git a/src/box3d-context.cpp b/src/box3d-context.cpp
index edc45e8d153fdc487ac9157f70a262235b4ffe9f..83952d5ef6583999080f3a19fb2273592a7a0144 100644 (file)
--- a/src/box3d-context.cpp
+++ b/src/box3d-context.cpp
Inkscape::GC::release(repr);
/**** bc.item->transform = SP_ITEM(desktop->currentRoot())->getRelativeTransform(desktop->currentLayer()); ****/
Inkscape::XML::Node *repr_side;
+ // TODO: Incorporate this in box3d-side.cpp!
for (int i = 0; i < 6; ++i) {
repr_side = xml_doc->createElement("svg:path");
repr_side->setAttribute("sodipodi:type", "inkscape:box3dside");
side->dir2 = Box3D::extract_second_axis_direction(plane);
side->front_or_rear = (Box3D::FrontOrRear) (desc & 0x8);
+ /* Set style */
+ box3d_side_apply_style(side);
+
SP_OBJECT(side)->updateRepr(); // calls box3d_side_write() and updates, e.g., the axes string description
}
diff --git a/src/box3d-side.cpp b/src/box3d-side.cpp
index e4f60075b943c91d27d9616ee1677d20422fd79b..8cda01f72c9a2b740fc2f66a5df6dc7d23f0cde9 100644 (file)
--- a/src/box3d-side.cpp
+++ b/src/box3d-side.cpp
//static void box3d_side_set_shape (SPShape *shape);
//static void box3d_side_update_patheffect (SPShape *shape, bool write);
-static void box3d_side_apply_style (Box3DSide *side);
static Proj::Pt3 box3d_side_corner (Box3DSide *side, guint index);
static std::vector<Proj::Pt3> box3d_side_corners (Box3DSide *side);
// static gint box3d_side_descr_to_id (gchar const *descr);
if (((SPObjectClass *) parent_class)->build)
((SPObjectClass *) parent_class)->build (object, document, repr);
- sp_object_read_attr (object, "inkscape:box3dsidetype");
+ sp_object_read_attr(object, "inkscape:box3dsidetype");
}
static Inkscape::XML::Node *
repr->setAttribute("d", d);
g_free (d);
- box3d_side_apply_style (side);
-
if (((SPObjectClass *) (parent_class))->write)
((SPObjectClass *) (parent_class))->write (object, repr, flags);
//g_print ("box3d_side_update\n");
if (flags & (SP_OBJECT_MODIFIED_FLAG |
- //SP_OBJECT_CHILD_MODIFIED_FLAG |
SP_OBJECT_STYLE_MODIFIED_FLAG |
SP_OBJECT_VIEWPORT_MODIFIED_FLAG)) {
sp_shape_set_shape ((SPShape *) object);
sp_curve_unref (c);
}
-static void
-//box3d_side_apply_style (SPBox3D *box, bool extruded) {
+void
box3d_side_apply_style (Box3DSide *side) {
Inkscape::XML::Node *repr_face = SP_OBJECT_REPR(SP_OBJECT(side));
- /**
- if (!extruded && !strcmp (box3d_side_axes_string (), "XYrear")) {
- // to avoid "flashing" during the initial dragging process, we make the rear face invisible in this case
- repr_face->setAttribute("style", "fill:none");
- return;
- }
- **/
-
gchar *descr = g_strconcat ("desktop.", box3d_side_axes_string (side), NULL);
const gchar * cur_style = prefs_get_string_attribute(descr, "style");
g_free (descr);
diff --git a/src/box3d-side.h b/src/box3d-side.h
index e9154087f892edfa849608845c0da1d64107d732..d2a1d62c9b9e2a46a9a79311368b291dcb1b1709 100644 (file)
--- a/src/box3d-side.h
+++ b/src/box3d-side.h
//void sp_box3d_side_position_set (Box3DSide *side, NR::Point corner1, NR::Point corner2);
void box3d_side_set_shape (SPShape *shape);
void box3d_side_position_set (Box3DSide *side); // FIXME: Replace this by box3d_side_set_shape??
+void box3d_side_apply_style (Box3DSide *side);
gchar *box3d_side_axes_string(Box3DSide *side);
Persp3D *box3d_side_perspective(Box3DSide *side);