diff options
| author | lains <lains@caramail.com> | 2018-03-13 15:51:37 +0100 |
|---|---|---|
| committer | jkoan <jkoan@users.noreply.github.com> | 2018-03-13 15:51:37 +0100 |
| commit | b0e68b797350eda0a73c250526b1fa7e9f1fc61a (patch) | |
| tree | 2764b165a7b62cc63bc5543d1ab0867873d8ad41 /navit/graphics.c | |
| parent | 803e32a64c7baf89de2b2d0ee2e6faa6f6b691e4 (diff) | |
| download | navit-b0e68b797350eda0a73c250526b1fa7e9f1fc61a.tar.gz | |
change:osd: compass appearance update (#413)
* Making graphics_draw_polygon_clipped() and graphics_draw_polyline_clipped() non-static
* Updating compass appearance
* Adding doxygen comment on graphics_draw_polyline_clipped() and graphics_draw_polygon_clipped()
* Improving doxygen comment
* Allowing customization of compass colors using navit.xml attributes destination_dir_color and north_color
Diffstat (limited to 'navit/graphics.c')
| -rw-r--r-- | navit/graphics.c | 24 |
1 files changed, 22 insertions, 2 deletions
diff --git a/navit/graphics.c b/navit/graphics.c index f89a4f89d..378f177fb 100644 --- a/navit/graphics.c +++ b/navit/graphics.c @@ -1829,7 +1829,19 @@ clip_line(struct wpoint *p1, struct wpoint *p2, struct point_rect *clip_rect) return ret; } -static void +/** + * @brief Draw polyline on the display + * + * Polylines are a serie of lines connected to each other. + * + * @param gra The graphics instance on which to draw + * @param gc The color to use for the drawing + * @param[in] pin An array of points forming the polygon + * @param count_in The number of elements inside @p pin + * @param[in] width An array of width matching the line starting from the corresponding @p pa (if all equal, all lines will have the same width) + * @param poly A boolean indicating whether the polyline should be closed to form a polygon (only the contour of this polygon will be drawn) + */ +void graphics_draw_polyline_clipped(struct graphics *gra, struct graphics_gc *gc, struct point *pa, int count, int *width, int poly) { struct point *points_to_draw=g_alloca(sizeof(struct point)*(count+1)); @@ -1937,7 +1949,15 @@ poly_intersection(struct point *p1, struct point *p2, struct point_rect *r, int } } -static void +/** + * @brief Draw a plain polygon on the display + * + * @param gra The graphics instance on which to draw + * @param gc The color to use for the drawing + * @param[in] pin An array of points forming the polygon + * @param count_in The number of elements inside @p pin + */ +void graphics_draw_polygon_clipped(struct graphics *gra, struct graphics_gc *gc, struct point *pin, int count_in) { struct point_rect r=gra->r; |
