Dirty geo, coord, and area.

Dirty of geo

A geo is dirty when any of the shape, size or positions is changed. It's geo and positions should be recomputed before drawing. So, dirty geos are marked as dirty and put into dirty_geos list. The list is inspected before drawing to make sure the right shape, size, and positions.

Dirty of coord

A coord is dirty when it's transformation matrix being changed. Dirty coords are marked as dirty and put into dirty_coords list. Once a coord is dirty, every member geos of it are also dirty. Because, their shape, size and positions will be changed. But, they are not marked as dirty and put into dirty_geos list, since all these member geos will be recomputed for computing new current area of the coord. The changes of a coord also affect child coords. Once parent is dirty, all children are also dirty for their aggregate matrix out of date. Dirty coords should be clean in preorder of tree traversal. The dirty_coords list are sorted to keep the order before cleaning. Whenever a coord is marked dirty and put into dirty_coords list, all it's children should also be marked and put.

The procedure of clean coords comprises recomputing aggregate tranform matrix and area where members spreading in.

The list is inspected before drawing to recompute new shape, size, and positions of member geos of coords in the list. The drity flag of member geos will be clean.

Clean coords should be performed before clean geos, since clean coords will also clean member geos.

SourceForge.net Logo