equal
deleted
inserted
replaced
6 set_pixels_per_unit( |
6 set_pixels_per_unit( |
7 (1.0 + (double) zoom_step / 100.0) * get_pixels_per_unit()); |
7 (1.0 + (double) zoom_step / 100.0) * get_pixels_per_unit()); |
8 if(zoomtrack) |
8 if(zoomtrack) |
9 { |
9 { |
10 propertyChange(false, N_RADIUS); |
10 propertyChange(false, N_RADIUS); |
|
11 propertyChange(true, E_WIDTH); |
11 } |
12 } |
12 } |
13 } |
13 |
14 |
14 void GraphDisplayerCanvas::zoomOut() |
15 void GraphDisplayerCanvas::zoomOut() |
15 { |
16 { |
16 set_pixels_per_unit( |
17 set_pixels_per_unit( |
17 (1.0 - (double) zoom_step / 100.0) * get_pixels_per_unit()); |
18 (1.0 - (double) zoom_step / 100.0) * get_pixels_per_unit()); |
18 if(zoomtrack) |
19 if(zoomtrack) |
19 { |
20 { |
|
21 propertyChange(true, E_WIDTH); |
20 propertyChange(false, N_RADIUS); |
22 propertyChange(false, N_RADIUS); |
21 } |
23 } |
22 } |
24 } |
23 |
25 |
24 void GraphDisplayerCanvas::zoomFit() |
26 void GraphDisplayerCanvas::zoomFit() |
40 double ppu2 = (double) ah / fabs(y2 - y1); |
42 double ppu2 = (double) ah / fabs(y2 - y1); |
41 set_pixels_per_unit((ppu1 < ppu2) ? ppu1 : ppu2); |
43 set_pixels_per_unit((ppu1 < ppu2) ? ppu1 : ppu2); |
42 |
44 |
43 if(zoomtrack) |
45 if(zoomtrack) |
44 { |
46 { |
|
47 propertyChange(true, E_WIDTH); |
45 propertyChange(false, N_RADIUS); |
48 propertyChange(false, N_RADIUS); |
46 } |
49 } |
47 } |
50 } |
48 |
51 |
49 void GraphDisplayerCanvas::zoom100() |
52 void GraphDisplayerCanvas::zoom100() |
51 updateScrollRegion(); |
54 updateScrollRegion(); |
52 set_pixels_per_unit(1.0); |
55 set_pixels_per_unit(1.0); |
53 |
56 |
54 if(zoomtrack) |
57 if(zoomtrack) |
55 { |
58 { |
|
59 propertyChange(true, E_WIDTH); |
56 propertyChange(false, N_RADIUS); |
60 propertyChange(false, N_RADIUS); |
57 } |
61 } |
58 } |
62 } |
59 |
63 |
60 void GraphDisplayerCanvas::updateScrollRegion() |
64 void GraphDisplayerCanvas::updateScrollRegion() |