$include_dir="/home/hyper-archives/boost/include"; include("$include_dir/msg-header.inc") ?>
From: John Maddock (john_at_[hidden])
Date: 2007-03-16 06:26:06
Paul A Bristow wrote:
>> Should it be a single function
>> that takes loads of parameters (like color, range, size, ...).
>> Should it
>> be a class where the user would set these parameters as attributes?
>
> Well I think an interesting part of the project is to explore which
> of these, or some combination, is most convenient.
>
> Boosters will undoubtedly have some (many?) opinions on this ;-))
I think design is crucial here: we would want something extensible I guess.
So how about a "mini DOM" for vector graphics:
class vector_drawing; // does this need template params??
with vector_drawing supporting simple drawn lines, text output etc.
And then:
class graph : public vector_drawing{ ... };
To extend the interface to include drawings made from data-points or
functors? Wait, we could just use a factory function that returns a
vector_drawing instead of inheritance maybe?
All very traditional OO so far...
Then what about saving the result: it could be as SVG, or maybe some other
format (rendered as png or whatever?), so perhaps non-member writer
functions would be best, along with accessor const-member functions in the
vector_drawing type to allow the DOM to be enumerated? Presumable it would
be possible to read in SVG as well, although maybe that would be a step too
far for this project?
More questions than answers here maybe, but something for you to think
about.
HTH, John.