Boost logo

Boost :

From: Christian Henning (chhenning_at_[hidden])
Date: 2006-10-14 21:39:41


> The next question is, can we make draw_line more generic, and how much
> more generic (i.e. what kinds of images are possible)
>

I don't know about AGG but I think a generic draw line approach can be
implemented as an image iterator. For each step the iterator would
move to the next line's pixel. A line segment is defined by start and
end point. The iterator would need to calculate the slope and can then
decide what the next pixel is. The underlying algorithm, like
Bresenham, might be a policy of the line iterator class.

I'm suggesting an iterator since one might to some extra work at each
line's pixel. Think about antialiased lines.

Christian


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk