Forums | Admin

Discussion Forums: open-discussion

Start New Thread Start New Thread

 

By: David Parry
reading the source code [ reply ]  
2008-06-16 02:11
I'm looking through the gruff source code, because:

a) It's a great package, and I'm using it lots.
b) I'd like to add a few things to it (like value labels on line graphs),

So far so good. But, there's something I'm a bit confused about. A lot of the code does things like this:
<pre>
@d = @d.stroke(@marker_color)
@d = @d.stroke_width 1
@d = @d.line(@graph_left, y, @graph_right, y)
</pre>

I'm finding this a tad confusing. So we're replacing the current thing with a thing's stroke?

The really confusing bit here is I can't see where @d is initially getting its value.

Can anyone clarify what's going on here?

Thanks in advance.