index 9182209f516658a062589c24102e0773fec644d5..2cd21a560152b7e556b4e777020f7096761c44f7 100644 (file)
########################################################################*/
void
-Transformation::present(Transformation::PageType page)
+Transformation::presentPage(Transformation::PageType page)
{
_notebook.set_current_page(page);
Gtk::Dialog::show();
Transformation::onSwitchPage(GtkNotebookPage *page,
guint pagenum)
{
- updateSelection((PageType)pagenum, SP_DT_SELECTION(SP_ACTIVE_DESKTOP));
+ updateSelection((PageType)pagenum, sp_desktop_selection(SP_ACTIVE_DESKTOP));
}
void
x - bbox.min()[NR::X], y - bbox.min()[NR::Y]);
}
- sp_document_done ( SP_DT_DOCUMENT (selection->desktop()) );
+ sp_document_done ( sp_desktop_document (selection->desktop()) , SP_VERB_DIALOG_TRANSFORM,
+ /* TODO: annotate */ "transformation.cpp:585");
}
void
}
} else {
NR::Rect bbox(selection->bounds());
- NR::Point center(bbox.midpoint());
+ NR::Point center(bbox.midpoint()); // use rotation center?
NR::scale scale (0,0);
// the values are increments!
if (_units_scale.isAbsolute()) {
sp_selection_scale_relative(selection, center, scale);
}
- sp_document_done(SP_DT_DOCUMENT(selection->desktop()));
+ sp_document_done(sp_desktop_document(selection->desktop()), SP_VERB_DIALOG_TRANSFORM,
+ /* TODO: annotate */ "transformation.cpp:637");
}
void
sp_item_rotate_rel(item, NR::rotate (angle*M_PI/180.0));
}
} else {
- NR::Rect bbox = selection->bounds();
- NR::Point center = bbox.midpoint();
+ NR::Point center = selection->center();
sp_selection_rotate_relative(selection, center, angle);
}
- sp_document_done(SP_DT_DOCUMENT(selection->desktop()));
-
+ sp_document_done(sp_desktop_document(selection->desktop()), SP_VERB_DIALOG_TRANSFORM,
+ /* TODO: annotate */ "transformation.cpp:656");
}
void
NR::Rect bbox = selection->bounds();
double width = bbox.max()[NR::X] - bbox.min()[NR::X];
double height = bbox.max()[NR::Y] - bbox.min()[NR::Y];
- NR::Point center = bbox.midpoint();
+ NR::Point center = selection->center();
if (!_units_skew.isAbsolute()) { // percentage
double skewX = _scalar_skew_horizontal.getValue("%");
}
}
- sp_document_done(SP_DT_DOCUMENT(selection->desktop()));
+ sp_document_done(sp_desktop_document(selection->desktop()), SP_VERB_DIALOG_TRANSFORM,
+ /* TODO: annotate */ "transformation.cpp:709");
}
for (GSList const *l = selection->itemList(); l != NULL; l = l->next) {
SPItem *item = SP_ITEM(l->data);
sp_item_set_item_transform(item, displayed);
+ SP_OBJECT(item)->updateRepr();
}
} else {
sp_selection_apply_affine(selection, displayed); // post-multiply each object's transform
}
- sp_document_done(SP_DT_DOCUMENT(selection->desktop()));
+ sp_document_done(sp_desktop_document(selection->desktop()), SP_VERB_DIALOG_TRANSFORM,
+ /* TODO: annotate */ "transformation.cpp:736");
}