1 /*
2 * editgrid.cc
3 * AYM 1998-11-09
4 */
5
6
7 /*
8 This file is part of Yadex.
9
10 Yadex incorporates code from DEU 5.21 that was put in the public domain in
11 1994 by Rapha�l Quinet and Brendon Wyber.
12
13 The rest of Yadex is Copyright � 1997-2003 Andr� Majorel and others.
14
15 This program is free software; you can redistribute it and/or modify it under
16 the terms of the GNU General Public License as published by the Free Software
17 Foundation; either version 2 of the License, or (at your option) any later
18 version.
19
20 This program is distributed in the hope that it will be useful, but WITHOUT
21 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
22 FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
23
24 You should have received a copy of the GNU General Public License along with
25 this program; if not, write to the Free Software Foundation, Inc., 59 Temple
26 Place, Suite 330, Boston, MA 02111-1307, USA.
27 */
28
29
30 #include "yadex.h"
31 #include "_edit.h"
32 #include "editgrid.h"
33
34
edit_grid_adapt(edit_t * e)35 void edit_grid_adapt (edit_t *e)
36 {
37 if (! e->grid_step_locked)
38 for (e->grid_step = e->grid_step_max;
39 e->grid_step * Scale / 2 >= grid_pixels_min;
40 e->grid_step /= 2)
41 ;
42 }
43
44
45
46
47