Re: libart: transforming svp's




I have just tried transforming back to vpaths.

The quality of the stroked lines appears to be much reduced by this process,
even when I use only the identity transformation.

Is this a known bug or am I doing something wrong.

(I can provide output and test code examples.)

-chris

ps. Here's a snipet of what I'm doing.  gstate is a structure which holds the
    current graphics state, including the stroke line width.  The input is an
    ArtVpath pointer named "vpath".  pixbuf and gstate are defined elsewhere

draw(ArtVpath *vpath)
{
  ArtSVP * preTransStrokedPath; /* the pre-transformation SVP */
  ArtVpath * preTransVpath;     /* the pre-transformation Vpath */
  ArtVpath * trVpath; /* transformed vpath */  
  ArtSVP* svp; /* final form SVP */

  preTransStrokedPath = art_svp_vpath_stroke(vpath,
                                             gstate->stroke_linejoin,
                                             gstate->stroke_linecap, 
                                             gstate->stroke_width,
                                             4, /*miter_limit */
                                             0.25/*flatness */);
  preTransVpath = art_vpath_from_svp(preTransStrokedPath);
  
  trVpath =  art_vpath_affine_transform (preTransVpath, gstate->CTM); 

  svp = art_svp_from_vpath(trVpath);


  /* render to the buffer, etc.  */
  art_rgb_svp_alpha (svp,
                     0,0,
                     pixbuf->width, pixbuf->height,
                     gstateRGB_alpha_to_RGBA(gstate->stroke, gstate->stroke_opacity),
                     pixbuf->buf,
                     pixbuf->rowstride,
                     NULL);

 
 /* clean up memory */  
  art_free(svp);
  art_free(trVpath);
  art_free(preTransVpath);
  art_free(preTransStrokedPath);

}



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]