[gl2ps] fix text alignment and rotation in PDF

Dan Lipsa dan.lipsa at kitware.com
Fri Jul 28 18:13:23 CEST 2017


On Fri, Jul 28, 2017 at 3:14 AM, Christophe Geuzaine <cgeuzaine at ulg.ac.be>
wrote:

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

Yes, that's right. Both for rotation and for alignment without rotation.


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

Great, Thanks. I will submit the merge request that way.

Dan



>
> 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
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.geuz.org/pipermail/gl2ps/attachments/20170728/fcd6b2a2/attachment.html>