[Plplot-devel] proposed freetype changes
Hi, I have a proposed change for the freetype part of plplot: for the wxwidgets driver I'm using not only one scaling factors but two (for x and y), which is nicer if you resize the windows. But since the freetype interface allows to set only one scaling factor, the font output is a mess if I resize the window for the wxwidgets driver if freetype is enabled. I have now replaced the scaling factor scale, by scalex and scaley, made corresponding changes in the code of plfreetype.c and gd.c and wingcc.c (which set both factors to the same value, so here is no impact). Does anyone have objections if I commit that changes? Thanks, Werner -- Dipl. Ing. Werner Smekal Institut fuer Allgemeine Physik Technische Universitaet Wien Wiedner Hauptstr 8-10 A-1040 Wien Austria email: [EMAIL PROTECTED] web: http://www.iap.tuwien.ac.at/~smekal phone: +43-(0)1-58801-13463 (office) +43-(0)1-58801-13469 (laboratory) fax: +43-(0)1-58801-13499 - Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT business topics through brief surveys - and earn cash http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV ___ Plplot-devel mailing list Plplot-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/plplot-devel
Re: [Plplot-devel] proposed freetype changes
Hello Werner, At 09:42 AM 24/01/2007 +0100, you wrote: Hi, I have a proposed change for the freetype part of plplot: for the wxwidgets driver I'm using not only one scaling factors but two (for x and y), which is nicer if you resize the windows. But since the freetype interface allows to set only one scaling factor, the font output is a mess if I resize the window for the wxwidgets driver if freetype is enabled. I have now replaced the scaling factor scale, by scalex and scaley, made corresponding changes in the code of plfreetype.c and gd.c and wingcc.c (which set both factors to the same value, so here is no impact). Does anyone have objections if I commit that changes? May I make a suggestion ? Keep scale, add scalex and scaley, and add logic so that if scalex and scaley are defined, they are used to scale the plot, but if they aren't then scale is used ? That way the changes will be 100% backwards compatible. -Andrew - Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT business topics through brief surveys - and earn cash http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV ___ Plplot-devel mailing list Plplot-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/plplot-devel
Re: [Plplot-devel] proposed freetype changes
Hello Andrew, Andrew Roach wrote: Hello Werner, May I make a suggestion ? Keep scale, add scalex and scaley, and add logic so that if scalex and scaley are defined, they are used to scale the plot, but if they aren't then scale is used ? That way the changes will be 100% backwards compatible. Ok, sounds good. Only problem I see is, that the value of these variables will likely not be defined, since it's not cpp and I have no constructor where I can set them. And than I can't find out, what was set or not (since they may and will have any value). But I'll have a look and commit the changes if I find a solution (or if this problem doesn't exist anyway). Thanks, Werner -- Dipl. Ing. Werner Smekal Institut fuer Allgemeine Physik Technische Universitaet Wien Wiedner Hauptstr 8-10 A-1040 Wien Austria email: [EMAIL PROTECTED] web: http://www.iap.tuwien.ac.at/~smekal phone: +43-(0)1-58801-13463 (office) +43-(0)1-58801-13469 (laboratory) fax: +43-(0)1-58801-13499 - Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT business topics through brief surveys - and earn cash http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV ___ Plplot-devel mailing list Plplot-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/plplot-devel
Re: [Plplot-devel] proposed freetype changes
Arjen Markus writes: Werner Smekal wrote: Hello Andrew, Ok, sounds good. Only problem I see is, that the value of these variables will likely not be defined, since it's not cpp and I have no constructor where I can set them. And than I can't find out, what was set or not (since they may and will have any value). But I'll have a look and commit the changes if I find a solution (or if this problem doesn't exist anyway). One way to detect missing values is to initialise these variables to a known reserved value. My favourite is -999.0: - It can be represented exactly (!) in single and double precision, so no comparison problems as with -99.99 or the like - Because it is a negative value, it is much less likely to occur in (measurement) data than, say, 999.0 - It stands out: it is obviously a constructed value Great minds think alike: $ grep UNDEF include/plplotP.h #define PL_UNDEFINED -999 :) -- Maurice LeBrun - Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT business topics through brief surveys - and earn cash http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV ___ Plplot-devel mailing list Plplot-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/plplot-devel
Re: [Plplot-devel] proposed freetype changes
Maurice LeBrun wrote: Arjen Markus writes: Werner Smekal wrote: Hello Andrew, Ok, sounds good. Only problem I see is, that the value of these variables will likely not be defined, since it's not cpp and I have no constructor where I can set them. And than I can't find out, what was set or not (since they may and will have any value). But I'll have a look and commit the changes if I find a solution (or if this problem doesn't exist anyway). One way to detect missing values is to initialise these variables to a known reserved value. My favourite is -999.0: - It can be represented exactly (!) in single and double precision, so no comparison problems as with -99.99 or the like - Because it is a negative value, it is much less likely to occur in (measurement) data than, say, 999.0 - It stands out: it is obviously a constructed value Great minds think alike: $ grep UNDEF include/plplotP.h #define PL_UNDEFINED -999 :) So we have already defined the undefined ... Regards, Arjen - Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT business topics through brief surveys - and earn cash http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV ___ Plplot-devel mailing list Plplot-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/plplot-devel