![]() |
![]() |
![]() |
libchamplain Reference Manual | ![]() |
---|---|---|---|---|
Top | Description | Object Hierarchy | Properties |
ChamplainPolygon; ChamplainPolygon * champlain_polygon_new (void); ChamplainPoint * champlain_polygon_insert_point (ChamplainPolygon *polygon, gdouble lat, gdouble lon, gint pos); ChamplainPoint * champlain_polygon_append_point (ChamplainPolygon *polygon, gdouble lat, gdouble lon); void champlain_polygon_remove_point (ChamplainPolygon *polygon, ChamplainPoint *point); void champlain_polygon_clear_points (ChamplainPolygon *polygon); gboolean champlain_polygon_get_fill (ChamplainPolygon *polygon); ClutterColor * champlain_polygon_get_fill_color (ChamplainPolygon *polygon); GList * champlain_polygon_get_points (ChamplainPolygon *polygon); gboolean champlain_polygon_get_stroke (ChamplainPolygon *polygon); ClutterColor * champlain_polygon_get_stroke_color (ChamplainPolygon *polygon); gdouble champlain_polygon_get_stroke_width (ChamplainPolygon *polygon); void champlain_polygon_set_fill (ChamplainPolygon *polygon, gboolean value); void champlain_polygon_set_fill_color (ChamplainPolygon *polygon, const ClutterColor *color); void champlain_polygon_set_stroke (ChamplainPolygon *polygon, gboolean value); void champlain_polygon_set_stroke_color (ChamplainPolygon *polygon, const ClutterColor *color); void champlain_polygon_set_stroke_width (ChamplainPolygon *polygon, gdouble value); void champlain_polygon_show (ChamplainPolygon *polygon); void champlain_polygon_hide (ChamplainPolygon *polygon);
"closed-path" gboolean : Read / Write "fill" gboolean : Read / Write "fill-color" ClutterColor* : Read / Write "stroke" gboolean : Read / Write "stroke-color" ClutterColor* : Read / Write "stroke-width" gdouble : Read / Write "visible" gboolean : Read / Write
A ChamplainPolygon is a set of point forming a shape on the map. This API is based on Cairo's.
ChamplainPolygon * champlain_polygon_new (void);
Returns : |
a new empty ChamplainPolygon |
Since 0.4
ChamplainPoint * champlain_polygon_insert_point (ChamplainPolygon *polygon, gdouble lat, gdouble lon, gint pos);
Adds point at the given position in the list of points in the polygon
|
The polygon |
|
the latitude |
|
the longitude |
|
where to insert the point |
Returns : |
the added point, should not be freed. |
Since 0.4
ChamplainPoint * champlain_polygon_append_point (ChamplainPolygon *polygon, gdouble lat, gdouble lon);
Adds point at the end of the list of points in the polygon
|
The polygon |
|
the latitude |
|
the longitude |
Returns : |
the added point, should not be freed. |
Since 0.4
void champlain_polygon_remove_point (ChamplainPolygon *polygon, ChamplainPoint *point);
Removes the point from the polygon.
|
a ChamplainPolygon |
|
the ChamplainPoint to remove |
Since 0.4
void champlain_polygon_clear_points (ChamplainPolygon *polygon);
Remove all points from the polygon
|
The polygon |
Since 0.4
gboolean champlain_polygon_get_fill (ChamplainPolygon *polygon);
|
The polygon |
Returns : |
TRUE if the polygon is filled, FALSE otherwise. |
Since 0.4
ClutterColor * champlain_polygon_get_fill_color (ChamplainPolygon *polygon);
|
|
Returns : |
GList * champlain_polygon_get_points (ChamplainPolygon *polygon);
|
The polygon |
Returns : |
a list of all points from the polygon, it shouldn't be freed. |
Since 0.4
gboolean champlain_polygon_get_stroke (ChamplainPolygon *polygon);
|
The polygon |
Returns : |
TRUE if the polygon has a stroke, FALSE otherwise. |
Since 0.4
ClutterColor * champlain_polygon_get_stroke_color (ChamplainPolygon *polygon);
|
The polygon |
Returns : |
the polygon's stroke color. |
Since 0.4
gdouble champlain_polygon_get_stroke_width (ChamplainPolygon *polygon);
|
The polygon |
Returns : |
the width of the stroke |
Since 0.4
void champlain_polygon_set_fill (ChamplainPolygon *polygon, gboolean value);
Sets the polygon to have be filled
|
The polygon |
|
if the polygon is filled |
Since 0.4
void champlain_polygon_set_fill_color (ChamplainPolygon *polygon, const ClutterColor *color);
Set the polygon's fill color.
|
The polygon |
|
The polygon's fill color or NULL to reset to the default color. The color parameter is copied. |
Since 0.4
void champlain_polygon_set_stroke (ChamplainPolygon *polygon, gboolean value);
Sets the polygon to have a stroke
|
The polygon |
|
if the polygon is stroked |
Since 0.4
void champlain_polygon_set_stroke_color (ChamplainPolygon *polygon, const ClutterColor *color);
|
|
|
void champlain_polygon_set_stroke_width (ChamplainPolygon *polygon, gdouble value);
Sets the width of the stroke
|
The polygon |
|
the width of the stroke (in pixels) |
Since 0.4
void champlain_polygon_show (ChamplainPolygon *polygon);
Makes the polygon visible
|
The polygon |
Since 0.4
void champlain_polygon_hide (ChamplainPolygon *polygon);
Hides the polygon
|
The polygon |
Since 0.4
"closed-path"
property"closed-path" gboolean : Read / Write
The Path is Closed.
Default value: FALSE
"fill"
property"fill" gboolean : Read / Write
The shape should be filled
Default value: FALSE
Since 0.4
"stroke"
property"stroke" gboolean : Read / Write
The shape should be stroked
Default value: TRUE
Since 0.4
"stroke-color"
property"stroke-color" ClutterColor* : Read / Write
The polygon's stroke color
Since 0.4
"stroke-width"
property"stroke-width" gdouble : Read / Write
The polygon's stroke width (in pixels)
Allowed values: [0,100]
Default value: 2
Since 0.4
"visible"
property"visible" gboolean : Read / Write
Wether the polygon is visible
Default value: TRUE
Since 0.4