On 26/03/2010 22:58, Christopher Barker wrote:
> Werner F. Bruhin wrote:
>> Very surprised/pleased with the difference in speed of FC (attached) 
>> when comparing it with my FC2 trial.
>
> well, I originally wrote FloatCanvas with the intention of using it 
> for potentially large data sets, and on slower hardware than we have 
> these days, so it's pretty bare bones.
>
> Also, GCs are slower than DCs anyway.
I am amazed that there is this big a difference.

I am a bit concerned about speed as the real code will have to do quit a 
bit of db querying.  In design mode I need to get the corresponding rack 
item db row for each bottle (e.g. 200 for the single stack and 391 for 
the double stack), the sizes of these racks will obviously be user 
definable and can go way higher then this.  In the viewer this will be 
even worse as for each rack item db row I have to get the related rows 
if a bottle is stored in this location to be able to display such things 
as wine name, vintage, image etc etc.
>> Figured out how to move (by copy/pasting :)) the "frame" of a rack, 
>> but I am unsure on how to move the "children" i.e. the bottles 
>> (circles).  I guess that I could use the group to get its members and 
>> then move them. 
>
> The Group object has a Move() method, which essentially does just that.
That is just to damn easy ;-) , I was afraid I had to do some work here.
>
> So all you need to do is make a MovingGroup DrawObject, and use that 
> just like your rectangle.
>
> Edited code enclosed.
>
> Now that I look at it, I really should just add the GetOutlinePoints() 
> method to the DrawObject base class, and then any object could be 
> moved...

Thanks for all this
Werner

_______________________________________________
FloatCanvas mailing list
[email protected]
http://paulmcnett.com/cgi-bin/mailman/listinfo/floatcanvas

Reply via email to