Remove unused code.
This commit is contained in:
parent
3ab9df90df
commit
fea3e90fba
15
rotation.cpp
15
rotation.cpp
|
@ -649,10 +649,6 @@ Image* rotate(Image const& src, double angle)
|
||||||
// TODO: add one ligne for smooth border
|
// TODO: add one ligne for smooth border
|
||||||
DPoint const tl_grid = get_mapped_point(src, Point(0, 0), rotation);
|
DPoint const tl_grid = get_mapped_point(src, Point(0, 0), rotation);
|
||||||
Point const tl = convert_img_coord(*rotated, tl_grid);
|
Point const tl = convert_img_coord(*rotated, tl_grid);
|
||||||
DPoint const tr_grid = get_mapped_point(src, Point(src.width - 1, 0), rotation);
|
|
||||||
Point const tr = convert_img_coord(*rotated, tr_grid);
|
|
||||||
DPoint const bl_grid = get_mapped_point(src, Point(0, src.height - 1), rotation);
|
|
||||||
Point const bl = convert_img_coord(*rotated, bl_grid);
|
|
||||||
|
|
||||||
// corner points in source image
|
// corner points in source image
|
||||||
DPoint src_tl = get_mapped_point(*rotated, tl, -rotation);
|
DPoint src_tl = get_mapped_point(*rotated, tl, -rotation);
|
||||||
|
@ -671,17 +667,6 @@ Image* rotate(Image const& src, double angle)
|
||||||
round_if_very_small(src_delta_y.x);
|
round_if_very_small(src_delta_y.x);
|
||||||
round_if_very_small(src_delta_y.y);
|
round_if_very_small(src_delta_y.y);
|
||||||
|
|
||||||
// // steps for first column in source image (y)
|
|
||||||
int origin_nb_steps = max(abs(bl.x - tl.x), abs(bl.y - tl.y));
|
|
||||||
// // steps for line in source image (x)
|
|
||||||
int line_nb_steps = max(abs(tr.x - tl.x), abs(tr.y - tl.y));
|
|
||||||
|
|
||||||
// steps for first column in rotated image (y)
|
|
||||||
DPoint const rotated_step((bl.x - tl.x) / (float) origin_nb_steps, (bl.y - tl.y) / (float) origin_nb_steps);
|
|
||||||
|
|
||||||
// steps for line in rotated image (x)
|
|
||||||
DPoint const bresenham((tr.x - tl.x) / (float) line_nb_steps, (tr.y - tl.y) / (float) line_nb_steps);
|
|
||||||
|
|
||||||
unsigned int const src_limit = src.width * src.height * 3;
|
unsigned int const src_limit = src.width * src.height * 3;
|
||||||
|
|
||||||
DPoint const rot_origin_in_src_grid = get_mapped_point(*rotated, Point(0, 0), -rotation);
|
DPoint const rot_origin_in_src_grid = get_mapped_point(*rotated, Point(0, 0), -rotation);
|
||||||
|
|
Loading…
Reference in a new issue