[gl2ps] fix text alignment and rotation in PDF

Christophe Geuzaine cgeuzaine at ulg.ac.be
Fri Jul 28 09:14:35 CEST 2017


Hi Dan,

Seems interesting; do you use this when rotating text that is not aligned with GL2PS_TEXT_BL?

I've invited you to the GL2PS gitlab so that you can submit merge request directly.

Christophe

> On 27 Jul 2017, at 22:10, Dan Lipsa <dan.lipsa at kitware.com> wrote:
> 
> Hi all,
> I would like to submit the following patch that fixes text alignment and rotation for output to PDF.
> We use this in the VTK version of gl2ps.
> 
> I had to add an extra gl2psTextOptColor function with parameters for the bottom left corner of the text bounding box.
> 
> 
> GL2PSDLL_API GLint gl2psTextOptColorBL(
> +  const char *str, const char *fontname,
> +  GLshort fontsize, GLint alignment, GLfloat angle,
> +  GL2PSrgba color, GLfloat blx, GLfloat bly);
> 
> 
> Thanks,
> Dan
> 
> 
> <gl2ps.patch>_______________________________________________
> gl2ps mailing list
> gl2ps at geuz.org
> http://www.geuz.org/mailman/listinfo/gl2ps

-- 
Prof. Christophe Geuzaine
University of Liege, Electrical Engineering and Computer Science 
http://www.montefiore.ulg.ac.be/~geuzaine

Free software: http://gmsh.info | http://getdp.info | http://onelab.info