GeocGrids

GeocGrids — A GeocItem that draws lat/lon graticules to the canvas

Synopsis

                    GeocGrids;
void                geoc_grids_connect_auto_to_fixed    (GeocGrids *autogrid,
                                                         GeocGrids *fixed);
GeocItem*           geoc_grids_new                      (GeocItem *parent,
                                                         GeocCanvas *canvas,
                                                         const gchar *first_arg_name,
                                                         ...);

Object Hierarchy

  GObject
   +----CrItem
         +----GeocItem
               +----GeocGrids

Properties

  "auto"                     gboolean              : Read / Write
  "autoavail"                gboolean              : Read
  "canvas"                   GeocCanvas*           : Read / Write
  "dash"                     CrDash*               : Read / Write
  "fill-color"               gchar*                : Read / Write
  "fill-color-rgba"          guint                 : Read / Write
  "font"                     gchar*                : Read / Write
  "line-width"               gdouble               : Read / Write
  "outline-color"            gchar*                : Read / Write
  "outline-color-rgba"       guint                 : Read / Write
  "spacing"                  gdouble               : Read / Write

Description

The GeocGrids canvas group provides a graticule or set of gridlines that is sometimes more useful than the cursor when trying to associate objects on the map to geographic coordinates. It operates in one of two modes. In 'automatic' mode it figures out how to best label the map and does the right thing. In 'fixed' mode it draws a fixed spaced set of grids regardless of the zoom scale or projection setting of the map.

Automatic mode only works on some cylindrical projections and only gets activated when the map is zoomed in. At the moment it is best to chain the automatic and fixed mode grids together.

Details

GeocGrids

typedef struct _GeocGrids GeocGrids;


geoc_grids_connect_auto_to_fixed ()

void                geoc_grids_connect_auto_to_fixed    (GeocGrids *autogrid,
                                                         GeocGrids *fixed);

A convenience routine that connects the "autoavail" property from the auto grid to the hide and show routines in the fixed canvas item. i.e., When the auto grid has a grid available, the fixed grid is hidden. When the auto grid does not have a grid available the fixed grid is shown.

autogrid :

A Grid with auto property aet to TRUE.

fixed :

A Grid with auto property set to FALSE.

geoc_grids_new ()

GeocItem*           geoc_grids_new                      (GeocItem *parent,
                                                         GeocCanvas *canvas,
                                                         const gchar *first_arg_name,
                                                         ...);

A factory that creates a new grids item with parent as its parent item in one step. Any properties may be passed into the variable argument list.

parent :

The parent item for the new item.

canvas :

The canvas to put the grids on.

first_arg_name :

A list of object argument name/value pairs, NULL-terminated, used to configure the item.

... :

Returns :

The newly-created grids item.

Property Details

The "auto" property

  "auto"                     gboolean              : Read / Write

Whether to fix grid size or auto.

Default value: FALSE


The "autoavail" property

  "autoavail"                gboolean              : Read

True if auto grids could be made for the current canvas viewport.

Default value: FALSE


The "canvas" property

  "canvas"                   GeocCanvas*           : Read / Write

Reference to GeocCanvas widget. This is needed to determine how many grids to draw when in auto mode. .


The "dash" property

  "dash"                     CrDash*               : Read / Write

a boxed array indicating the dash pattern to be used by Cairo. See #cairo_set_dash for more information.


The "fill-color" property

  "fill-color"               gchar*                : Read / Write

A string color such as 'red', or '#123456'.

Default value: NULL


The "fill-color-rgba" property

  "fill-color-rgba"          guint                 : Read / Write

Text color, red,grn,blue,alpha.

Default value: 0


The "font" property

  "font"                     gchar*                : Read / Write

A pango font description string of the form [FAMILY-LIST] [STYLE-OPTIONS] [SIZE].

Default value: NULL


The "line-width" property

  "line-width"               gdouble               : Read / Write

Path line width in user units when #CrPath:line-scaleable is TRUE. When #CrPath:line-scaleable is FALSE this is in device units.

Default value: 2


The "outline-color" property

  "outline-color"            gchar*                : Read / Write

A string color such as 'red', or '#123456' to be used to sroke the path.

Default value: NULL


The "outline-color-rgba" property

  "outline-color-rgba"       guint                 : Read / Write

Path color, red,grn,blue,alpha.

Default value: 0


The "spacing" property

  "spacing"                  gdouble               : Read / Write

How far apart to draw fixed grids.

Allowed values: [1,30]

Default value: 15