summaryrefslogtreecommitdiff
path: root/navit/graphics.h
diff options
context:
space:
mode:
authorStefan Wildemann <metalstrolch@users.noreply.github.com>2020-04-26 00:59:36 +0200
committerGitHub <noreply@github.com>2020-04-26 00:59:36 +0200
commit54fd092de942f12133b67bc0118ba6de879d39d7 (patch)
tree15de360d3f57821eb712e253c9dd7f037d96467b /navit/graphics.h
parentf82ea8d97d5f10433197306e8afd6b6c10e294f2 (diff)
downloadnavit-54fd092de942f12133b67bc0118ba6de879d39d7.tar.gz
Add:Core+Graphics+Qt5:Add support for textured polygons (#989)
This pull request adds the basic support for textured polygons. It adds a function to graphics plugins to set texture. It enhances itemgra configuration that allows to set a picture to polygon map elements Basic support for Qt5 graphics. Some example textures added to car layout. Texture files have own resource directory.
Diffstat (limited to 'navit/graphics.h')
-rw-r--r--navit/graphics.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/navit/graphics.h b/navit/graphics.h
index 9a3a33730..270879df1 100644
--- a/navit/graphics.h
+++ b/navit/graphics.h
@@ -180,6 +180,7 @@ struct graphics_gc_methods {
void (*gc_set_dashes)(struct graphics_gc_priv *gc, int width, int offset, unsigned char dash_list[], int n);
void (*gc_set_foreground)(struct graphics_gc_priv *gc, struct color *c);
void (*gc_set_background)(struct graphics_gc_priv *gc, struct color *c);
+ void (*gc_set_texture)(struct graphics_gc_priv *gc, struct graphics_image_priv *img);
};
/**
@@ -251,8 +252,10 @@ struct graphics_gc *graphics_gc_new(struct graphics *gra);
void graphics_gc_destroy(struct graphics_gc *gc);
void graphics_gc_set_foreground(struct graphics_gc *gc, struct color *c);
void graphics_gc_set_background(struct graphics_gc *gc, struct color *c);
+void graphics_gc_set_texture(struct graphics_gc *gc, struct graphics_image *img);
void graphics_gc_set_linewidth(struct graphics_gc *gc, int width);
void graphics_gc_set_dashes(struct graphics_gc *gc, int width, int offset, unsigned char dash_list[], int n);
+gboolean graphics_gc_has_texture(struct graphics_gc *gc);
struct graphics_image *graphics_image_new_scaled(struct graphics *gra, char *path, int w, int h);
struct graphics_image *graphics_image_new_scaled_rotated(struct graphics *gra, char *path, int w, int h, int rotate);
struct graphics_image *graphics_image_new(struct graphics *gra, char *path);
@@ -274,6 +277,7 @@ int graphics_draw_drag(struct graphics *this_, struct point *p);
void graphics_background_gc(struct graphics *this_, struct graphics_gc *gc);
void graphics_draw_text_std(struct graphics *this_, int text_size, char *text, struct point *p);
char *graphics_icon_path(const char *icon);
+char *graphics_texture_path(const char *texture);
void graphics_draw_itemgra(struct graphics *gra, struct itemgra *itm, struct transformation *t, char *label);
void graphics_displaylist_draw(struct graphics *gra, struct displaylist *displaylist, struct transformation *trans,
struct layout *l, int flags);