[Pharo-project] GDLib bindings?
I wonder what would be the right way in Smalltalk to use a popular graphics library such as gdlib? I use it currently from my current lisp-based web site to overlay text (using different fonts) on top of pre-defined png and jpeg images. Since I didn't find any smalltalk bindings (plugins?) for the library I wonder maybe there are some built-in tools in Pharo/Squeak that do the same job? Thank you, Andrei
One can always load the graphic into a Form instance and send #getCanvas to that; then message like #drawString:at:font:color: are available, after which you can save the modified form to a new file using #writeJPEGFileNamed:. I don't see a convenience method for saving PNG, but there is a PNGReadWriter that should respond favorably to #nextPutImage:. The one thing that Windows does well is device (quasi)independence. I miss GDI's handling of printers. There, I said something nice about Microsoft; that covers me until 2020 :) Bill -----Original Message----- From: pharo-project-bounces@lists.gforge.inria.fr [mailto:pharo-project-bounces@lists.gforge.inria.fr] On Behalf Of Andrei Stebakov Sent: Monday, August 09, 2010 11:02 AM To: pharo-project@lists.gforge.inria.fr Subject: [Pharo-project] GDLib bindings? I wonder what would be the right way in Smalltalk to use a popular graphics library such as gdlib? I use it currently from my current lisp-based web site to overlay text (using different fonts) on top of pre-defined png and jpeg images. Since I didn't find any smalltalk bindings (plugins?) for the library I wonder maybe there are some built-in tools in Pharo/Squeak that do the same job? Thank you, Andrei _______________________________________________ Pharo-project mailing list Pharo-project@lists.gforge.inria.fr http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
Yup, GDLib bindings is not really necessary, since squeak graphics is capable enough to do the same and even more. On 9 August 2010 19:26, Schwab,Wilhelm K <bschwab@anest.ufl.edu> wrote:
One can always load the graphic into a Form instance and send #getCanvas to that; then message like #drawString:at:font:color: are available, after which you can save the modified form to a new file using #writeJPEGFileNamed:. Â I don't see a convenience method for saving PNG, but there is a PNGReadWriter that should respond favorably to #nextPutImage:.
The one thing that Windows does well is device (quasi)independence. Â I miss GDI's handling of printers. Â There, I said something nice about Microsoft; that covers me until 2020 :)
Bill
-----Original Message----- From: pharo-project-bounces@lists.gforge.inria.fr [mailto:pharo-project-bounces@lists.gforge.inria.fr] On Behalf Of Andrei Stebakov Sent: Monday, August 09, 2010 11:02 AM To: pharo-project@lists.gforge.inria.fr Subject: [Pharo-project] GDLib bindings?
I wonder what would be the right way in Smalltalk to use a popular graphics library such as gdlib? I use it currently from my current lisp-based web site to overlay text (using different fonts) on top of pre-defined png and jpeg images. Since I didn't find any smalltalk bindings (plugins?) for the library I wonder maybe there are some built-in tools in Pharo/Squeak that do the same job?
Thank you, Andrei
_______________________________________________ Pharo-project mailing list Pharo-project@lists.gforge.inria.fr http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
_______________________________________________ Pharo-project mailing list Pharo-project@lists.gforge.inria.fr http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
-- Best regards, Igor Stasenko AKA sig.
participants (3)
-
Andrei Stebakov -
Igor Stasenko -
Schwab,Wilhelm K