octave-maintainers
[Top][All Lists]
Advanced

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

Re: unified FLTK & Gnuplot printing


From: Shai Ayal
Subject: Re: unified FLTK & Gnuplot printing
Date: Mon, 30 Aug 2010 08:25:43 +0300

2010/8/30 Jordi Gutiérrez Hermoso <address@hidden>:
> On 23 August 2010 20:13, Ben Abbott <address@hidden> wrote:
>> I've prepared a changeset to unify the printing for both the FLTK
>> and Gnuplot backends.
>>
>> For both backends, ghostscript is relied upon more heavily than
>> before.
>
> I've been meaning to comment on this.
>
> It's nice that you've found a unified method for all formats. I still
> think, however, that we could profitably use a bitmap method for
> bitmap output formats. Vector graphics aren't good for getting a
> picture of a colourful surface with shading at an interesting angle.
> It would also be nice to generate an exact screenshot of what's shown
> on the screen in a bitmap format, which at least Søren has wished for.
>
> I have no idea how much work this will be, but I want to get started
> on it, as an option or alternative to gl2ps at least for some output
> formats. Maybe not for the 3.4 release, but soonish.
>
Actually it's not very hard to get a pixel-by-pixel image of the
figure window in OpenGL. You would than have to convert it into some
useful image format, but we already have imwrite for this.
The only limitation is that you get exactly what is on-screen (i.e.
you cannot produce something with a better resolution than your
monitor). To do this, use the glReadPixels function:
http://www.opengl.org/sdk/docs/man/xhtml/glReadPixels.xml
For an example of how to use it, see draw_image in gl-render.cc which
uses the inverse function glWritePixels

Shai



reply via email to

[Prev in Thread] Current Thread [Next in Thread]