enum gfx_v_align_en v_align,
char* text){
gfx_node_t *node = gfx_new_node(canvas,GFX_TEXT);
-/* if (angle != 0.0){*/
- /* currently we only support 0 and 270 */
-/* angle = 270.0;
- }*/
node->text = strdup(text);
node->size = size;
gfx_char glyph; /* current glyph in table */
unsigned int n;
int error;
- int gottab;
+ int gottab = 0;
ft_pen.x = 0; /* start at (0,0) !! */
ft_pen.y = 0;
switch (node->type) {
case GFX_LINE:
case GFX_AREA: {
- ArtVpath *vec;
+ ArtVpath *vec,*pvec;
double dst[6];
- ArtSVP *svp;
+ ArtSVP *svp,*usvp,*rsvp;
art_affine_scale(dst,canvas->zoom,canvas->zoom);
vec = art_vpath_affine_transform(node->path,dst);
if (node->closed_path)
gfx_libart_close_path(node, &vec);
gfx_round_scaled_coordinates(vec);
+ pvec = art_vpath_perturb(vec);
+ art_free(vec);
if(node->type == GFX_LINE){
- svp = art_svp_vpath_stroke ( vec, ART_PATH_STROKE_JOIN_ROUND,
+ svp = art_svp_vpath_stroke ( pvec, ART_PATH_STROKE_JOIN_ROUND,
ART_PATH_STROKE_CAP_ROUND,
node->size*canvas->zoom,1,1);
} else {
- svp = art_svp_from_vpath ( vec );
+ svp = art_svp_from_vpath ( pvec );
}
- art_free(vec);
- art_rgb_svp_alpha (svp ,0,0, pys_width, pys_height,
- node->color, buffer, rowstride, NULL);
+ art_free(pvec);
+ usvp=art_svp_uncross(svp);
art_free(svp);
+ rsvp=art_svp_rewind_uncrossed(usvp,ART_WIND_RULE_ODDEVEN);
+ art_free(usvp);
+ art_rgb_svp_alpha (rsvp ,0,0, pys_width, pys_height,
+ node->color, buffer, rowstride, NULL);
+ art_free(rsvp);
break;
}
case GFX_TEXT: {
}
/* paint the labels below the graph */
- for(ti = find_first_time(im->start,
+ for(ti = find_first_time(im->start - im->xlab_user.precis/2,
im->xlab_user.labtm,
im->xlab_user.labst);
- ti <= im->end;
+ ti <= im->end - im->xlab_user.precis/2;
ti = find_next_time(ti,im->xlab_user.labtm,im->xlab_user.labst)
){
tilab= ti + im->xlab_user.precis/2; /* correct time for the label */
/* are we inside the graph ? */
- if (ti < im->start || ti > im->end) continue;
+ if (tilab < im->start || tilab > im->end) continue;
#if HAVE_STRFTIME
localtime_r(&tilab, &tm);
im->tabwidth,"M", 0)*1.2;
boxV = boxH;
+ /* make sure transparent colors show up all the same */
+ node = gfx_new_area(im->canvas,
+ X0,Y0-boxV,
+ X0,Y0,
+ X0+boxH,Y0,
+ im->graph_col[GRC_CANVAS]);
+ gfx_add_point ( node, X0+boxH, Y0-boxV );
+
node = gfx_new_area(im->canvas,
X0,Y0-boxV,
X0,Y0,
gfx_add_point ( node, X0+boxH, Y0-boxV );
node = gfx_new_line(im->canvas,
X0,Y0-boxV, X0,Y0,
- 1,0x000000FF);
+ 1,im->graph_col[GRC_FONT]);
gfx_add_point(node,X0+boxH,Y0);
gfx_add_point(node,X0+boxH,Y0-boxV);
gfx_close_path(node);