[cairo-commit] roadster/src layers.c, 1.9, 1.10 mainwindow.c, 1.11,
1.12
Nathan Fredrickson
commit at pdx.freedesktop.org
Thu Mar 3 00:28:34 PST 2005
Committed by: nrf
Update of /cvs/cairo/roadster/src
In directory gabe:/tmp/cvs-serv7239/src
Modified Files:
layers.c mainwindow.c
Log Message:
* data/layers.xml:
* src/layers.c: Parse dash style and fix the railroads.
* src/mainwindow.c: Redraw map after reloading styles.
* data/roadster.glade: Set accelerator for style reload to F5.
Index: layers.c
===================================================================
RCS file: /cvs/cairo/roadster/src/layers.c,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -d -r1.9 -r1.10
--- layers.c 3 Mar 2005 07:32:46 -0000 1.9
+++ layers.c 3 Mar 2005 08:28:32 -0000 1.10
@@ -32,11 +32,11 @@
layer_t * g_aLayers[NUM_LAYERS+1];
gdouble pDash_Solid[] = {10};
-gdouble pDash_10_10[] = {1, 14};
+gdouble pDash_1_14[] = {1, 14};
dashstyle_t g_aDashStyles[NUM_DASH_STYLES] = {
{NULL, 0},
- {pDash_10_10, 2},
+ {pDash_1_14, 2},
};
static void layers_load_from_file();
@@ -65,7 +65,7 @@
g_aLayers[LAYER_MINORHIGHWAY_RAMP] = layers_new(LAYER_MINORHIGHWAY_RAMP, "minor-highway-ramps");
g_aLayers[LAYER_MAJORHIGHWAY] = layers_new(LAYER_MAJORHIGHWAY, "major-highways");
g_aLayers[LAYER_MAJORHIGHWAY_RAMP] = layers_new(LAYER_MAJORHIGHWAY_RAMP, "major-highway-ramps");
- g_aLayers[LAYER_RAILROAD] = layers_new(LAYER_RAILROAD, "railroad");
+ g_aLayers[LAYER_RAILROAD] = layers_new(LAYER_RAILROAD, "railroads");
g_aLayers[LAYER_PARK] = layers_new(LAYER_PARK, "parks");
g_aLayers[LAYER_RIVER] = layers_new(LAYER_RIVER, "rivers");
g_aLayers[LAYER_LAKE] = layers_new(LAYER_LAKE, "lakes");
@@ -239,6 +239,9 @@
else if (!strcmp(value, "round"))
sublayer->m_nCapStyle = CAIRO_LINE_CAP_ROUND;
+ } else if (!strcmp(name, "dash-style")) {
+ sublayer->m_nDashStyle = (gint)atoi(value);
+
}
}
}
@@ -346,6 +349,7 @@
printf("join style: %d\n", sublayer->m_nJoinStyle);
printf("cap style: %d\n", sublayer->m_nCapStyle);
+ printf("dash style: %d\n", sublayer->m_nDashStyle);
}
static void
Index: mainwindow.c
===================================================================
RCS file: /cvs/cairo/roadster/src/mainwindow.c,v
retrieving revision 1.11
retrieving revision 1.12
diff -u -d -r1.11 -r1.12
--- mainwindow.c 3 Mar 2005 07:32:46 -0000 1.11
+++ mainwindow.c 3 Mar 2005 08:28:32 -0000 1.12
@@ -621,6 +621,7 @@
void on_reloadstylesmenuitem_activate(GtkMenuItem *menuitem, gpointer user_data)
{
layers_reload();
+ mainwindow_draw_map();
}
More information about the cairo-commit
mailing list