summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: ad63698)
raw | patch | inline | side by side (parent: ad63698)
author | pjrm <pjrm@users.sourceforge.net> | |
Sat, 29 Sep 2007 07:22:11 +0000 (07:22 +0000) | ||
committer | pjrm <pjrm@users.sourceforge.net> | |
Sat, 29 Sep 2007 07:22:11 +0000 (07:22 +0000) |
index 17fa97281da8f44c7b5d205f81dc5a9b16753758..d7e60596f0f395dbc21ce442287ec3cf11036e58 100644 (file)
#define SPACE_SIZE_X 15
#define SPACE_SIZE_Y 10
static inline void
-attach_all (Gtk::Table &table, const Gtk::Widget *arr[], unsigned size, int start = 0)
+attach_all(Gtk::Table &table, Gtk::Widget const *const arr[], unsigned size, int start = 0)
{
for (unsigned i=0, r=start; i<size/sizeof(Gtk::Widget*); i+=2)
{
@@ -241,8 +241,7 @@ CanvasAxonomGrid::CanvasAxonomGrid (SPNamedView * nv, Inkscape::XML::Node * in_r
"empcolor", "empopacity", _wr, repr, doc);
_rsi.init (_("_Major grid line every:"), _("lines"), "empspacing", _wr, repr, doc);
- const Gtk::Widget* widget_array[] =
- {
+ Gtk::Widget const *const widget_array[] = {
0, _rcbgrid._button,
_rumg._label, _rumg._sel,
0, _rsu_ox.getSU(),
/* fixme: Collect all these length parsing methods and think common sane API */
-static gboolean sp_nv_read_length(const gchar *str, guint base, gdouble *val, const SPUnit **unit)
+static gboolean sp_nv_read_length(gchar const *str, guint base, gdouble *val, SPUnit const **unit)
{
if (!str) {
return FALSE;
@@ -322,7 +321,7 @@ static gboolean sp_nv_read_length(const gchar *str, guint base, gdouble *val, co
return FALSE;
}
-static gboolean sp_nv_read_opacity(const gchar *str, guint32 *color)
+static gboolean sp_nv_read_opacity(gchar const *str, guint32 *color)
{
if (!str) {
return FALSE;
void
CanvasAxonomGrid::readRepr()
{
- gchar const* value;
+ gchar const *value;
if ( (value = repr->attribute("originx")) ) {
sp_nv_read_length(value, SP_UNIT_ABSOLUTE | SP_UNIT_DEVICE, &origin[NR::X], &gridunit);
origin[NR::X] = sp_units_get_pixels(origin[NR::X], *(gridunit));
* Called when XML node attribute changed; updates dialog widgets if change was not done by widgets themselves.
*/
void
-CanvasAxonomGrid::onReprAttrChanged (Inkscape::XML::Node * repr, const gchar *key, const gchar *oldval, const gchar *newval, bool is_interactive)
+CanvasAxonomGrid::onReprAttrChanged(Inkscape::XML::Node *repr, gchar const *key, gchar const *oldval, gchar const *newval, bool is_interactive)
{
readRepr();
// render the three separate line groups representing the main-axes:
// x-axis always goes from topleft to bottomright. (0,0) - (1,1)
- const gdouble xintercept_y_bc = (buf_tl_gc[NR::X] * tan_angle[X]) - buf_tl_gc[NR::Y] ;
- const gdouble xstart_y_sc = ( xintercept_y_bc - floor(xintercept_y_bc/lyw)*lyw ) + buf->rect.y0;
- const gint xlinestart = (gint) Inkscape::round( (xstart_y_sc - ow[NR::Y]) / lyw );
+ gdouble const xintercept_y_bc = (buf_tl_gc[NR::X] * tan_angle[X]) - buf_tl_gc[NR::Y] ;
+ gdouble const xstart_y_sc = ( xintercept_y_bc - floor(xintercept_y_bc/lyw)*lyw ) + buf->rect.y0;
+ gint const xlinestart = (gint) Inkscape::round( (xstart_y_sc - ow[NR::Y]) / lyw );
gint xlinenum;
// lijnen vanaf linker zijkant.
for (y = xstart_y_sc, xlinenum = xlinestart; y < buf->rect.y1; y += lyw, xlinenum++) {
- const gint x0 = buf->rect.x0;
- const gint y0 = (gint) Inkscape::round(y);
- const gint x1 = x0 + (gint) Inkscape::round( (buf->rect.y1 - y) / tan_angle[X] );
- const gint y1 = buf->rect.y1;
+ gint const x0 = buf->rect.x0;
+ gint const y0 = (gint) Inkscape::round(y);
+ gint const x1 = x0 + (gint) Inkscape::round( (buf->rect.y1 - y) / tan_angle[X] );
+ gint const y1 = buf->rect.y1;
if (!scaled && (xlinenum % empspacing) == 0) {
sp_caxonomgrid_drawline (buf, x0, y0, x1, y1, empcolor);
}
}
// lijnen vanaf bovenkant.
- const gdouble xstart_x_sc = buf->rect.x0 + (lxw_x - (xstart_y_sc - buf->rect.y0) / tan_angle[X]) ;
+ gdouble const xstart_x_sc = buf->rect.x0 + (lxw_x - (xstart_y_sc - buf->rect.y0) / tan_angle[X]) ;
for (x = xstart_x_sc, xlinenum = xlinestart; x < buf->rect.x1; x += lxw_x, xlinenum--) {
- const gint y0 = buf->rect.y0;
- const gint y1 = buf->rect.y1;
- const gint x0 = (gint) Inkscape::round(x);
- const gint x1 = x0 + (gint) Inkscape::round( (y1 - y0) / tan_angle[X] );
+ gint const y0 = buf->rect.y0;
+ gint const y1 = buf->rect.y1;
+ gint const x0 = (gint) Inkscape::round(x);
+ gint const x1 = x0 + (gint) Inkscape::round( (y1 - y0) / tan_angle[X] );
if (!scaled && (xlinenum % empspacing) == 0) {
sp_caxonomgrid_drawline (buf, x0, y0, x1, y1, empcolor);
// y-axis lines (vertical)
- const gdouble ystart_x_sc = floor (buf_tl_gc[NR::X] / spacing_ylines) * spacing_ylines + ow[NR::X];
- const gint ylinestart = (gint) Inkscape::round((ystart_x_sc - ow[NR::X]) / spacing_ylines);
+ gdouble const ystart_x_sc = floor (buf_tl_gc[NR::X] / spacing_ylines) * spacing_ylines + ow[NR::X];
+ gint const ylinestart = (gint) Inkscape::round((ystart_x_sc - ow[NR::X]) / spacing_ylines);
gint ylinenum;
for (x = ystart_x_sc, ylinenum = ylinestart; x < buf->rect.x1; x += spacing_ylines, ylinenum++) {
- const gint x0 = (gint) Inkscape::round(x);
+ gint const x0 = (gint) Inkscape::round(x);
if (!scaled && (ylinenum % empspacing) == 0) {
sp_grid_vline (buf, x0, buf->rect.y0, buf->rect.y1 - 1, empcolor);
}
// z-axis always goes from bottomleft to topright. (0,1) - (1,0)
- const gdouble zintercept_y_bc = (buf_tl_gc[NR::X] * -tan_angle[Z]) - buf_tl_gc[NR::Y] ;
- const gdouble zstart_y_sc = ( zintercept_y_bc - floor(zintercept_y_bc/lyw)*lyw ) + buf->rect.y0;
- const gint zlinestart = (gint) Inkscape::round( (zstart_y_sc - ow[NR::Y]) / lyw );
+ gdouble const zintercept_y_bc = (buf_tl_gc[NR::X] * -tan_angle[Z]) - buf_tl_gc[NR::Y] ;
+ gdouble const zstart_y_sc = ( zintercept_y_bc - floor(zintercept_y_bc/lyw)*lyw ) + buf->rect.y0;
+ gint const zlinestart = (gint) Inkscape::round( (zstart_y_sc - ow[NR::Y]) / lyw );
gint zlinenum;
// lijnen vanaf linker zijkant.
for (y = zstart_y_sc, zlinenum = zlinestart; y < buf->rect.y1; y += lyw, zlinenum++) {
- const gint x0 = buf->rect.x0;
- const gint y0 = (gint) Inkscape::round(y);
- const gint x1 = x0 + (gint) Inkscape::round( (y - buf->rect.y0 ) / tan_angle[Z] );
- const gint y1 = buf->rect.y0;
+ gint const x0 = buf->rect.x0;
+ gint const y0 = (gint) Inkscape::round(y);
+ gint const x1 = x0 + (gint) Inkscape::round( (y - buf->rect.y0 ) / tan_angle[Z] );
+ gint const y1 = buf->rect.y0;
if (!scaled && (zlinenum % empspacing) == 0) {
sp_caxonomgrid_drawline (buf, x0, y0, x1, y1, empcolor);
}
}
// draw lines from bottom-up
- const gdouble zstart_x_sc = buf->rect.x0 + (y - buf->rect.y1) / tan_angle[Z] ;
+ gdouble const zstart_x_sc = buf->rect.x0 + (y - buf->rect.y1) / tan_angle[Z] ;
for (x = zstart_x_sc; x < buf->rect.x1; x += lxw_z, zlinenum--) {
- const gint y0 = buf->rect.y1;
- const gint y1 = buf->rect.y0;
- const gint x0 = (gint) Inkscape::round(x);
- const gint x1 = x0 + (gint) Inkscape::round( (buf->rect.y1 - buf->rect.y0) / tan_angle[Z] );
+ gint const y0 = buf->rect.y1;
+ gint const y1 = buf->rect.y0;
+ gint const x0 = (gint) Inkscape::round(x);
+ gint const x1 = x0 + (gint) Inkscape::round( (buf->rect.y1 - buf->rect.y0) / tan_angle[Z] );
if (!scaled && (zlinenum % empspacing) == 0) {
sp_caxonomgrid_drawline (buf, x0, y0, x1, y1, empcolor);
index 6c97e260594936025172c46e88a9d06fc6c62374..7c391803e94f46dd5dda4e8930d5ea410390418a 100644 (file)
#define DEFAULTGRIDCOLOR 0x0000FF20
#define DEFAULTGRIDEMPCOLOR 0x0000FF40
-const gchar *grid_name [] = {
+static gchar const *const grid_name[] = {
N_("Rectangular grid"),
N_("Axonometric grid")
};
-const gchar *grid_svgname [] = {
+static gchar const *const grid_svgname[] = {
"xygrid",
"axonomgrid"
};
-const char *
+char const *
CanvasGrid::getName(GridType type)
{
return _(grid_name[type]);
}
-const char *
+char const *
CanvasGrid::getSVGName(GridType type)
{
return grid_svgname[type];
}
GridType
-CanvasGrid::getGridTypeFromSVGName(const char * typestr)
+CanvasGrid::getGridTypeFromSVGName(char const *typestr)
{
if (!typestr) return GRID_RECTANGULAR;
}
GridType
-CanvasGrid::getGridTypeFromName(const char * typestr)
+CanvasGrid::getGridTypeFromName(char const *typestr)
{
if (!typestr) return GRID_RECTANGULAR;
}
void
-CanvasGrid::on_repr_attr_changed (Inkscape::XML::Node * repr, const gchar *key, const gchar *oldval, const gchar *newval, bool is_interactive, void * data)
+CanvasGrid::on_repr_attr_changed(Inkscape::XML::Node *repr, gchar const *key, gchar const *oldval, gchar const *newval, bool is_interactive, void *data)
{
if (!data)
return;
#define SPACE_SIZE_X 15
#define SPACE_SIZE_Y 10
static inline void
-attach_all (Gtk::Table &table, const Gtk::Widget *arr[], unsigned size, int start = 0)
+attach_all(Gtk::Table &table, Gtk::Widget const *const arr[], unsigned size, int start = 0)
{
for (unsigned i=0, r=start; i<size/sizeof(Gtk::Widget*); i+=2)
{
@@ -384,8 +384,7 @@ CanvasXYGrid::CanvasXYGrid (SPNamedView * nv, Inkscape::XML::Node * in_repr, SPD
_("If set, displays dots at gridpoints instead of gridlines"),
"dotted", _wr, false, repr, doc);
- const Gtk::Widget* widget_array[] =
- {
+ Gtk::Widget const *const widget_array[] = {
_rumg._label, _rumg._sel,
0, _rsu_ox.getSU(),
0, _rsu_oy.getSU(),
/* fixme: Collect all these length parsing methods and think common sane API */
-static gboolean sp_nv_read_length(const gchar *str, guint base, gdouble *val, const SPUnit **unit)
+static gboolean
+sp_nv_read_length(gchar const *str, guint base, gdouble *val, SPUnit const **unit)
{
if (!str) {
return FALSE;
@@ -464,7 +464,7 @@ static gboolean sp_nv_read_length(const gchar *str, guint base, gdouble *val, co
return FALSE;
}
-static gboolean sp_nv_read_opacity(const gchar *str, guint32 *color)
+static gboolean sp_nv_read_opacity(gchar const *str, guint32 *color)
{
if (!str) {
return FALSE;
CanvasXYGrid::readRepr()
{
char buff[100];
- gchar const* value;
+ gchar const *value;
if ( (value = repr->attribute("originx")) ) {
sp_nv_read_length(value, SP_UNIT_ABSOLUTE | SP_UNIT_DEVICE, &origin[NR::X], &gridunit);
origin[NR::X] = sp_units_get_pixels(origin[NR::X], *(gridunit));
* Called when XML node attribute changed; updates dialog widgets if change was not done by widgets themselves.
*/
void
-CanvasXYGrid::onReprAttrChanged (Inkscape::XML::Node * repr, const gchar *key, const gchar *oldval, const gchar *newval, bool is_interactive)
+CanvasXYGrid::onReprAttrChanged(Inkscape::XML::Node *repr, gchar const *key, gchar const *oldval, gchar const *newval, bool is_interactive)
{
readRepr();
void
CanvasXYGrid::Render (SPCanvasBuf *buf)
{
- const gdouble sxg = floor ((buf->rect.x0 - ow[NR::X]) / sw[NR::X]) * sw[NR::X] + ow[NR::X];
- const gint xlinestart = (gint) Inkscape::round((sxg - ow[NR::X]) / sw[NR::X]);
- const gdouble syg = floor ((buf->rect.y0 - ow[NR::Y]) / sw[NR::Y]) * sw[NR::Y] + ow[NR::Y];
- const gint ylinestart = (gint) Inkscape::round((syg - ow[NR::Y]) / sw[NR::Y]);
+ gdouble const sxg = floor ((buf->rect.x0 - ow[NR::X]) / sw[NR::X]) * sw[NR::X] + ow[NR::X];
+ gint const xlinestart = (gint) Inkscape::round((sxg - ow[NR::X]) / sw[NR::X]);
+ gdouble const syg = floor ((buf->rect.y0 - ow[NR::Y]) / sw[NR::Y]) * sw[NR::Y] + ow[NR::Y];
+ gint const ylinestart = (gint) Inkscape::round((syg - ow[NR::Y]) / sw[NR::Y]);
if (!render_dotted) {
gint ylinenum;
gdouble y;
for (y = syg, ylinenum = ylinestart; y < buf->rect.y1; y += sw[NR::Y], ylinenum++) {
- const gint y0 = (gint) Inkscape::round(y);
+ gint const y0 = (gint) Inkscape::round(y);
if (!scaled[NR::Y] && (ylinenum % empspacing) == 0) {
grid_hline (buf, y0, buf->rect.x0, buf->rect.x1 - 1, empcolor);
gint xlinenum;
gdouble x;
for (x = sxg, xlinenum = xlinestart; x < buf->rect.x1; x += sw[NR::X], xlinenum++) {
- const gint ix = (gint) Inkscape::round(x);
+ gint const ix = (gint) Inkscape::round(x);
if (!scaled[NR::X] && (xlinenum % empspacing) == 0) {
grid_vline (buf, ix, buf->rect.y0, buf->rect.y1, empcolor);
} else {
gint ylinenum;
gdouble y;
for (y = syg, ylinenum = ylinestart; y < buf->rect.y1; y += sw[NR::Y], ylinenum++) {
- const gint iy = (gint) Inkscape::round(y);
+ gint const iy = (gint) Inkscape::round(y);
gint xlinenum;
gdouble x;
for (x = sxg, xlinenum = xlinestart; x < buf->rect.x1; x += sw[NR::X], xlinenum++) {
- const gint ix = (gint) Inkscape::round(x);
+ gint const ix = (gint) Inkscape::round(x);
if ( (!scaled[NR::X] && (xlinenum % empspacing) == 0)
|| (!scaled[NR::Y] && (ylinenum % empspacing) == 0) )
{
index e388fca1d0e84d013fe422cb7be45a8144dd9cce..6f30937829e35a7f3aa95dc8bd461671f67b50b2 100644 (file)
@@ -201,14 +201,14 @@ nr_arena_image_render (cairo_t *ct, NRArenaItem *item, NRRectL *area, NRPixBlock
if (Falpha < 1) return item->state;
unsigned char * dpx = NR_PIXBLOCK_PX (pb);
- const int drs = pb->rs;
- const int dw = pb->area.x1 - pb->area.x0;
- const int dh = pb->area.y1 - pb->area.y0;
+ int const drs = pb->rs;
+ int const dw = pb->area.x1 - pb->area.x0;
+ int const dh = pb->area.y1 - pb->area.y0;
unsigned char * spx = image->px;
- const int srs = image->pxrs;
- const int sw = image->pxw;
- const int sh = image->pxh;
+ int const srs = image->pxrs;
+ int const sw = image->pxw;
+ int const sh = image->pxh;
if (pb->mode == NR_PIXBLOCK_MODE_R8G8B8) {
/* fixme: This is not implemented yet (Lauris) */
@@ -312,13 +312,13 @@ nr_arena_image_pick (NRArenaItem *item, NR::Point p, double delta, unsigned int
} else {
- unsigned char * const pixels = image->px;
- const int width = image->pxw;
- const int height = image->pxh;
- const int rowstride = image->pxrs;
+ unsigned char *const pixels = image->px;
+ int const width = image->pxw;
+ int const height = image->pxh;
+ int const rowstride = image->pxrs;
NR::Point tp = p * image->grid2px;
- const int ix = (int)(tp[NR::X]);
- const int iy = (int)(tp[NR::Y]);
+ int const ix = (int)(tp[NR::X]);
+ int const iy = (int)(tp[NR::Y]);
if ((ix < 0) || (iy < 0) || (ix >= width) || (iy >= height))
return NULL;
/* Utility */
void
-nr_arena_image_set_pixels (NRArenaImage *image, const unsigned char *px, unsigned int pxw, unsigned int pxh, unsigned int pxrs)
+nr_arena_image_set_pixels (NRArenaImage *image, unsigned char const *px, unsigned int pxw, unsigned int pxh, unsigned int pxrs)
{
nr_return_if_fail (image != NULL);
nr_return_if_fail (NR_IS_ARENA_IMAGE (image));
index d7a9c1c7c24bf9ad962907885e5eb61512d811ae..f9861b2ff596e36d79a6d4d148fa74fb7e90759d 100644 (file)
NRArenaItemClass parent_class;
};
-void nr_arena_image_set_pixels (NRArenaImage *image, const unsigned char *px, unsigned int pxw, unsigned int pxh, unsigned int pxrs);
+void nr_arena_image_set_pixels (NRArenaImage *image, unsigned char const *px, unsigned int pxw, unsigned int pxh, unsigned int pxrs);
void nr_arena_image_set_geometry (NRArenaImage *image, double x, double y, double width, double height);
void nr_arena_image_set_style (NRArenaImage *image, SPStyle *style);
index 9b4c846fe1d68c91edffe6c790b164336d054dae..c3ff59b3975dd13b6b6cde52b071fade5279b5f7 100644 (file)
};
void nr_arena_shape_set_path(NRArenaShape *shape, SPCurve *curve, bool justTrans);
-void nr_arena_shape_set_style (NRArenaShape *shape, SPStyle *style);
-void nr_arena_shape_set_paintbox (NRArenaShape *shape, const NRRect *pbox);
+void nr_arena_shape_set_style(NRArenaShape *shape, SPStyle *style);
+void nr_arena_shape_set_paintbox(NRArenaShape *shape, NRRect const *pbox);
#endif
index 27f53633cd487b3eac36421d5e1de1427f90ba78..fd655edb054eb681ccb95c19cdc10d7a0de42df7 100644 (file)
{
static GtkType ctrl_type = 0;
if (!ctrl_type) {
- static const GTypeInfo ctrl_info = {
+ static GTypeInfo const ctrl_info = {
sizeof (SPCtrlClass),
NULL, /* base_init */
NULL, /* base_finalize */
*actual_item = item;
- const double x = p[NR::X];
- const double y = p[NR::Y];
+ double const x = p[NR::X];
+ double const y = p[NR::Y];
if ((x >= ctrl->box.x0) && (x <= ctrl->box.x1) && (y >= ctrl->box.y0) && (y <= ctrl->box.y1)) return 0.0;
index 284328d7f85f94ba1979d3b44b9b5578d2721072..a0c74b2c3fed1332fec51f5fbc646a8bd7c9989a 100644 (file)
gint
sp_canvas_item_compare_z (SPCanvasItem * a, SPCanvasItem * b)
{
- const gint o_a = sp_canvas_item_order (a);
- const gint o_b = sp_canvas_item_order (b);
+ gint const o_a = sp_canvas_item_order (a);
+ gint const o_b = sp_canvas_item_order (b);
if (o_a > o_b) return -1;
if (o_a < o_b) return 1;
index 1714bd454e246abcff32c90af93be9f9536588a0..f6a27b076bde56aebbedfefbc30b76c191c0a001 100644 (file)
RENDERMODE_OUTLINE
};
-const gint sp_canvas_update_priority = G_PRIORITY_HIGH_IDLE;
+static gint const sp_canvas_update_priority = G_PRIORITY_HIGH_IDLE;
#define SP_CANVAS_WINDOW(c) (((GtkWidget *) (c))->window)
static void sp_canvas_item_class_init (SPCanvasItemClass *klass);
static void sp_canvas_item_init (SPCanvasItem *item);
static void sp_canvas_item_dispose (GObject *object);
-static void sp_canvas_item_construct (SPCanvasItem *item, SPCanvasGroup *parent, const gchar *first_arg_name, va_list args);
+static void sp_canvas_item_construct (SPCanvasItem *item, SPCanvasGroup *parent, gchar const *first_arg_name, va_list args);
static int emit_event (SPCanvas *canvas, GdkEvent *event);
{
static GType type = 0;
if (!type) {
- static const GTypeInfo info = {
+ static GTypeInfo const info = {
sizeof (SPCanvasItemClass),
NULL, NULL,
(GClassInitFunc) sp_canvas_item_class_init,
* Constructs new SPCanvasItem on SPCanvasGroup.
*/
SPCanvasItem *
-sp_canvas_item_new (SPCanvasGroup *parent, GtkType type, const gchar *first_arg_name, ...)
+sp_canvas_item_new (SPCanvasGroup *parent, GtkType type, gchar const *first_arg_name, ...)
{
va_list args;
@@ -193,7 +193,7 @@ sp_canvas_item_new (SPCanvasGroup *parent, GtkType type, const gchar *first_arg_
* We make it static for encapsulation reasons since it was nowhere used.
*/
static void
-sp_canvas_item_construct (SPCanvasItem *item, SPCanvasGroup *parent, const gchar *first_arg_name, va_list args)
+sp_canvas_item_construct (SPCanvasItem *item, SPCanvasGroup *parent, gchar const *first_arg_name, va_list args)
{
g_return_if_fail (SP_IS_CANVAS_GROUP (parent));
g_return_if_fail (SP_IS_CANVAS_ITEM (item));
@@ -323,7 +323,7 @@ sp_canvas_item_invoke_point (SPCanvasItem *item, NR::Point p, SPCanvasItem **act
* @affine: An affine transformation matrix.
*/
void
-sp_canvas_item_affine_absolute (SPCanvasItem *item, NR::Matrix const& affine)
+sp_canvas_item_affine_absolute (SPCanvasItem *item, NR::Matrix const &affine)
{
item->xform = affine;
static GtkType group_type = 0;
if (!group_type) {
- static const GtkTypeInfo group_info = {
+ static GtkTypeInfo const group_info = {
"SPCanvasGroup",
sizeof (SPCanvasGroup),
sizeof (SPCanvasGroupClass),
g_return_if_fail (object != NULL);
g_return_if_fail (SP_IS_CANVAS_GROUP (object));
- const SPCanvasGroup *group = SP_CANVAS_GROUP (object);
+ SPCanvasGroup const *group = SP_CANVAS_GROUP (object);
GList *list = group->items;
while (list) {
static void
sp_canvas_group_update (SPCanvasItem *item, NR::Matrix const &affine, unsigned int flags)
{
- const SPCanvasGroup *group = SP_CANVAS_GROUP (item);
+ SPCanvasGroup const *group = SP_CANVAS_GROUP (item);
NR::ConvexHull corners(NR::Point(0, 0));
bool empty=true;
@@ -798,9 +798,9 @@ sp_canvas_group_update (SPCanvasItem *item, NR::Matrix const &affine, unsigned i
static double
sp_canvas_group_point (SPCanvasItem *item, NR::Point p, SPCanvasItem **actual_item)
{
- const SPCanvasGroup *group = SP_CANVAS_GROUP (item);
- const double x = p[NR::X];
- const double y = p[NR::Y];
+ SPCanvasGroup const *group = SP_CANVAS_GROUP (item);
+ double const x = p[NR::X];
+ double const y = p[NR::Y];
int x1 = (int)(x - item->canvas->close_enough);
int y1 = (int)(y - item->canvas->close_enough);
int x2 = (int)(x + item->canvas->close_enough);
@@ -840,7 +840,7 @@ sp_canvas_group_point (SPCanvasItem *item, NR::Point p, SPCanvasItem **actual_it
static void
sp_canvas_group_render (SPCanvasItem *item, SPCanvasBuf *buf)
{
- const SPCanvasGroup *group = SP_CANVAS_GROUP (item);
+ SPCanvasGroup const *group = SP_CANVAS_GROUP (item);
for (GList *list = group->items; list; list = list->next) {
SPCanvasItem *child = (SPCanvasItem *)list->data;
static GtkType canvas_type = 0;
if (!canvas_type) {
- static const GtkTypeInfo canvas_info = {
+ static GtkTypeInfo const canvas_info = {
"SPCanvas",
sizeof (SPCanvas),
sizeof (SPCanvasClass),
SPCanvas *canvas = SP_CANVAS (data);
- const int ret = do_update (canvas);
+ int const ret = do_update (canvas);
if (ret) {
/* Reset idle id */