R
Rob Leslie
Greetings,
I've taken some of the suggestions here and made improvements to my
Ruby/GD2 library.
First, the gem:
ftp://ftp.mars.org/pub/ruby/gd2-1.0.gem
Some of the changes:
- I took Matz's feelings to heart and realized the weirdness with
Palette#find! is probably because Palette#find clashed with
Enumerable#find. So, I removed both methods and added Palette#resolve
instead. (Palette#find used to be just an alias for Palette#exact.)
- I've gone through and documented most of the library with RDoc,
except for the Canvas class. I'm still working on this and may make
some further improvements before finalizing the API.
- I added Image.import and Image#export methods. These accept a
filename and use the filename extension to determine the image format.
- The Image#jpeg_data, Image#png_data, et al. methods are now just
Image#jpeg, Image#png, etc.
I left the non-destructive image operations alone, because they
aren't significantly more expensive than the destructive versions.
(Either version must create a new gd image internally.)
Thanks for everyone's feedback, which I continue to welcome.
I have one question: what is the process for including gems in the
remote repository?
Cheers,
I've taken some of the suggestions here and made improvements to my
Ruby/GD2 library.
First, the gem:
ftp://ftp.mars.org/pub/ruby/gd2-1.0.gem
Some of the changes:
- I took Matz's feelings to heart and realized the weirdness with
Palette#find! is probably because Palette#find clashed with
Enumerable#find. So, I removed both methods and added Palette#resolve
instead. (Palette#find used to be just an alias for Palette#exact.)
- I've gone through and documented most of the library with RDoc,
except for the Canvas class. I'm still working on this and may make
some further improvements before finalizing the API.
- I added Image.import and Image#export methods. These accept a
filename and use the filename extension to determine the image format.
- The Image#jpeg_data, Image#png_data, et al. methods are now just
Image#jpeg, Image#png, etc.
I left the non-destructive image operations alone, because they
aren't significantly more expensive than the destructive versions.
(Either version must create a new gd image internally.)
Thanks for everyone's feedback, which I continue to welcome.
I have one question: what is the process for including gems in the
remote repository?
Cheers,