X-Git-Url: https://git.octo.it/?a=blobdiff_plain;f=src%2Frrd_gfx.c;h=12607d408bf68472ca8248e5fa910745655c5d99;hb=110ae8b7e4893e9c641a8fcf9e787e2a0d4988ea;hp=818df7ec833a4885e22b7952bf8d8fae7a03ecf4;hpb=88ec7a41d5ba332d0a902a17c0ef0cb01d133a30;p=rrdtool.git diff --git a/src/rrd_gfx.c b/src/rrd_gfx.c index 818df7e..12607d4 100644 --- a/src/rrd_gfx.c +++ b/src/rrd_gfx.c @@ -313,8 +313,7 @@ double gfx_get_text_width_libart ( gfx_canvas_t *canvas, return text_width/64; } -static void gfx_libart_close_path(gfx_canvas_t *canvas, - gfx_node_t *node, ArtVpath **vec) +static void gfx_libart_close_path(gfx_node_t *node, ArtVpath **vec) { /* libart must have end==start for closed paths, even if using ART_MOVETO and not ART_MOVETO_OPEN @@ -326,8 +325,7 @@ static void gfx_libart_close_path(gfx_canvas_t *canvas, art_vpath_add_point (vec, &points, &points_max, ART_END, 0, 0); } -static void gfx_round_scaled_coordinates(gfx_canvas_t *canvas, - gfx_node_t *node, ArtVpath *vec) +static void gfx_round_scaled_coordinates(ArtVpath *vec) { while (vec->code != ART_END) { vec->x = floor(vec->x - LINEOFFSET + 0.5) + LINEOFFSET; @@ -503,8 +501,8 @@ int gfx_render_png (gfx_canvas_t *canvas, art_affine_scale(dst,canvas->zoom,canvas->zoom); vec = art_vpath_affine_transform(node->path,dst); if (node->closed_path) - gfx_libart_close_path(canvas, node, &vec); - gfx_round_scaled_coordinates(canvas, node, vec); + gfx_libart_close_path(node, &vec); + gfx_round_scaled_coordinates(vec); if(node->type == GFX_LINE){ svp = art_svp_vpath_stroke ( vec, ART_PATH_STROKE_JOIN_ROUND, ART_PATH_STROKE_CAP_ROUND, @@ -602,13 +600,13 @@ int gfx_render_png (gfx_canvas_t *canvas, gr = bit->bitmap.num_grays -1; for (iy=0; iy < bit->bitmap.rows; iy++){ long buf_y = iy+(pen_y+0.5)-bit->top; - if (buf_y < 0 || buf_y >= pys_height) continue; + if (buf_y < 0 || buf_y >= (long)pys_height) continue; buf_y *= rowstride; for (ix=0;ix < bit->bitmap.width;ix++){ long buf_x = ix + (pen_x + 0.5) + (double)bit->left ; art_u8 font_alpha; - if (buf_x < 0 || buf_x >= pys_width) continue; + if (buf_x < 0 || buf_x >= (long)pys_width) continue; buf_x *= bytes_per_pixel ; font_alpha = *(bit->bitmap.buffer + iy * bit->bitmap.width + ix); font_alpha = (art_u8)((double)font_alpha / gr * falpha); @@ -1306,7 +1304,7 @@ static int eps_prologue(eps_state *state) "%!PS-Adobe-3.0 EPSF-3.0\n" "%%Creator: RRDtool 1.1.x, Tobias Oetiker, http://tobi.oetiker.ch\n" /* can't like weird chars here */ - "%%Title: (RRDTool output)\n" + "%%Title: (RRDtool output)\n" "%%DocumentData: Clean7Bit\n" "", state->fp); fprintf(state->fp, "%%%%BoundingBox: 0 0 %d %d\n",