Lines Matching defs:box
2 * 3D box face implementation
50 // thus we don' set "sodipodi:type" so that the box is only saved as an ordinary svg:path
78 // TODO: In case the box was recreated (by undo, e.g.) we need to recreate the path
79 // (along with other info?) from the parent box.
123 /* Create a new Box3DSide and append it to the parent box */
124 Box3DSide * Box3DSide::createBox3DSide(SPBox3D *box)
127 Inkscape::XML::Document *xml_doc = box->document->rdoc;
130 box3d_side = static_cast<Box3DSide *>(box->appendChildRepr(repr_side));
160 SPBox3D *box = dynamic_cast<SPBox3D *>(parent);
161 if (!box) {
162 g_warning("Parent of 3D box side is not a 3D box.\n");
173 // To do this, determine the perspective of the box, the orientation of the side (e.g., XY-FRONT)
182 if (!box3d_get_corner_screen(box, corners[0]).isFinite() ||
183 !box3d_get_corner_screen(box, corners[1]).isFinite() ||
184 !box3d_get_corner_screen(box, corners[2]).isFinite() ||
185 !box3d_get_corner_screen(box, corners[3]).isFinite() )
187 g_warning ("Trying to draw a 3D box side with invalid coordinates.\n");
191 c->moveto(box3d_get_corner_screen(box, corners[0]));
192 c->lineto(box3d_get_corner_screen(box, corners[1]));
193 c->lineto(box3d_get_corner_screen(box, corners[2]));
194 c->lineto(box3d_get_corner_screen(box, corners[3]));
252 SPBox3D *box = side ? dynamic_cast<SPBox3D *>(side->parent) : NULL;
253 return box ? box->persp_ref->getObject() : NULL;