summaryrefslogtreecommitdiffstats
path: root/src/display/sodipodi-ctrlrect.cpp
diff options
context:
space:
mode:
authorsu_v <suv-sf@users.sourceforge.net>2012-12-16 05:41:25 +0000
committer~suv <suv-sf@users.sourceforge.net>2012-12-16 05:41:25 +0000
commit7ec903c9898f872dbd9426ed7a62e1969fdb7be7 (patch)
treea306139e829118a83516af02279c9eafd3440eaa /src/display/sodipodi-ctrlrect.cpp
parentHershey Text: whitespace; py: docstring, modeline; inx: fix attribute value (diff)
parentTranslations.Spanish translation update by Lucas Vieites. (diff)
downloadinkscape-7ec903c9898f872dbd9426ed7a62e1969fdb7be7.tar.gz
inkscape-7ec903c9898f872dbd9426ed7a62e1969fdb7be7.zip
merge from trunk (r11955)
(bzr r11687.1.3)
Diffstat (limited to 'src/display/sodipodi-ctrlrect.cpp')
-rw-r--r--src/display/sodipodi-ctrlrect.cpp11
1 files changed, 5 insertions, 6 deletions
diff --git a/src/display/sodipodi-ctrlrect.cpp b/src/display/sodipodi-ctrlrect.cpp
index b0c997a92..c350e4614 100644
--- a/src/display/sodipodi-ctrlrect.cpp
+++ b/src/display/sodipodi-ctrlrect.cpp
@@ -61,9 +61,9 @@ GType sp_ctrlrect_get_type()
static void sp_ctrlrect_class_init(SPCtrlRectClass *c)
{
- SPCanvasItemClass *item_class = (SPCanvasItemClass *) c;
+ SPCanvasItemClass *item_class = SP_CANVAS_ITEM_CLASS(c);
- parent_class = (SPCanvasItemClass*) g_type_class_peek_parent(c);
+ parent_class = SP_CANVAS_ITEM_CLASS(g_type_class_peek_parent(c));
item_class->destroy = sp_ctrlrect_destroy;
item_class->update = sp_ctrlrect_update;
@@ -119,8 +119,6 @@ void CtrlRect::render(SPCanvasBuf *buf)
using Geom::X;
using Geom::Y;
- static double const dashes[2] = {4.0, 4.0};
-
if (!_area) {
return;
}
@@ -129,6 +127,7 @@ void CtrlRect::render(SPCanvasBuf *buf)
area[X].max() + _shadow_size, area[Y].max() + _shadow_size);
if ( area_w_shadow.intersects(buf->rect) )
{
+ static double const dashes[2] = {4.0, 4.0};
cairo_save(buf->ct);
cairo_translate(buf->ct, -buf->rect.left(), -buf->rect.top());
cairo_set_line_width(buf->ct, 1);
@@ -161,8 +160,8 @@ void CtrlRect::update(Geom::Affine const &affine, unsigned int flags)
using Geom::X;
using Geom::Y;
- if (((SPCanvasItemClass *) parent_class)->update) {
- ((SPCanvasItemClass *) parent_class)->update(this, affine, flags);
+ if ((SP_CANVAS_ITEM_CLASS(parent_class))->update) {
+ (SP_CANVAS_ITEM_CLASS(parent_class))->update(this, affine, flags);
}
sp_canvas_item_reset_bounds(this);