| 1 | /* |
| 2 | Qxw is a program to help construct and publish crosswords. |
| 3 | |
| 4 | Copyright 2011-2020 Mark Owen; Windows port by Peter Flippant |
| 5 | http://www.quinapalus.com |
| 6 | E-mail: [email protected] |
| 7 | |
| 8 | This file is part of Qxw. |
| 9 | |
| 10 | Qxw is free software: you can redistribute it and/or modify |
| 11 | it under the terms of version 2 of the GNU General Public License |
| 12 | as published by the Free Software Foundation. |
| 13 | |
| 14 | Qxw is distributed in the hope that it will be useful, |
| 15 | but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 16 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 17 | GNU General Public License for more details. |
| 18 | |
| 19 | You should have received a copy of the GNU General Public License |
| 20 | along with Qxw. If not, see <http://www.gnu.org/licenses/> or |
| 21 | write to the Free Software Foundation, Inc., 51 Franklin Street, |
| 22 | Fifth Floor, Boston, MA 02110-1301, USA. |
| 23 | */ |
| 24 | |
| 25 | |
| 26 | |
| 27 | |
| 28 | |
| 29 | #ifndef __DRAW_H__ |
| 30 | #define __DRAW_H__ |
| 31 | |
| 32 | #include <cairo.h> |
| 33 | |
| 34 | extern double gscale; |
| 35 | |
| 36 | // extern void moveto(cairo_t*cc,double x,double y); |
| 37 | // extern void lineto(cairo_t*cc,double x,double y); |
| 38 | // extern void rmoveto(cairo_t*cc,double x,double y); |
| 39 | // extern void rlineto(cairo_t*cc,double x,double y); |
| 40 | // extern void setlinewidth(cairo_t*cc,double w); |
| 41 | // extern void setlinecap(cairo_t*cc,int c); |
| 42 | // extern void closepath(cairo_t*cc); |
| 43 | // extern void fill(cairo_t*cc); |
| 44 | // extern void stroke(cairo_t*cc); |
| 45 | // extern void strokepreserve(cairo_t*cc); |
| 46 | // extern void clip(cairo_t*cc); |
| 47 | extern void gsave(cairo_t*cc); |
| 48 | extern void grestore(cairo_t*cc); |
| 49 | // extern void setrgbcolor(cairo_t*cc,double r,double g, double b); |
| 50 | // extern void setrgbacolor(cairo_t*cc,double r,double g, double b,double a); |
| 51 | // extern void setfontstyle(cairo_t*cc,int fs); |
| 52 | // extern void setfontsize(cairo_t*cc,double h); |
| 53 | |
| 54 | // extern void arc(cairo_t*cc,double x,double y,double r,double t0,double t1); |
| 55 | // extern void arcn(cairo_t*cc,double x,double y,double r,double t0,double t1); |
| 56 | // extern void setrgbcolor24(cairo_t*cc,int c); |
| 57 | extern void ltext(cairo_t*cc,char*s,double h,int fs); |
| 58 | extern void ctext(cairo_t*cc,char*s,double x,double y,double h,int fs,int ocm); |
| 59 | |
| 60 | extern void ansform(char*t0,int t0l,int ln,int wlen,unsigned int dmask); |
| 61 | |
| 62 | extern int bawdpx; |
| 63 | // extern int hbawdpx; |
| 64 | |
| 65 | extern void draw_init(); |
| 66 | extern void draw_finit(); |
| 67 | extern void draw_printversions(); |
| 68 | extern void repaint(cairo_t*cr); |
| 69 | |
| 70 | // extern void refreshsq(int x,int y); |
| 71 | extern void refreshsqlist(int l,int*gx,int*gy); |
| 72 | extern void refreshsqmg(int x,int y); |
| 73 | extern void refreshsel(); |
| 74 | extern void refreshcur(); |
| 75 | extern void refreshnum(); |
| 76 | extern void refreshhin(); |
| 77 | extern void refreshall(); |
| 78 | |
| 79 | extern int dawidth(void); |
| 80 | extern int daheight(void); |
| 81 | |
| 82 | extern void a_exportg(char*fn,int f0,int f1); |
| 83 | extern void a_exportgh(int f,char*url); |
| 84 | extern void a_exporta(int f); |
| 85 | extern void a_exporthp(int f,int f0,int f1); |
| 86 | extern void a_exportccwxml(char*fn); |
| 87 | |
| 88 | extern void edgecoords(double*x0,double*y0,double*x1,double*y1,int x,int y,int d); |
| 89 | // extern void getsqbbox(double*x0,double*y0,double*x1,double*y1,int x,int y); |
| 90 | // extern void getmgbbox(double*x0,double*y0,double*x1,double*y1,int x,int y); |
| 91 | extern void mgcentre(double*u,double*v,int x,int y,int d,int l); |
| 92 | |
| 93 | extern char*dname[NGTYPE][MAXNDIR]; |
| 94 | |
| 95 | #endif |