Make mv's use signed chars explicitly.
[xiph/unicode.git] / sushivision / scale.h
blob3b920e9fd390d053aea6976e38ec35d69b91cd8e
1 /*
3 * sushivision copyright (C) 2006-2007 Monty <monty@xiph.org>
5 * sushivision is free software; you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License as published by
7 * the Free Software Foundation; either version 2, or (at your option)
8 * any later version.
9 *
10 * sushivision is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
15 * You should have received a copy of the GNU General Public License
16 * along with sushivision; see the file COPYING. If not, write to the
17 * Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
22 typedef struct {
23 double lo;
24 double hi;
25 int neg;
27 long long first_val;
28 long first_pixel;
29 long step_pixel;
31 int five_exponent;
32 int two_exponent;
33 double expm;
35 int init;
36 int pixels;
37 int spacing;
38 int massaged; // set if range had to be adjusted to avoid underflows
39 } _sv_scalespace_t;
41 extern double _sv_scalespace_scaledel(_sv_scalespace_t *from, _sv_scalespace_t *to);
42 extern long _sv_scalespace_scalenum(_sv_scalespace_t *from, _sv_scalespace_t *to);
43 extern long _sv_scalespace_scaleden(_sv_scalespace_t *from, _sv_scalespace_t *to);
44 extern long _sv_scalespace_scaleoff(_sv_scalespace_t *from, _sv_scalespace_t *to);
45 extern long _sv_scalespace_scalebin(_sv_scalespace_t *from, _sv_scalespace_t *to);
46 extern double _sv_scalespace_value(_sv_scalespace_t *s, double pixel);
47 extern double _sv_scalespace_pixel(_sv_scalespace_t *s, double val);
48 extern int _sv_scalespace_mark(_sv_scalespace_t *s, int num);
49 extern double _sv_scalespace_label(_sv_scalespace_t *s, int num, char *buffer);
50 extern _sv_scalespace_t _sv_scalespace_linear (double lowpoint, double highpoint, int pixels, int max_spacing);
51 extern void _sv_scalespace_double(_sv_scalespace_t *s);
52 extern int _sv_scalespace_decimal_exponent(_sv_scalespace_t *s);