
4 Oct
2005
4 Oct
'05
10:43 a.m.
John Torjo wrote:
And, about usability in code. Why would I want in my program, both: gui::rect<pc,double> and gui::rect<pc,int> ? This IMHO would confuse users of the library.
I would think that floats make the most sense for percentage based rectangles, while ints make the most sense for absolute pixel position based rectangles. So perhaps something like the following might be appropriate? struct px { typedef int pos_type; }; struct pc { typedef float pos_type; }; gui::rect < px > rect1; gui::rect < pc > rect2; -Jason