Improved brush rotation by adding 3 steps of scale2x. Result is not as good as I hoped, but for large flat surfaces, the edges are indeed much smoother than before.

git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@1789 416bcca6-2ee7-4201-b75f-2eb2f807beb1
This commit is contained in:
Yves Rizoud
2011-06-04 15:22:13 +00:00
parent 1da0c96db8
commit 2d8c061e32
6 changed files with 263 additions and 38 deletions

View File

@@ -42,7 +42,6 @@
#define M_PI 3.141592653589793238462643
#endif
/// Simulates clicking the "Draw" button.
void Return_to_draw_mode(void)
{
@@ -971,8 +970,7 @@ void Rotate_brush_1_5(void)
{
dx=Paintbrush_X-Brush_rotation_center_X;
dy=Paintbrush_Y-Brush_rotation_center_Y;
angle=acos(((float)dx)/sqrt((dx*dx)+(dy*dy)));
if (dy>0) angle=M_2PI-angle;
angle=M_2PI-atan2(dy,dx);
}
if (Menu_is_visible)