- Timestamp:
- 05/11/11 15:57:36 (7 months ago)
- Location:
- branches/e4fix/EDIT4
- Files:
-
- 2 modified
-
ED4_root.cxx (modified) (5 diffs)
-
ed4_class.hxx (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
branches/e4fix/EDIT4/ED4_root.cxx
r8201 r8202 104 104 105 105 106 void ED4_window::win_to_world_coords(AW_pos *x , AW_pos *y) {106 void ED4_window::win_to_world_coords(AW_pos *xPtr, AW_pos *yPtr) { 107 107 // calculates transformation from window to world coordinates in a given window 108 AW_pos temp_x = *x; 109 AW_pos temp_y = *y; 108 const AW_pos x = *xPtr; 109 const AW_pos y = *yPtr; 110 111 AW_pos temp_x = x; 112 AW_pos temp_y = y; 110 113 111 114 ED4_folding_line *current_fl = vertical_fl; // calculate x-offset due to vertical folding lines 112 while ((current_fl != NULL) && (*x >= current_fl->world_pos[X_POS])) 113 { 115 while ((current_fl != NULL) && (x >= current_fl->window_pos[X_POS])) { 114 116 if ((current_fl->length == INFINITE) || 115 (( *y >= current_fl->window_pos[Y_POS]) && (*y <= (current_fl->window_pos[Y_POS] + current_fl->length))))117 ((y >= current_fl->window_pos[Y_POS]) && (y <= (current_fl->window_pos[Y_POS] + current_fl->length)))) 116 118 { 117 119 temp_x += current_fl->dimension; … … 121 123 122 124 current_fl = horizontal_fl; // calculate y-offset due to horizontal folding lines 123 while ((current_fl != NULL) && ( *y >= current_fl->world_pos[Y_POS])) {125 while ((current_fl != NULL) && (y >= current_fl->window_pos[Y_POS])) { 124 126 if ((current_fl->length == INFINITE) || 125 (( *x >= current_fl->window_pos[X_POS]) && (*x <= (current_fl->window_pos[X_POS] + current_fl->length))))127 ((x >= current_fl->window_pos[X_POS]) && (x <= (current_fl->window_pos[X_POS] + current_fl->length)))) 126 128 { 127 129 temp_y += current_fl->dimension; … … 130 132 } 131 133 132 *x = temp_x;133 *y = temp_y;134 *xPtr = temp_x; 135 *yPtr = temp_y; 134 136 } 135 137 136 138 void ED4_window::world_to_win_coords(AW_pos *xPtr, AW_pos *yPtr) { 137 139 // calculates transformation from world to window coordinates in a given window 138 AW_pos x = *xPtr;139 AW_pos y = *yPtr;140 const AW_pos x = *xPtr; 141 const AW_pos y = *yPtr; 140 142 141 143 AW_pos temp_x = x; … … 145 147 while (current_fl && (x>=current_fl->world_pos[X_POS])) { 146 148 if ((current_fl->length == INFINITE) || 147 ((y >= current_fl->world_pos[Y_POS]) && 148 (y <= current_fl->world_pos[Y_POS] + current_fl->length))) 149 ((y >= current_fl->world_pos[Y_POS]) && (y <= current_fl->world_pos[Y_POS] + current_fl->length))) 149 150 { 150 151 temp_x -= current_fl->dimension; … … 156 157 while (current_fl && (y >= current_fl->world_pos[Y_POS])) { 157 158 if ((current_fl->length == INFINITE) || 158 ((x >= current_fl->world_pos[X_POS]) && 159 (x <= (current_fl->world_pos[X_POS] + current_fl->length)))) 159 ((x >= current_fl->world_pos[X_POS]) && (x <= (current_fl->world_pos[X_POS] + current_fl->length)))) 160 160 { 161 161 temp_y -= current_fl->dimension; -
branches/e4fix/EDIT4/ed4_class.hxx
r8201 r8202 291 291 AW_pos window_pos[2]; 292 292 AW_pos length; 293 AW_pos dimension; 293 AW_pos dimension; // amount of pixel folded away 294 294 ED4_base *link; 295 295 ED4_folding_line *next; 296 296 297 297 ED4_folding_line(); 298 299 298 300 }; 299 301
