comparison doodle/tk/screen_model.d @ 91:42766e14534e

Update screenViewBounds when the window is resized
author daveb
date Thu, 19 Aug 2010 18:28:18 +0930
parents 100dd23c7bdf
children bc5baa585b32
comparison
equal deleted inserted replaced
90:885914257e0e 91:42766e14534e
34 34
35 // Choose the centre of the canvas as the centre of the view 35 // Choose the centre of the canvas as the centre of the view
36 _viewCentreModel = _canvasBoundsModel.centre; 36 _viewCentreModel = _canvasBoundsModel.centre;
37 } 37 }
38 38
39 void setViewBoundsScreen(in Rectangle viewBoundsScreen) { _viewBoundsScreen = viewBoundsScreen; }
39 void consolidateCanvasBounds(in Rectangle requiredCanvasBounds) { _canvasBoundsModel = screenToModel(_viewBoundsScreen) | requiredCanvasBounds; } 40 void consolidateCanvasBounds(in Rectangle requiredCanvasBounds) { _canvasBoundsModel = screenToModel(_viewBoundsScreen) | requiredCanvasBounds; }
40 void canvasAccommodate(in Rectangle bounds) { _canvasBoundsModel = _canvasBoundsModel | bounds; } 41 void canvasAccommodate(in Rectangle bounds) { _canvasBoundsModel = _canvasBoundsModel | bounds; }
41 42
42 void zoomRelative(in double factor, in Point screenDatum) { 43 void zoomRelative(in double factor, in Point screenDatum) {
43 // Work out screen distance from current centre to datum, 44 // Work out screen distance from current centre to datum,