hmm. Good question :)
I thought about it a little, and I see a few ways it might be done:
- The arguments could be passed in the same way other primitives get their parameters,
via gropnode parameters. This would be unworkable though, because currently there is a
limit of 3 parameters. This could be increased, but it would increase memory usage for
every gropnode! Maybe there's a better way to pass parameters in general?
- Create an object with a handle, like the bitmaps, and use separate functions to add
points to a list referenced by this handle. It would work, but could be
cumbersome/slow if the polygons are changed frequently.
- Have three 'primitives', BeginPolygon, EndPolygon, and PolyVertex. I think this is a
bit like how OpenGL defines polygons, so it might be good to research that some. (I'm
not an OpenGL programmer, but I have a friend that is) BeginPolygon clears the
internal list of vertices, PolyVertex adds a vertex to this temporary list, and
EndPolygon actually draws it.
On Fri, 01 June 2001, Shane Nay wrote:
>
> Micah,
> I'm working on a couple more graphic primitives. Namely Polygons, filled
> Polygons, Arcs, and filled Arcs. My plan was to do Arcs first, but in order
> to to do the filled ones I think the most efficient way is to finish filled
> Polygons first.
>
> Now, that brings up a problem, in that, all our present drawing primitives
> have fixed amounts of data attached to them, except for the bitmap drawers.
> So I don't know what the approach that Micah wants to take here (it is
> Micah's descision in my opinion), so do we take a multiple arg tact (...), or
> do we take a copying of stuff into binary store like the bitmap? (This is
> for Polygons, Arcs have a fixed number of arguments)
>
> Thanks,
> Shane Nay.
>
> _______________________________________________
> Pgui-devel mailing list
> [EMAIL PROTECTED]
> http://lists.sourceforge.net/lists/listinfo/pgui-devel
--
To the systems programmer, users and applications serve only to provide a
test load.
_______________________________________________
Pgui-devel mailing list
[EMAIL PROTECTED]
http://lists.sourceforge.net/lists/listinfo/pgui-devel