@@ -345,8 +345,8 @@ fn (rv &RasterViewComponent) draw_device_current(d ui.DrawDevice) {
345345 }
346346 pos_x , pos_y := rv.get_pos (rv.cur_i, rv.cur_j)
347347 cur_color := gg.cyan
348- rv.layout.draw_device_rect_surrounded (d, pos_x, pos_y, rv.pixel_size, rv.pixel_size,
349- 2 , cur_color)
348+ rv.layout.draw_device_rect_surrounded (d, pos_x, pos_y, rv.pixel_size, rv.pixel_size, 2 ,
349+ cur_color)
350350}
351351
352352fn (rv &RasterViewComponent) draw_device_selection (d ui.DrawDevice) {
@@ -355,8 +355,8 @@ fn (rv &RasterViewComponent) draw_device_selection(d ui.DrawDevice) {
355355 }
356356 pos_x , pos_y := rv.get_pos (rv.sel_i, rv.sel_j)
357357 sel_color := gg.red
358- rv.layout.draw_device_rect_surrounded (d, pos_x, pos_y, rv.pixel_size, rv.pixel_size,
359- 3 , sel_color)
358+ rv.layout.draw_device_rect_surrounded (d, pos_x, pos_y, rv.pixel_size, rv.pixel_size, 3 ,
359+ sel_color)
360360}
361361
362362fn (rv &RasterViewComponent) size () (int , int ) {
@@ -374,8 +374,8 @@ fn (mut rv RasterViewComponent) visible_pixels() {
374374 rv.from_y = rv.from_i * rv.size
375375
376376 rv.from_j = math.min (math.max (rv.layout.scrollview.offset_x / rv.size, 0 ), rv.width () - 1 )
377- rv.to_j = math.min ((rv.layout.scrollview.offset_x +
378- rv.layout.width) / rv.size, rv. width () - 1 ) + 1
377+ rv.to_j = math.min ((rv.layout.scrollview.offset_x + rv.layout.width) / rv.size, rv. width () -
378+ 1 ) + 1
379379 rv.from_x = rv.from_j * rv.size
380380 } else {
381381 rv.from_i, rv.to_i, rv.from_y = 0 , rv.height (), 0
@@ -478,7 +478,8 @@ pub fn (mut rv RasterViewComponent) update_bounds() {
478478
479479// TODO: documentation
480480pub fn (rv &RasterViewComponent) get_margins () (int , int , int , int ) { // top, bottom, left, right
481- return rv.bounds_i, rv.height () - rv.bounds_i - rv.bounds_h, rv.bounds_j, rv.width () - rv.bounds_j - rv.bounds_w
481+ return rv.bounds_i, rv.height () - rv.bounds_i - rv.bounds_h, rv.bounds_j, rv.width () -
482+ rv.bounds_j - rv.bounds_w
482483}
483484
484485// TODO: documentation
@@ -488,8 +489,8 @@ pub fn (mut rv RasterViewComponent) move_pixels(di int, dj int) {
488489 || (dj < 0 && dj < - ml) || (dj > 0 && dj > mr) {
489490 return
490491 }
491- mut from_i, mut to_i, mut from_j, mut to_j, mut step_i, mut step_j := (rv.bounds_i + rv.bounds_h - 1 ), rv.bounds_i, (
492- rv.bounds_j + rv.bounds_w - 1 ), rv.bounds_j, 1 , 1
492+ mut from_i, mut to_i, mut from_j, mut to_j, mut step_i, mut step_j := (rv.bounds_i +
493+ rv.bounds_h - 1 ), rv.bounds_i, (rv. bounds_j + rv.bounds_w - 1 ), rv.bounds_j, 1 , 1
493494
494495 if di < 0 {
495496 step_i = - 1
0 commit comments