[gl2ps] PGF backend and new code structure

Shai Ayal shaiay at gmail.com
Sun Nov 20 14:49:48 CET 2005


Well, i kind of liked it being only in one file ...

Shai

On 11/20/05, Fabian Wenzel <wenzel at tu-harburg.de> wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> Hi there!
>
> Today I finished working on the PGF backend. Unfortunately, pgf is not
> as complete as I expected: Including images and color shading is not
> possible, so I stopped also working on transparency. For simple
> drawings, it might be useful though.
>
> Also, I noticed that the code structure of gl2ps.c could be improved
> (long file with many functions), so (I hope you won't kill me) I did the
> following:
>
> 1. Each output format (=backend) is located in an own file
> 2. Each backend defines a structure "gl2psBackend" encapsulating its
> functionality completely (kind of object oriented). They are all
> referenced in gl2ps.c (around line 119...)
> 3. There are two more functions "char *gl2psGetFileExtension(GLint
> format)" and "char *gl2psGetDescription(GLint format)" for each backend.
> I think it makes sense as an application does not have to find the right
> file suffix on its own - there is no reason for it. gl2psTest also has
> been adjusted to the changes above, so no more
> (format==GL2PS_EPS)?"eps":"pdf"
> 4. The while bunch of "switch(gl2ps->format)" could be removed in gl2ps.c
>
> I think that maintainable code is more important than a minimum number
> of source files.
>
> Finally, I added autotools-support for building a lib. Some changes will
> be necessary for win32 and MacOSX (for dependencies to OpenGL).
>
> In order not to spoil this list with source code, I send the new archive
> to Christophe as proposal.
>
> There is another issue that is better written in an own posting.
>
> Cheers,
>
>         Fabian
>
>
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.4.1 (GNU/Linux)
> Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org
>
> iD8DBQFDgH6FbJzYO4mghQIRAqntAJ0ZPUREbD3WvDlr5NmgiDhwuBDsggCgwVRV
> Gns0WrGxinTbPzWmf1E5GuE=
> =MdC/
> -----END PGP SIGNATURE-----
> _______________________________________________
> gl2ps mailing list
> gl2ps at geuz.org
> http://www.geuz.org/mailman/listinfo/gl2ps
>