index 6056e4a2e3043853692d50402f0513d3726ec4dc..8fa2c5dcb0b5c5733ba0b13559a90cf5d82e9264 100644 (file)
Transformation::onSwitchPage(GtkNotebookPage *page,
guint pagenum)
{
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
}
void
x - bbox.min()[NR::X], y - bbox.min()[NR::Y]);
}
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()) );
}
void
}
void
}
} else {
NR::Rect bbox(selection->bounds());
}
} 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()) {
NR::scale scale (0,0);
// the values are increments!
if (_units_scale.isAbsolute()) {
sp_selection_scale_relative(selection, center, scale);
}
sp_selection_scale_relative(selection, center, scale);
}
- sp_document_done(SP_DT_DOCUMENT(selection->desktop()));
+ sp_document_done(sp_desktop_document(selection->desktop()));
}
void
}
void
sp_item_rotate_rel(item, NR::rotate (angle*M_PI/180.0));
}
} else {
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_selection_rotate_relative(selection, center, angle);
}
- sp_document_done(SP_DT_DOCUMENT(selection->desktop()));
-
+ sp_document_done(sp_desktop_document(selection->desktop()));
}
void
}
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::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("%");
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()));
}
}
for (GSList const *l = selection->itemList(); l != NULL; l = l->next) {
SPItem *item = SP_ITEM(l->data);
sp_item_set_item_transform(item, displayed);
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
}
}
} 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()));
}
}