![]() |
![]() |
![]() |
libchamplain Reference Manual | ![]() |
---|---|---|---|---|
Top | Description | Object Hierarchy | Implemented Interfaces | 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
); gboolean champlain_polygon_get_mark_points (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_mark_points (ChamplainPolygon *polygon
,gboolean value
); 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
);
GObject +----GInitiallyUnowned +----ClutterActor +----ClutterGroup +----ChamplainPolygon
ChamplainPolygon implements ClutterScriptable, ClutterAnimatable, AtkImplementorIface and ClutterContainer.
"closed-path" gboolean : Read / Write "fill" gboolean : Read / Write "fill-color" ClutterColor* : Read / Write "mark-points" gboolean : 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
);
Create an instance of ChamplainPolygon.
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
);
Checks whether the polygon is filled.
|
The polygon |
Returns : |
TRUE if the polygon is filled, FALSE otherwise. |
Since 0.4
ClutterColor * champlain_polygon_get_fill_color (ChamplainPolygon *polygon
);
Gets the polygon's fill color.
|
The polygon |
Returns : |
the polygon's fill color. |
Since 0.4
gboolean champlain_polygon_get_mark_points (ChamplainPolygon *polygon
);
Checks whether the polygon points are marked.
|
The polygon |
Returns : |
wether points in polygon gets marked for extra visibility. |
Since 0.4.3
GList * champlain_polygon_get_points (ChamplainPolygon *polygon
);
Gets a list of polygon points.
|
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
);
Checks whether the polygon has a stroke.
|
The polygon |
Returns : |
TRUE if the polygon has a stroke, FALSE otherwise. |
Since 0.4
ClutterColor * champlain_polygon_get_stroke_color (ChamplainPolygon *polygon
);
Gets the polygon's stroke color.
|
The polygon |
Returns : |
the polygon's stroke color. |
Since 0.4
gdouble champlain_polygon_get_stroke_width (ChamplainPolygon *polygon
);
Gets the width of the stroke.
|
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_mark_points (ChamplainPolygon *polygon
,gboolean value
);
Sets the property determining if the points in the polygon should get marked for extra visibility when drawing the polygon.
|
The polygon |
|
mark points when drawing the polygon. |
Since 0.4.3
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
);
Set the polygon's stroke color.
|
The polygon |
|
The polygon's stroke color or NULL to reset to the default color. The color parameter is copied. |
Since 0.4
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
"mark-points"
property"mark-points" gboolean : Read / Write
Wether the polygons points should be marked for extra visibility.
Default value: FALSE
Since 0.4.3
"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