GDLib bindings?

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

GDLib bindings?

Andrei Stebakov
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
[hidden email]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
Reply | Threaded
Open this post in threaded view
|

Re: GDLib bindings?

Schwab,Wilhelm K
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: [hidden email] [mailto:[hidden email]] On Behalf Of Andrei Stebakov
Sent: Monday, August 09, 2010 11:02 AM
To: [hidden email]
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
[hidden email]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project

_______________________________________________
Pharo-project mailing list
[hidden email]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
Reply | Threaded
Open this post in threaded view
|

Re: GDLib bindings?

Igor Stasenko
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 <[hidden email]> 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: [hidden email] [mailto:[hidden email]] On Behalf Of Andrei Stebakov
> Sent: Monday, August 09, 2010 11:02 AM
> To: [hidden email]
> 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
> [hidden email]
> http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
>
> _______________________________________________
> Pharo-project mailing list
> [hidden email]
> http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
>



--
Best regards,
Igor Stasenko AKA sig.

_______________________________________________
Pharo-project mailing list
[hidden email]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project