[gl2ps] Clipping and Background
Joe Miller
lpe540 at yahoo.com
Thu Mar 24 18:29:38 CET 2005
Hi Christophe,
I haven't had a chance to try it yet but it sounds
exactly like what I needed. Thanks.
I'll let you know if there are any problems. Thanks
again.
-joe
--- Christophe Geuzaine <geuzaine at acm.caltech.edu>
wrote:
> Joe Miller wrote:
> > Hi,
> >
> > I had a quick question about clipping and
> backgrounds
> > with postscript. I see in the example provided how
> to
> > start and end the gl2psViewport so that gl2ps
> clips at
> > the boundaries. However, before you issue the clip
> > command you do a fill which clears the background.
> I
> > was wondering if there was a particular reason for
> > this or if there was another way I could clip in
> > postscript.
> >
> > Here's my situation. I setup a viewport in opengl,
> I
> > then open up another viewport on top of the
> original
> > one. I then add some text to the top viewport and
> some
> > of that text falls out of that viewport's range
> > (though is clipped by the rasterizer). The text
> that
> > falls out of range is not being completely clipped
> in
> > postscript when I don't set
> gl2psViewportBegin/End.
> > When I set gl2psViewport it clips the text
> correctly,
> > however, the picture on the bottom viewport is
> cleared
> > by the fill.
> >
> > So I was wondering if you had any suggestions
> (besides
> > switching to one viewport) or if it was going to
> be
> > problematic for me if I removed the fill line.
> >
>
> Hi Joe - Indeed, for PS/EPS output, the current
> version of GL2PS does
> not clip the viewport if the background is not drawn
> (that's a bug!). In
> addition, the current version provides no way to
> disable the background
> for just a specific viewport (that's a shortcoming
> in the API).
>
> I tried to fix both issues in my CVS tree:
>
> - gl2psBeginViewport() now always clips (even if
> GL2PS_DRAW_BACKGROUND
> is not set)
>
> - there is a new function in the API called
> gl2psSetOptions() that
> permits to change the options on the fly. You could
> for example call
> gl2psBeginPage() with options=GL2PS_DRAW_BACKGROUND,
> and then change the
> options before calling gl2psBeginViewport() in order
> to disable the
> background drawing for that specific viewport.
>
> The new version is available here:
> http://geuz.org/gl2ps/src/gl2ps-nightly.tgz
>
> Let me know if this solves your problem.
>
> Take care,
>
> Christophe
>
>
>
> > Sorry for being so long winded. Thanks for the
> help.
> >
> > -joe
> >
> > __________________________________________________
> > Do You Yahoo!?
> > Tired of spam? Yahoo! Mail has the best spam
> protection around
> > http://mail.yahoo.com
> > _______________________________________________
> > gl2ps mailing list
> > gl2ps at geuz.org
> > http://www.geuz.org/mailman/listinfo/gl2ps
> >
>
>
> --
> Christophe Geuzaine
> Applied and Computational Mathematics, Caltech
> geuzaine at acm.caltech.edu - http://geuz.org
>
>
__________________________________
Do you Yahoo!?
Yahoo! Small Business - Try our new resources site!
http://smallbusiness.yahoo.com/resources/