[#670] Clipping the points avoids wx's scale limitations

Date:
2008-07-10 14:35
Priority:
3
State:
Open
Submitted by:
Anthony Lenton (elachuni)
Assigned to:
Nobody (None)
Category:
none
Version:
none
Summary:
Clipping the points avoids wx's scale limitations

Detailed description
Attached is a patch that allows you to lift the max_scale limit, by clipping points within wx's limits before drawing.

* Optimized renderers are disabled in the patch as clipping is only implemented in the Python default renderers. As clipping is done after projecting the points, if the idea seems sound we'd have to implement clipping in the C wxproj renderers too, or pass the points back to Python to be clipped after projecting.

* in Thuban.UI.viewport.ViewPort's calc_min_max_scales, max_scale is now set arbitrarily to 500000. We can instead choose a different maximum scale policy, as now we're not restricted by wx's limitations.

* I've added quite a bit of testing but quite likely a couple of cases are still not handled correctly. Failing test cases are welcome.

* I haven't tried clipping with ExportRenderer or PrinterRenderer, I don't know if those will be trouble.

No comments have been posted

Attachments:
Size Name Date By Download
22 KiBclipping.diff2008-07-10 14:35Anthony Lentonclipping.diff
Field Old Value Date By
File Added281: clipping.diff2008-07-10 14:35Anthony Lenton