summaryrefslogtreecommitdiff
path: root/navit/graphics
diff options
context:
space:
mode:
authorSebastian Leske <sebastian.leske@sleske.name>2015-10-05 08:12:57 +0200
committerSebastian Leske <sebastian.leske@sleske.name>2015-10-06 16:11:18 +0200
commit31d3cd58aa702a94d82aff5e56d5ee34690da6cd (patch)
tree213a0c275fee6e6fee9912c609d6b57e156b1bad /navit/graphics
parent940cfe058571e655c933b92681396b589b80a307 (diff)
downloadnavit-31d3cd58aa702a94d82aff5e56d5ee34690da6cd.tar.gz
Remove unused parameter 'depth' from get_glyph/get_shadow.R6299
The 'depth' parameter was only required for the gtk_drawing_area graphics plugin, before it was switched to use Cairo. Now all graphics drivers use depth=32, so that case is now hardcoded.
Diffstat (limited to 'navit/graphics')
-rw-r--r--navit/graphics/gd/graphics_gd.c4
-rw-r--r--navit/graphics/gtk_drawing_area/graphics_gtk_drawing_area.c4
-rw-r--r--navit/graphics/opengl/graphics_opengl.c5
-rw-r--r--navit/graphics/qt_qpainter/graphics_qt_qpainter.cpp4
-rw-r--r--navit/graphics/sdl/graphics_sdl.c6
5 files changed, 11 insertions, 12 deletions
diff --git a/navit/graphics/gd/graphics_gd.c b/navit/graphics/gd/graphics_gd.c
index b4991f30a..47868d622 100644
--- a/navit/graphics/gd/graphics_gd.c
+++ b/navit/graphics/gd/graphics_gd.c
@@ -430,7 +430,7 @@ draw_text(struct graphics_priv *gr, struct graphics_gc_priv *fg, struct graphics
h=g->h;
if (w && h) {
im=gdImageCreateTrueColor(w+2, h+2);
- gr->freetype_methods.get_shadow(g,(unsigned char *)(im->tpixels),32,0,&bgc,&transparent);
+ gr->freetype_methods.get_shadow(g,(unsigned char *)(im->tpixels),0,&bgc,&transparent);
gdImageCopy(gr->im, im, ((x+g->x)>>6)-1, ((y+g->y)>>6)-1, 0, 0, w+2, h+2);
gdImageDestroy(im);
}
@@ -450,7 +450,7 @@ draw_text(struct graphics_priv *gr, struct graphics_gc_priv *fg, struct graphics
h=g->h;
if (w && h) {
im=gdImageCreateTrueColor(w, h);
- gr->freetype_methods.get_glyph(g,(unsigned char *)(im->tpixels),32,0,&fgc,&bgc,&transparent);
+ gr->freetype_methods.get_glyph(g,(unsigned char *)(im->tpixels),0,&fgc,&bgc,&transparent);
gdImageCopy(gr->im, im, (x+g->x)>>6, (y+g->y)>>6, 0, 0, w, h);
gdImageDestroy(im);
}
diff --git a/navit/graphics/gtk_drawing_area/graphics_gtk_drawing_area.c b/navit/graphics/gtk_drawing_area/graphics_gtk_drawing_area.c
index 332673529..665d306e3 100644
--- a/navit/graphics/gtk_drawing_area/graphics_gtk_drawing_area.c
+++ b/navit/graphics/gtk_drawing_area/graphics_gtk_drawing_area.c
@@ -366,7 +366,7 @@ display_text_draw(struct font_freetype_text *text, struct graphics_priv *gr, str
unsigned char *shadow;
stride=cairo_format_stride_for_width(CAIRO_FORMAT_ARGB32, g->w+2);
shadow=g_malloc(stride*(g->h+2));
- gr->freetype_methods.get_shadow(g, shadow, 32, stride, &bg->c, &transparent);
+ gr->freetype_methods.get_shadow(g, shadow, stride, &bg->c, &transparent);
draw_rgb_image_buffer(gr->cairo, g->w+2, g->h+2, ((x+g->x)>>6)-1, ((y+g->y)>>6)-1, stride, shadow);
g_free(shadow);
}
@@ -384,7 +384,7 @@ display_text_draw(struct font_freetype_text *text, struct graphics_priv *gr, str
unsigned char *glyph;
stride=cairo_format_stride_for_width(CAIRO_FORMAT_ARGB32, g->w);
glyph=g_malloc(stride*g->h);
- gr->freetype_methods.get_glyph(g, glyph, 32, stride, &fg->c, bg?&bg->c:&transparent, &transparent);
+ gr->freetype_methods.get_glyph(g, glyph, stride, &fg->c, bg?&bg->c:&transparent, &transparent);
draw_rgb_image_buffer(gr->cairo, g->w, g->h, (x+g->x)>>6, (y+g->y)>>6, stride, glyph);
g_free(glyph);
}
diff --git a/navit/graphics/opengl/graphics_opengl.c b/navit/graphics/opengl/graphics_opengl.c
index 742dcae51..b6e0fb41a 100644
--- a/navit/graphics/opengl/graphics_opengl.c
+++ b/navit/graphics/opengl/graphics_opengl.c
@@ -921,7 +921,7 @@ display_text_draw(struct font_freetype_text *text,
if (color) {
shadow = g_malloc(stride * (g->h + 2));
gr->freetype_methods.get_shadow(g, shadow,
- 32, stride,
+ stride,
&white,
&transparent);
#ifdef USE_OPENGLES
@@ -961,7 +961,6 @@ display_text_draw(struct font_freetype_text *text,
g_malloc(stride * g->h * 4);
gr->freetype_methods.get_glyph(g,
glyph,
- 32,
stride
* 4,
&black,
@@ -989,7 +988,7 @@ display_text_draw(struct font_freetype_text *text,
stride *= 4;
glyph = g_malloc(stride * g->h);
gr->freetype_methods.get_glyph(g, glyph,
- 32, stride,
+ stride,
&black,
&white,
&transparent);
diff --git a/navit/graphics/qt_qpainter/graphics_qt_qpainter.cpp b/navit/graphics/qt_qpainter/graphics_qt_qpainter.cpp
index 20ac0c296..714f0753e 100644
--- a/navit/graphics/qt_qpainter/graphics_qt_qpainter.cpp
+++ b/navit/graphics/qt_qpainter/graphics_qt_qpainter.cpp
@@ -420,7 +420,7 @@ static void draw_text(struct graphics_priv *gr, struct graphics_gc_priv *fg, str
unsigned char *data;
QImage img(g->w+2, g->h+2, QImage::Format_ARGB32_Premultiplied);
data=img.bits();
- gr->freetype_methods.get_shadow(g,(unsigned char *)data,32,img.bytesPerLine(),bgc,&transparent);
+ gr->freetype_methods.get_shadow(g,(unsigned char *)data,img.bytesPerLine(),bgc,&transparent);
painter->drawImage(((x+g->x)>>6)-1, ((y+g->y)>>6)-1, img);
}
@@ -439,7 +439,7 @@ static void draw_text(struct graphics_priv *gr, struct graphics_gc_priv *fg, str
unsigned char *data;
QImage img(g->w, g->h, QImage::Format_ARGB32_Premultiplied);
data=img.bits();
- gr->freetype_methods.get_glyph(g,(unsigned char *)data,32,img.bytesPerLine(),fgc,bgc,&transparent);
+ gr->freetype_methods.get_glyph(g,(unsigned char *)data,img.bytesPerLine(),fgc,bgc,&transparent);
painter->drawImage((x+g->x)>>6, (y+g->y)>>6, img);
}
x+=g->dx;
diff --git a/navit/graphics/sdl/graphics_sdl.c b/navit/graphics/sdl/graphics_sdl.c
index b01af5c3f..e5d9f7872 100644
--- a/navit/graphics/sdl/graphics_sdl.c
+++ b/navit/graphics/sdl/graphics_sdl.c
@@ -650,7 +650,7 @@ display_text_draw(struct font_freetype_text *text,
stride = (g->w + 2) * 4;
if (color) {
resize_ft_buffer(stride * (g->h + 2));
- gr->freetype_methods.get_shadow(g, ft_buffer, 32, stride, &white, &transparent);
+ gr->freetype_methods.get_shadow(g, ft_buffer, stride, &white, &transparent);
SDL_Surface *glyph_surface =
SDL_CreateRGBSurfaceFrom(ft_buffer, g->w + 2, g->h + 2,
@@ -684,7 +684,7 @@ display_text_draw(struct font_freetype_text *text,
stride = g->w;
if (bg) {
resize_ft_buffer(stride * g->h * 4);
- gr->freetype_methods.get_glyph(g, ft_buffer, 32,
+ gr->freetype_methods.get_glyph(g, ft_buffer,
stride * 4, &black,
&white, &transparent);
SDL_Surface *glyph_surface =
@@ -704,7 +704,7 @@ display_text_draw(struct font_freetype_text *text,
}
stride *= 4;
resize_ft_buffer(stride * g->h);
- gr->freetype_methods.get_glyph(g, ft_buffer, 32, stride,
+ gr->freetype_methods.get_glyph(g, ft_buffer, stride,
&black, &white,
&transparent);
int ii, jj;