On Sep 1, 2006, at 3:28 AM, William Crawford wrote:

> Eric Hodel wrote:
>> png is a pure-ruby PNG writing library written by Ryan Davis.
>
> Is there a website for it?  Maybe an rDoc page?  I'd like to know some
> things like 'Does it draw dashed/dotted lines?' etc.

Not yet.  Its really small so:

$ sudo gem install png
$ ri -l | grep PNG
[...]
PNG::Canvas#line
[...]
$ ri PNG::Canvas#line
------------------------------------------------------- PNG::Canvas#line
      line(x0, y0, x1, y1, color)
------------------------------------------------------------------------
      Draws a line using Xiaolin Wu's antialiasing technique.

      http://en.wikipedia.org/wiki/Xiaolin_Wu's_line_algorithm\

(In short, no.)

> If you're wondering why it matters so much, I'm making a very very  
> very
> simple little plaid design creator in ruby.  The dashed lines are used
> to simulate the weaving of the threads.  The upper and left edges are
> smooth, but the right and bottom edges aren't, because of this bug.  I
> think I can simply draw over the edge of the canvas and fix it, but I
> haven't gotten around to trying yet.  Being able to simply draw it
> correctly without hacks would be much better.
>
> I could, of course, draw it pixel by pixel, but I think that'd be  
> quite
> a bit slower.

PNG draws pixel by pixel.

-- 
Eric Hodel - drbrain / segment7.net - http://blog.segment7.net
This implementation is HODEL-HASH-9600 compliant

http://trackmap.robotcoop.com