X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;f=src%2Fbox3d.h;h=8273e35420324c6f2ace6011dfd98763f19dcc73;hb=a5d571851aead62983d1bd2672dda87b533f1ec8;hp=d34ac1ae042629e29e2efe3491eaec942c811440;hpb=13223d251a0eca100512280a15dc9b2213a28809;p=inkscape.git diff --git a/src/box3d.h b/src/box3d.h index d34ac1ae0..8273e3542 100644 --- a/src/box3d.h +++ b/src/box3d.h @@ -35,14 +35,14 @@ struct SPBox3D : public SPGroup { gchar *persp_href; Persp3DReference *persp_ref; - sigc::connection modified_connection; - Proj::Pt3 orig_corner0; Proj::Pt3 orig_corner7; Proj::Pt3 save_corner0; Proj::Pt3 save_corner7; + Box3D::Axis swapped; // to indicate which coordinates are swapped during dragging + gint my_counter; // for debugging only }; @@ -54,28 +54,29 @@ GType box3d_get_type (void); void box3d_position_set (SPBox3D *box); Proj::Pt3 box3d_get_proj_corner (SPBox3D const *box, guint id); -NR::Point box3d_get_corner_screen (SPBox3D const *box, guint id); +Geom::Point box3d_get_corner_screen (SPBox3D const *box, guint id, bool item_coords = true); Proj::Pt3 box3d_get_proj_center (SPBox3D *box); -NR::Point box3d_get_center_screen (SPBox3D *box); +Geom::Point box3d_get_center_screen (SPBox3D *box); -void box3d_set_corner (SPBox3D *box, guint id, NR::Point const &new_pos, Box3D::Axis movement, bool constrained); -void box3d_set_center (SPBox3D *box, NR::Point const &new_pos, NR::Point const &old_pos, Box3D::Axis movement, bool constrained); -void box3d_corners_for_PLs (const SPBox3D * box, Proj::Axis axis, NR::Point &corner1, NR::Point &corner2, NR::Point &corner3, NR::Point &corner4); +void box3d_set_corner (SPBox3D *box, guint id, Geom::Point const &new_pos, Box3D::Axis movement, bool constrained); +void box3d_set_center (SPBox3D *box, Geom::Point const &new_pos, Geom::Point const &old_pos, Box3D::Axis movement, bool constrained); +void box3d_corners_for_PLs (const SPBox3D * box, Proj::Axis axis, Geom::Point &corner1, Geom::Point &corner2, Geom::Point &corner3, Geom::Point &corner4); bool box3d_recompute_z_orders (SPBox3D *box); void box3d_set_z_orders (SPBox3D *box); -int box3d_pt_lies_in_PL_sector (SPBox3D const *box, NR::Point const &pt, int id1, int id2, Box3D::Axis axis); +int box3d_pt_lies_in_PL_sector (SPBox3D const *box, Geom::Point const &pt, int id1, int id2, Box3D::Axis axis); int box3d_VP_lies_in_PL_sector (SPBox3D const *box, Proj::Axis vpdir, int id1, int id2, Box3D::Axis axis); -/* ensures that the coordinates of corner0 and corner7 are in the correct order (to prevent everted boxes) */ void box3d_relabel_corners(SPBox3D *box); +void box3d_check_for_swapped_coords(SPBox3D *box); -void box3d_add_to_selection(SPBox3D *box); -void box3d_remove_from_selection(SPBox3D *box); -void box3d_mark_transformed(SPBox3D *box); +std::list box3d_extract_boxes(SPObject *obj); Persp3D *box3d_get_perspective(SPBox3D const *box); -void box3d_switch_perspectives(SPBox3D *box, Persp3D *old_persp, Persp3D *new_persp); +void box3d_switch_perspectives(SPBox3D *box, Persp3D *old_persp, Persp3D *new_persp, bool recompute_corners = false); + +SPGroup *box3d_convert_to_group(SPBox3D *box); + #endif /* __SP_BOX3D_H__ */ @@ -88,4 +89,4 @@ void box3d_switch_perspectives(SPBox3D *box, Persp3D *old_persp, Persp3D *new_pe 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 :