Graphics.h 22 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381
  1. #ifndef _Graphics_h_
  2. #define _Graphics_h_
  3. /* Graphics.h
  4. *
  5. * Copyright (C) 1992-2005,2007-2018 Paul Boersma
  6. *
  7. * This code is free software; you can redistribute it and/or modify
  8. * it under the terms of the GNU General Public License as published by
  9. * the Free Software Foundation; either version 2 of the License, or (at
  10. * your option) any later version.
  11. *
  12. * This code is distributed in the hope that it will be useful, but
  13. * WITHOUT ANY WARRANTY; without even the implied warranty of
  14. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
  15. * See the GNU General Public License for more details.
  16. *
  17. * You should have received a copy of the GNU General Public License
  18. * along with this work. If not, see <http://www.gnu.org/licenses/>.
  19. */
  20. #include "Thing.h"
  21. #include "../kar/longchar.h"
  22. #include "Graphics_enums.h"
  23. typedef struct { double red, green, blue; } Graphics_Colour;
  24. typedef struct { double x1NDC, x2NDC, y1NDC, y2NDC; } Graphics_Viewport;
  25. Thing_declare (GuiDrawingArea);
  26. typedef struct {
  27. unsigned char link, rightToLeft;
  28. short style, size, baseline;
  29. double size_real;
  30. uint32 code;
  31. char32 kar;
  32. Longchar_Info karInfo;
  33. double width;
  34. union { integer integer_; const char *string; void *pointer; } font;
  35. int cell, line, run;
  36. } _Graphics_widechar;
  37. Thing_define (Graphics, Thing) {
  38. /* Device constants. */
  39. bool screen;
  40. /* A boolean for whether we are a graphic screen (which may include a non-PostScript printer. */
  41. bool postScript;
  42. /* A boolean for whether we are a PostScript device. */
  43. bool printer;
  44. /* A boolean for whether we are a printer. */
  45. bool metafile;
  46. /* A boolean for whether we are a high-resolution metafile or clipboard. */
  47. bool yIsZeroAtTheTop;
  48. /* A boolean for whether vertical cooordinates increase from top to bottom (as on most screens, but not PostScript). */
  49. GuiDrawingArea d_drawingArea;
  50. /* Also used as a boolean. */
  51. int resolution;
  52. /* Dots per inch. */
  53. enum kGraphics_resolution resolutionNumber;
  54. integer d_x1DCmin, d_x2DCmax, d_y1DCmin, d_y2DCmax;
  55. /* Maximum dimensions of the output device. */
  56. /* x1DCmin < x2DCmax; y1DCmin < y2DCmax; */
  57. /* The point (x1DCmin, y1DCmin) can be either in the top left */
  58. /* or in the bottom left, depending on the yIsZeroAtTheTop flag. */
  59. /* Device variables. */
  60. integer d_x1DC, d_x2DC, d_y1DC, d_y2DC;
  61. /* Current dimensions of the output device, or: */
  62. /* device coordinates of the viewport rectangle. */
  63. /* x1DCmin <= x1DC < x2DC <= x2DCmax; */
  64. /* y1DCmin <= y1DC < y2DC <= y2DCmax; */
  65. /* Graphics_create_xxxxxx sets these coordinates to */
  66. /* x1DCmin, x2DCmax, y1DCmin, and y2DCmax. */
  67. /* They can be changed by Graphics_setWsViewport. */
  68. double d_x1wNDC, d_x2wNDC, d_y1wNDC, d_y2wNDC;
  69. /* Normalized device coordinates of */
  70. /* the device viewport rectangle. */
  71. /* The point (x1wNDC, y1wNDC) is always in the bottom left. */
  72. /* Graphics_create_xxxxxx sets these coordinates to */
  73. /* 0.0, 1.0, 0.0, and 1.0. */
  74. /* They can be changed by Graphics_setWsWindow. */
  75. double d_x1NDC, d_x2NDC, d_y1NDC, d_y2NDC;
  76. /* Normalized device coordinates of the user output viewport, */
  77. /* which is a part of the device viewport rectangle. */
  78. /* x1wNDC <= x1NDC < x2NDC <= x2wNDC; */
  79. /* y1wNDC <= y1NDC < y2NDC <= y2wNDC; */
  80. /* Graphics_create_xxxxxx sets these coordinates to */
  81. /* 0.0, 1.0, 0.0, and 1.0. */
  82. /* They can be changed by Graphics_setViewport. */
  83. double d_x1WC, d_x2WC, d_y1WC, d_y2WC;
  84. /* World coordinates of the user output viewport rectangle. */
  85. /* They bear a relation to the "real" world, */
  86. /* and are used in the drawing routines. */
  87. /* Graphics_create_xxxxxx sets these coordinates to */
  88. /* 0.0, 1.0, 0.0, and 1.0. */
  89. /* They can be changed by Graphics_setWindow. */
  90. double deltaX, deltaY, scaleX, scaleY;
  91. /* Current coordinate transformation. */
  92. /* Graphics state. */
  93. int lineType;
  94. Graphics_Colour colour;
  95. double lineWidth, arrowSize, speckleSize;
  96. kGraphics_colourScale colourScale;
  97. int horizontalTextAlignment, verticalTextAlignment;
  98. double textRotation, wrapWidth, secondIndent, textX, textY;
  99. kGraphics_font font;
  100. int fontSize, fontStyle;
  101. int percentSignIsItalic, numberSignIsBold, circumflexIsSuperscript, underscoreIsSubscript;
  102. int dollarSignIsCode, atSignIsLink;
  103. bool recording, duringXor;
  104. integer irecord, nrecord;
  105. double *record;
  106. Graphics_Viewport outerViewport; // for Graphics_(un)setInner ()
  107. double horTick, vertTick; // for Graphics_mark(s)XXX ()
  108. double paperWidth, paperHeight;
  109. void v_destroy () noexcept
  110. override;
  111. virtual void v_polyline (integer /* numberOfPoints */, double * /* xyDC */, bool /* close */) { }
  112. virtual void v_fillArea (integer /* numberOfPoints */, double * /* xyDC */) { }
  113. virtual void v_rectangle (double /* x1DC */, double /* x2DC */, double /* y1DC */, double /* y2DC */) { }
  114. virtual void v_fillRectangle (double /* x1DC */, double /* x2DC */, double /* y1DC */, double /* y2DC */) { }
  115. virtual void v_circle (double /* xDC */, double /* yDC */, double /* rDC */) { }
  116. virtual void v_ellipse (double /* x1DC */, double /* x2DC */, double /* y1DC */, double /* y2DC */) { }
  117. virtual void v_arc (double /* xDC */, double /* yDC */, double /* rDC */, double /* fromAngle */, double /* toAngle */) { }
  118. virtual void v_fillCircle (double /* xDC */, double /* yDC */, double /* rDC */) { }
  119. virtual void v_fillEllipse (double /* x1DC */, double /* x2DC */, double /* y1DC */, double /* y2DC */) { }
  120. virtual void v_button (double a_x1DC, double a_x2DC, double a_y1DC, double a_y2DC)
  121. {
  122. v_rectangle (a_x1DC, a_x2DC, a_y1DC, a_y2DC); // the simplest implementation
  123. }
  124. virtual void v_roundedRectangle (double x1DC, double x2DC, double y1DC, double y2DC, double r);
  125. virtual void v_fillRoundedRectangle (double x1DC, double x2DC, double y1DC, double y2DC, double r);
  126. virtual void v_arrowHead (double xDC, double yDC, double angle);
  127. virtual bool v_mouseStillDown () { return false; }
  128. virtual void v_getMouseLocation (double *xWC, double *yWC) { *xWC = *yWC = undefined; }
  129. virtual void v_flushWs () { }
  130. virtual void v_clearWs () { }
  131. virtual void v_updateWs () { }
  132. };
  133. autoGraphics Graphics_create (int resolution);
  134. autoGraphics Graphics_create_postscriptjob (MelderFile file, int resolution, kGraphicsPostscript_spots spots,
  135. kGraphicsPostscript_paperSize paperSize, kGraphicsPostscript_orientation rotation, double magnification);
  136. autoGraphics Graphics_create_epsfile (MelderFile file, int resolution, enum kGraphicsPostscript_spots spots,
  137. double xmin, double xmax, double ymin, double ymax, bool includeFonts, bool useSilipaPS);
  138. autoGraphics Graphics_create_pdffile (MelderFile file, int resolution,
  139. double x1inches, double x2inches, double y1inches, double y2inches);
  140. autoGraphics Graphics_create_pdf (void *context, int resolution,
  141. double x1inches, double x2inches, double y1inches, double y2inches);
  142. autoGraphics Graphics_create_pngfile (MelderFile file, int resolution,
  143. double x1inches, double x2inches, double y1inches, double y2inches);
  144. autoGraphics Graphics_create_postscriptprinter (void);
  145. autoGraphics Graphics_create_screenPrinter (void *display, void *window);
  146. autoGraphics Graphics_create_screen (void *display, void *window, int resolution);
  147. autoGraphics Graphics_create_xmdrawingarea (GuiDrawingArea drawingArea);
  148. int Graphics_getResolution (Graphics me);
  149. void Graphics_setWsViewport (Graphics me, integer x1DC, integer x2DC, integer y1DC, integer y2DC);
  150. void Graphics_resetWsViewport (Graphics me, integer x1DC, integer x2DC, integer y1DC, integer y2DC);
  151. void Graphics_setWsWindow (Graphics me, double x1NDC, double x2NDC, double y1NDC, double y2NDC);
  152. void Graphics_inqWsViewport (Graphics me, integer *x1DC, integer *x2DC, integer *y1DC, integer *y2DC);
  153. void Graphics_inqWsWindow (Graphics me, double *x1NDC, double *x2NDC, double *y1NDC, double *y2NDC);
  154. void Graphics_clearWs (Graphics me);
  155. void Graphics_flushWs (Graphics me);
  156. void Graphics_updateWs (Graphics me);
  157. void Graphics_beginMovieFrame (Graphics me, Graphics_Colour *colour);
  158. void Graphics_endMovieFrame (Graphics me, double frameDuration);
  159. void Graphics_DCtoWC (Graphics me, integer xDC, integer yDC, double *xWC, double *yWC);
  160. void Graphics_WCtoDC (Graphics me, double xWC, double yWC, integer *xDC, integer *yDC);
  161. void Graphics_setViewport (Graphics me, double x1NDC, double x2NDC, double y1NDC, double y2NDC);
  162. Graphics_Viewport Graphics_insetViewport (Graphics me, double x1rel, double x2rel, double y1rel, double y2rel);
  163. void Graphics_resetViewport (Graphics me, Graphics_Viewport viewport);
  164. void Graphics_setWindow (Graphics me, double x1, double x2, double y1, double y2);
  165. void Graphics_polyline (Graphics me, integer numberOfPoints, double *x, double *y);
  166. void Graphics_polyline_closed (Graphics me, integer numberOfPoints, double *x, double *y);
  167. void Graphics_text (Graphics me, double xWC, double yWC, conststring32 txt);
  168. template <typename... Args>
  169. void Graphics_text (Graphics me, double xWC, double yWC, const MelderArg& first, Args... rest) {
  170. Graphics_text (me, xWC, yWC, Melder_cat (first, rest...));
  171. }
  172. void Graphics_textRect (Graphics me, double x1, double x2, double y1, double y2, conststring32 text /* cattable */);
  173. double Graphics_textWidth (Graphics me, conststring32 text /* cattable */);
  174. double Graphics_textWidth_ps (Graphics me, conststring32 text /* cattable */, bool useSilipaPS);
  175. double Graphics_textWidth_ps_mm (Graphics me, conststring32 text /* cattable */, bool useSilipaPS);
  176. void Graphics_fillArea (Graphics me, integer numberOfPoints, double *x, double *y);
  177. void Graphics_cellArray (Graphics me, double **z, integer ix1, integer ix2, double x1, double x2,
  178. integer iy1, integer iy2, double y1, double y2, double minimum, double maximum);
  179. void Graphics_cellArray_colour (Graphics me, double_rgbt **z, integer ix1, integer ix2, double x1, double x2,
  180. integer iy1, integer iy2, double y1, double y2, double minimum, double maximum);
  181. void Graphics_cellArray8 (Graphics me, unsigned char **z, integer ix1, integer ix2, double x1, double x2,
  182. integer iy1, integer iy2, double y1, double y2, unsigned char minimum, unsigned char maximum);
  183. void Graphics_image (Graphics me, double **z, integer ix1, integer ix2, double x1, double x2,
  184. integer iy1, integer iy2, double y1, double y2, double minimum, double maximum);
  185. void Graphics_image_colour (Graphics me, double_rgbt **z, integer ix1, integer ix2, double x1, double x2,
  186. integer iy1, integer iy2, double y1, double y2, double minimum, double maximum);
  187. void Graphics_image8 (Graphics me, unsigned char **z, integer ix1, integer ix2, double x1, double x2,
  188. integer iy1, integer iy2, double y1, double y2, uint8 minimum, uint8 maximum);
  189. void Graphics_imageFromFile (Graphics me, conststring32 relativeFileName, double x1, double x2, double y1, double y2);
  190. void Graphics_line (Graphics me, double x1, double y1, double x2, double y2);
  191. void Graphics_rectangle (Graphics me, double x1, double x2, double y1, double y2);
  192. void Graphics_fillRectangle (Graphics me, double x1, double x2, double y1, double y2);
  193. void Graphics_roundedRectangle (Graphics me, double x1, double x2, double y1, double y2, double r_mm);
  194. void Graphics_fillRoundedRectangle (Graphics me, double x1, double x2, double y1, double y2, double r_mm);
  195. void Graphics_function (Graphics me, double y [], integer ix1, integer ix2, double x1, double x2); // y [ix1..ix2]
  196. void Graphics_function16 (Graphics me, int16 y [], int stagger, integer ix1, integer ix2, double x1, double x2); // y [ix1..ix2] or y [ix1*2..ix2*2]
  197. void Graphics_circle (Graphics me, double x, double y, double r);
  198. void Graphics_fillCircle (Graphics me, double x, double y, double r);
  199. void Graphics_circle_mm (Graphics me, double x, double y, double d);
  200. void Graphics_fillCircle_mm (Graphics me, double x, double y, double d);
  201. void Graphics_speckle (Graphics me, double x, double y);
  202. void Graphics_rectangle_mm (Graphics me, double x, double y, double horizontalSide_mm, double verticalSide_mm);
  203. void Graphics_fillRectangle_mm (Graphics me, double x, double y, double horizontalSide_mm, double verticalSide_mm);
  204. void Graphics_arc (Graphics me, double x, double y, double r, double fromAngle, double toAngle);
  205. void Graphics_fillArc (Graphics me, double x, double y, double r, double fromAngle, double toAngle);
  206. void Graphics_ellipse (Graphics me, double x1, double x2, double y1, double y2);
  207. void Graphics_fillEllipse (Graphics me, double x1, double x2, double y1, double y2);
  208. void Graphics_arrow (Graphics me, double x1, double y1, double x2, double y2);
  209. void Graphics_doubleArrow (Graphics me, double x1, double y1, double x2, double y2);
  210. void Graphics_arcArrow (Graphics me, double x, double y, double r, double fromAngle, double toAngle, int arrowAtStart, int arrowAtEnd);
  211. void Graphics_mark (Graphics me, double x, double y, double size_mm, conststring32 markString /* cattable */);
  212. void Graphics_button (Graphics me, double x1, double x2, double y1, double y2);
  213. void Graphics_innerRectangle (Graphics me, double x1, double x2, double y1, double y2);
  214. extern Graphics_Colour Graphics_BLACK, Graphics_WHITE, Graphics_RED, Graphics_GREEN, Graphics_BLUE,
  215. Graphics_CYAN, Graphics_MAGENTA, Graphics_YELLOW, Graphics_MAROON, Graphics_LIME, Graphics_NAVY, Graphics_TEAL,
  216. Graphics_PURPLE, Graphics_OLIVE, Graphics_PINK, Graphics_SILVER, Graphics_GREY, Graphics_WINDOW_BACKGROUND_COLOUR;
  217. conststring32 Graphics_Colour_name (Graphics_Colour colour);
  218. static inline bool Graphics_Colour_equal (Graphics_Colour colour1, Graphics_Colour colour2) {
  219. return colour1. red == colour2. red && colour1. green == colour2. green && colour1. blue == colour2. blue;
  220. }
  221. Graphics_Colour Graphics_cyclingBackgroundColour (integer category);
  222. Graphics_Colour Graphics_cyclingTextColour (integer category);
  223. void Graphics_setColour (Graphics me, Graphics_Colour colour);
  224. void Graphics_setGrey (Graphics me, double grey);
  225. void Graphics_xorOn (Graphics me, Graphics_Colour colour);
  226. void Graphics_xorOff (Graphics me);
  227. void Graphics_highlight (Graphics me, double x1, double x2, double y1, double y2);
  228. void Graphics_unhighlight (Graphics me, double x1, double x2, double y1, double y2);
  229. void Graphics_highlight2 (Graphics me, double x1, double x2, double y1, double y2,
  230. double innerX1, double innerX2, double innerY1, double innerY2);
  231. void Graphics_unhighlight2 (Graphics me, double x1, double x2, double y1, double y2,
  232. double innerX1, double innerX2, double innerY1, double innerY2);
  233. #define Graphics_NOCHANGE -1
  234. #define Graphics_LEFT kGraphics_horizontalAlignment::LEFT
  235. #define Graphics_CENTRE kGraphics_horizontalAlignment::CENTRE
  236. #define Graphics_RIGHT kGraphics_horizontalAlignment::RIGHT
  237. #define Graphics_BOTTOM 0
  238. #define Graphics_HALF 1
  239. #define Graphics_TOP 2
  240. #define Graphics_BASELINE 3
  241. void Graphics_setTextAlignment (Graphics me, enum kGraphics_horizontalAlignment horizontal, int vertical);
  242. void Graphics_setFont (Graphics me, enum kGraphics_font font);
  243. void Graphics_setFontSize (Graphics me, int height);
  244. #define Graphics_NORMAL 0
  245. #define Graphics_BOLD 1
  246. #define Graphics_ITALIC 2
  247. #define Graphics_BOLD_ITALIC 3
  248. #define Graphics_CODE 4
  249. void Graphics_setFontStyle (Graphics me, int style);
  250. void Graphics_setItalic (Graphics me, bool onoff);
  251. void Graphics_setBold (Graphics me, bool onoff);
  252. void Graphics_setCode (Graphics me, bool onoff);
  253. void Graphics_setTextRotation (Graphics me, double angle);
  254. void Graphics_setTextRotation_vector (Graphics me, double dx, double dy);
  255. void Graphics_setWrapWidth (Graphics me, double wrapWidth);
  256. void Graphics_setSecondIndent (Graphics me, double indent);
  257. double Graphics_inqTextX (Graphics me);
  258. double Graphics_inqTextY (Graphics me);
  259. typedef struct { double x1, x2, y1, y2; char32 *name; } Graphics_Link;
  260. int Graphics_getLinks (Graphics_Link **plinks);
  261. void Graphics_setNumberSignIsBold (Graphics me, bool isBold);
  262. void Graphics_setPercentSignIsItalic (Graphics me, bool isItalic);
  263. void Graphics_setCircumflexIsSuperscript (Graphics me, bool isSuperscript);
  264. void Graphics_setUnderscoreIsSubscript (Graphics me, bool isSubscript);
  265. void Graphics_setDollarSignIsCode (Graphics me, bool isCode);
  266. void Graphics_setAtSignIsLink (Graphics me, bool isLink);
  267. #define Graphics_DRAWN 0
  268. #define Graphics_DOTTED 1
  269. #define Graphics_DASHED 2
  270. #define Graphics_DASHED_DOTTED 3
  271. void Graphics_setLineType (Graphics me, int lineType);
  272. void Graphics_setLineWidth (Graphics me, double lineWidth);
  273. void Graphics_setArrowSize (Graphics me, double arrowSize);
  274. void Graphics_setSpeckleSize (Graphics me, double speckleSize);
  275. void Graphics_setColourScale (Graphics me, enum kGraphics_colourScale colourScale);
  276. void Graphics_inqViewport (Graphics me, double *x1NDC, double *x2NDC, double *y1NDC, double *y2NDC);
  277. void Graphics_inqWindow (Graphics me, double *x1WC, double *x2WC, double *y1WC, double *y2WC);
  278. enum kGraphics_font Graphics_inqFont (Graphics me);
  279. int Graphics_inqFontSize (Graphics me);
  280. int Graphics_inqFontStyle (Graphics me);
  281. int Graphics_inqLineType (Graphics me);
  282. double Graphics_inqLineWidth (Graphics me);
  283. double Graphics_inqArrowSize (Graphics me);
  284. double Graphics_inqSpeckleSize (Graphics me);
  285. Graphics_Colour Graphics_inqColour (Graphics me);
  286. enum kGraphics_colourScale Graphics_inqColourScale (Graphics me);
  287. void Graphics_contour (Graphics me, double **z,
  288. integer ix1, integer ix2, double x1WC, double x2WC, integer iy1, integer iy2, double y1WC, double y2WC, double height);
  289. void Graphics_altitude (Graphics me, double **z,
  290. integer ix1, integer ix2, double x1, double x2, integer iy1, integer iy2, double y1, double y2, int numberOfBorders, double borders []);
  291. void Graphics_grey (Graphics me, double **z,
  292. integer ix1, integer ix2, double x1, double x2, integer iy1, integer iy2, double y1, double y2, int numberOfBorders, double borders []);
  293. #define Graphics_gray Graphics_grey
  294. void Graphics_surface (Graphics me, double **z, integer ix1, integer ix2, double x1, double x2,
  295. integer iy1, integer iy2, double y1, double y2, double minimum, double maximum, double elevation, double azimuth);
  296. void Graphics_setInner (Graphics me);
  297. void Graphics_unsetInner (Graphics me);
  298. void Graphics_drawInnerBox (Graphics me);
  299. void Graphics_textLeft (Graphics me, bool farr, conststring32 text /* cattable */);
  300. void Graphics_textRight (Graphics me, bool farr, conststring32 text /* cattable */);
  301. void Graphics_textBottom (Graphics me, bool farr, conststring32 text /* cattable */);
  302. void Graphics_textTop (Graphics me, bool farr, conststring32 text /* cattable */);
  303. void Graphics_marksLeft (Graphics me, int numberOfMarks, bool haveNumbers, bool haveTicks, bool haveDottedLines);
  304. void Graphics_marksRight (Graphics me, int numberOfMarks, bool haveNumbers, bool haveTicks, bool haveDottedLines);
  305. void Graphics_marksBottom (Graphics me, int numberOfMarks, bool haveNumbers, bool haveTicks, bool haveDottedLines);
  306. void Graphics_marksTop (Graphics me, int numberOfMarks, bool haveNumbers, bool haveTicks, bool haveDottedLines);
  307. void Graphics_marksLeftLogarithmic (Graphics me, int numberOfMarksPerDecade, bool haveNumbers, bool haveTicks, bool haveDottedLines);
  308. void Graphics_marksRightLogarithmic (Graphics me, int numberOfMarksPerDecade, bool haveNumbers, bool haveTicks, bool haveDottedLines);
  309. void Graphics_marksBottomLogarithmic (Graphics me, int numberOfMarksPerDecade, bool haveNumbers, bool haveTicks, bool haveDottedLines);
  310. void Graphics_marksTopLogarithmic (Graphics me, int numberOfMarksPerDecade, bool haveNumbers, bool haveTicks, bool haveDottedLines);
  311. void Graphics_markLeft (Graphics me, double yWC, bool hasNumber, bool hasTick, bool hasDottedLine, conststring32 text /* cattable */);
  312. void Graphics_markRight (Graphics me, double yWC, bool hasNumber, bool hasTick, bool hasDottedLine, conststring32 text /* cattable */);
  313. void Graphics_markBottom (Graphics me, double xWC, bool hasNumber, bool hasTick, bool hasDottedLine, conststring32 text /* cattable */);
  314. void Graphics_markTop (Graphics me, double xWC, bool hasNumber, bool hasTick, bool hasDottedLine, conststring32 text /* cattable */);
  315. void Graphics_markLeftLogarithmic (Graphics me, double y, bool hasNumber, bool hasTick, bool hasDottedLine, conststring32 text /* cattable */); // y > 0
  316. void Graphics_markRightLogarithmic (Graphics me, double y, bool hasNumber, bool hasTick, bool hasDottedLine, conststring32 text /* cattable */);
  317. void Graphics_markBottomLogarithmic (Graphics me, double x, bool hasNumber, bool hasTick, bool hasDottedLine, conststring32 text /* cattable */);
  318. void Graphics_markTopLogarithmic (Graphics me, double x, bool hasNumber, bool hasTick, bool hasDottedLine, conststring32 text /* cattable */);
  319. void Graphics_marksLeftEvery (Graphics me, double units, double distance, bool haveNumbers, bool haveTicks, bool haveDottedLines);
  320. void Graphics_marksRightEvery (Graphics me, double units, double distance, bool haveNumbers, bool haveTicks, bool haveDottedLines);
  321. void Graphics_marksBottomEvery (Graphics me, double units, double distance, bool haveNumbers, bool haveTicks, bool haveDottedLines);
  322. void Graphics_marksTopEvery (Graphics me, double units, double distance, bool haveNumbers, bool haveTicks, bool haveDottedLines);
  323. void *Graphics_x_getCR (Graphics me);
  324. void Graphics_x_setCR (Graphics me, void *cr);
  325. void *Graphics_x_getGC (Graphics me);
  326. bool Graphics_startRecording (Graphics me);
  327. bool Graphics_stopRecording (Graphics me);
  328. void Graphics_clearRecording (Graphics me);
  329. void Graphics_play (Graphics from, Graphics to);
  330. void Graphics_writeRecordings (Graphics me, FILE *f);
  331. void Graphics_readRecordings (Graphics me, FILE *f);
  332. void Graphics_markGroup (Graphics me);
  333. void Graphics_undoGroup (Graphics me);
  334. double Graphics_dxMMtoWC (Graphics me, double dx_mm);
  335. double Graphics_dyMMtoWC (Graphics me, double dy_mm);
  336. double Graphics_distanceWCtoMM (Graphics me, double x1WC, double y1WC, double x2WC, double y2WC);
  337. double Graphics_dxWCtoMM (Graphics me, double dxWC);
  338. double Graphics_dyWCtoMM (Graphics me, double dyWC);
  339. bool Graphics_mouseStillDown (Graphics me);
  340. void Graphics_waitMouseUp (Graphics me);
  341. void Graphics_getMouseLocation (Graphics me, double *xWC, double *yWC);
  342. void Graphics_nextSheetOfPaper (Graphics me);
  343. void Graphics_prefs ();
  344. /* End of file Graphics.h */
  345. #endif