#include "viking.h"
#include "icons/icons.h"
-static VikCoordLayer *coord_layer_new ( );
+static VikCoordLayer *coord_layer_new ( VikViewport *vp );
static void coord_layer_draw ( VikCoordLayer *vcl, VikViewport *vp );
static void coord_layer_free ( VikCoordLayer *vcl );
static VikCoordLayer *coord_layer_create ( VikViewport *vp );
static gboolean coord_layer_set_param ( VikCoordLayer *vcl, guint16 id, VikLayerParamData data, VikViewport *vp, gboolean is_file_operation );
static VikLayerParamData coord_layer_get_param ( VikCoordLayer *vcl, guint16 id, gboolean is_file_operation );
static void coord_layer_post_read ( VikLayer *vl, VikViewport *vp, gboolean from_file );
+static void coord_layer_update_gc ( VikCoordLayer *vcl, VikViewport *vp );
static VikLayerParamScale param_scales[] = {
{ 0.05, 60.0, 0.25, 10 },
(VikLayerFuncSetParam) coord_layer_set_param,
(VikLayerFuncGetParam) coord_layer_get_param,
+ (VikLayerFuncChangeParam) NULL,
(VikLayerFuncReadFileData) NULL,
(VikLayerFuncWriteFileData) NULL,
static VikCoordLayer *coord_layer_unmarshall( guint8 *data, gint len, VikViewport *vvp )
{
- VikCoordLayer *rv = coord_layer_new ();
+ VikCoordLayer *rv = coord_layer_new ( vvp );
vik_layer_unmarshall_params ( VIK_LAYER(rv), data, len, vvp );
+ coord_layer_update_gc ( rv, vvp );
return rv;
}
case PARAM_COLOR: vcl->color = data.c; break;
case PARAM_MIN_INC: vcl->deg_inc = data.d / 60.0; break;
case PARAM_LINE_THICKNESS: if ( data.u >= 1 && data.u <= 15 ) vcl->line_thickness = data.u; break;
+ default: break;
}
return TRUE;
}
case PARAM_COLOR: rv.c = vcl->color; break;
case PARAM_MIN_INC: rv.d = vcl->deg_inc * 60.0; break;
case PARAM_LINE_THICKNESS: rv.i = vcl->line_thickness; break;
+ default: break;
}
return rv;
}