/[zanavi_public1]/navit/navit/graphics.h
ZANavi

Diff of /navit/navit/graphics.h

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

Revision 27 Revision 30
36struct display_list; 36struct display_list;
37struct mapset; 37struct mapset;
38 38
39enum draw_mode_num 39enum draw_mode_num
40{ 40{
41 draw_mode_begin, 41 draw_mode_begin, // 0
42 draw_mode_begin_clear, 42 draw_mode_begin_clear, // 1
43 draw_mode_end, 43 draw_mode_end, // 2
44 draw_mode_cursor, 44 draw_mode_cursor, // 3
45 draw_mode_end_lazy 45 draw_mode_end_lazy // 4
46}; 46};
47 47
48#include "item.h" 48#include "item.h"
49 49
50struct display_context 50struct display_context
61 int maxlen; 61 int maxlen;
62}; 62};
63 63
64//#define HASH_SIZE_GRAPHICS_ 1024 64//#define HASH_SIZE_GRAPHICS_ 1024
65#define HASH_SIZE_GRAPHICS_ 2048 // inc. hash size for layer items 65#define HASH_SIZE_GRAPHICS_ 2048 // inc. hash size for layer items
66
66struct hash_entry 67struct hash_entry
67{ 68{
68 enum item_type type; 69 enum item_type type;
69 struct displayitem *di; 70 struct displayitem *di;
70}; 71};
104 void (*draw_lines)(struct graphics_priv *gr, struct graphics_gc_priv *gc, 105 void (*draw_lines)(struct graphics_priv *gr, struct graphics_gc_priv *gc,
105 struct point *p, int count); 106 struct point *p, int count);
106 void (*draw_lines2)(struct graphics_priv *gr, struct graphics_gc_priv *gc, 107 void (*draw_lines2)(struct graphics_priv *gr, struct graphics_gc_priv *gc,
107 struct point *p, int count, int order, int oneway); 108 struct point *p, int count, int order, int oneway);
108 void (*draw_lines3)(struct graphics_priv *gr, struct graphics_gc_priv *gc, 109 void (*draw_lines3)(struct graphics_priv *gr, struct graphics_gc_priv *gc,
109 struct point *p, int count, int order, int width); 110 struct point *p, int count, int order, int width, int dashes, struct color *c);
110 void (*draw_lines4)(struct graphics_priv *gr, struct graphics_gc_priv *gc, 111 void (*draw_lines4)(struct graphics_priv *gr, struct graphics_gc_priv *gc,
111 struct point *p, int count, int order, int width, int type); 112 struct point *p, int count, int order, int width, int type, int dashes, struct color *c);
112 void (*draw_lines_dashed)(struct graphics_priv *gr, 113 void (*draw_lines_dashed)(struct graphics_priv *gr,
113 struct graphics_gc_priv *gc, struct point *p, int count, int order, 114 struct graphics_gc_priv *gc, struct point *p, int count, int order,
114 int oneway); 115 int oneway);
115 void (*draw_polygon)(struct graphics_priv *gr, struct graphics_gc_priv *gc, 116 void (*draw_polygon)(struct graphics_priv *gr, struct graphics_gc_priv *gc,
116 struct point *p, int count); 117 struct point *p, int count);
127 void (*draw_image)(struct graphics_priv *gr, struct graphics_gc_priv *fg, 128 void (*draw_image)(struct graphics_priv *gr, struct graphics_gc_priv *fg,
128 struct point *p, struct graphics_image_priv *img); 129 struct point *p, struct graphics_image_priv *img);
129 void (*draw_bigmap)(struct graphics_priv *gr, struct graphics_gc_priv *fg, 130 void (*draw_bigmap)(struct graphics_priv *gr, struct graphics_gc_priv *fg,
130 int yaw, int order, float clat, float clng, int x, int y, int scx, 131 int yaw, int order, float clat, float clng, int x, int y, int scx,
131 int scy, int px, int py, int valid); 132 int scy, int px, int py, int valid);
132 void (*send_osd_values)(struct graphics_priv *gr,
133 struct graphics_gc_priv *fg, char *id, char *text1, char *text2,
134 char *text3, int i1, int i2, int i3, int i4, float f1, float f2,
135 float f3);
136 void 133 void
137 (*draw_image_warp)(struct graphics_priv *gr, 134 (*draw_image_warp)(struct graphics_priv *gr,
138 struct graphics_gc_priv *fg, struct point *p, int count, 135 struct graphics_gc_priv *fg, struct point *p, int count,
139 char *data); 136 char *data);
140 void (*draw_restore)(struct graphics_priv *gr, struct point *p, int w, 137 void (*draw_restore)(struct graphics_priv *gr, struct point *p, int w,
147 struct graphics_gc_priv *(*gc_new)(struct graphics_priv *gr, 144 struct graphics_gc_priv *(*gc_new)(struct graphics_priv *gr,
148 struct graphics_gc_methods *meth); 145 struct graphics_gc_methods *meth);
149 void 146 void
150 (*background_gc)(struct graphics_priv *gr, 147 (*background_gc)(struct graphics_priv *gr,
151 struct graphics_gc_priv *gc); 148 struct graphics_gc_priv *gc);
152 struct graphics_priv *(*overlay_new)(struct graphics_priv *gr, 149 struct graphics_priv *(*overlay_new)(const char* name, struct graphics_priv *gr,
153 struct graphics_methods *meth, struct point *p, int w, int h, 150 struct graphics_methods *meth, struct point *p, int w, int h,
154 int alpha, int wraparound); 151 int alpha, int wraparound);
155 struct graphics_image_priv *(*image_new)(struct graphics_priv *gr, 152 struct graphics_image_priv *(*image_new)(struct graphics_priv *gr,
156 struct graphics_image_methods *meth, char *path, int *w, int *h, 153 struct graphics_image_methods *meth, char *path, int *w, int *h,
157 struct point *hot, int rotation); 154 struct point *hot, int rotation);
242int graphics_set_attr(struct graphics *gra, struct attr *attr); 239int graphics_set_attr(struct graphics *gra, struct attr *attr);
243void graphics_set_rect(struct graphics *gra, struct point_rect *pr); 240void graphics_set_rect(struct graphics *gra, struct point_rect *pr);
244struct graphics *graphics_new(struct attr *parent, struct attr **attrs); 241struct graphics *graphics_new(struct attr *parent, struct attr **attrs);
245int graphics_get_attr(struct graphics *this_, enum attr_type type, 242int graphics_get_attr(struct graphics *this_, enum attr_type type,
246 struct attr *attr, struct attr_iter *iter); 243 struct attr *attr, struct attr_iter *iter);
247struct graphics *graphics_overlay_new(struct graphics *parent, struct point *p, 244struct graphics *graphics_overlay_new(const char* name, struct graphics *parent, struct point *p,
248 int w, int h, int alpha, int wraparound); 245 int w, int h, int alpha, int wraparound);
249void graphics_overlay_resize(struct graphics *this_, struct point *p, int w, 246void graphics_overlay_resize(struct graphics *this_, struct point *p, int w,
250 int h, int alpha, int wraparound); 247 int h, int alpha, int wraparound);
251void graphics_init(struct graphics *this_); 248void graphics_init(struct graphics *this_);
252void *graphics_get_data(struct graphics *this_, const char *type); 249void *graphics_get_data(struct graphics *this_, const char *type);

Legend:
Removed from v.27  
changed lines
  Added in v.30

   
Visit the ZANavi Wiki