PLplot: plplotP.h Source File

PLplot 5.15.0

plplotP.h
Go to the documentation of this file.
1 // Internal (private) macros and prototypes for the PLplot package. This
2 // header file must be included before all others, including system header
3 // files. This file is typically needed when including driver specific
4 // header files (e.g. pltkd.h).
5 //
6 // Copyright (C) 1993, 1994, 1995 by
7 // Maurice J. LeBrun, Geoff Furnish, Tony Richardson.
8 //
9 // Copyright (C) 2004 Rafael Laboissiere
10 // Copyright (C) 2004 Joao Cardoso
11 // Copyright (C) 2004 Andrew Roach
12 // Copyright (C) 2006 Andrew Ross
13 // Copyright (C) 2006 Hazen Babcock
14 // Copyright (C) 2001-2015 Alan W. Irwin
15 //
16 //
17 // This file is part of PLplot.
18 //
19 // PLplot is free software; you can redistribute it and/or modify
20 // it under the terms of the GNU Library General Public License as published
21 // by the Free Software Foundation; either version 2 of the License, or
22 // (at your option) any later version.
23 //
24 // PLplot is distributed in the hope that it will be useful,
25 // but WITHOUT ANY WARRANTY; without even the implied warranty of
26 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
27 // GNU Library General Public License for more details.
28 //
29 // You should have received a copy of the GNU Library General Public License
30 // along with PLplot; if not, write to the Free Software
31 // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
32 //
33 //
34 //
35
36 #ifndef __PLPLOTP_H__
37 #define __PLPLOTP_H__
38
39 //--------------------------------------------------------------------------
40 // Select environment. Must be done before anything else.
41 //
42 // Basically we want the widest range of system services that are available.
43 // Fortunately on many systems, that is the default. To get "everything",
44 // one of the following must be defined, as appropriate:
45 //
46 // _GNU_SOURCE on Linux (default)
47 // _OSF_SOURCE on OSF1 (default)
48 // _HPUX_SOURCE on HP (not default)
49 // _ALL_SOURCE on AIX (no idea)
50 //
51 // To see where these are set, do the following:
52 //
53 // cd /usr/include; grep SOURCE *.h | fgrep 'define '
54 //
55 // and the file containing lots of these is the one you want (features.h on
56 // Linux, standards.h on OSF1, etc). Follow the logic to see what needs to be
57 // defined to get "everything", i.e. POSIX.*, XOPEN, etc.
58 //
59 // Note that for specific functionality, we test using autoconf. Still it's
60 // best to stick to ANSI C, POSIX.1, and POSIX.2, in that order, for maximum
61 // portability.
62 //--------------------------------------------------------------------------
63
64 // HPUX - if this is no longer needed, please remove it
65 #ifdef _HPUX
66 #define _HPUX_SOURCE
67 #endif
68
69 // A/IX - if this is no longer needed, please remove it
70 #ifdef _AIX
71 #define _ALL_SOURCE
72 #endif
73
74 // Add others here as needed.
75
76 //--------------------------------------------------------------------------
77 // Configuration settings
78 //
79 // Some of the macros set during configuration are described here.
80 //
81 // If HAVE_TERMIOS_H is set, we employ POSIX.1 tty terminal I/O.
82 //
83 // If STDC_HEADERS is defined, the system's libc is ANSI-compliant.
84 // ANSI libc calls are used for: (a) setting up handlers to be called
85 // before program exit (via the "atexit" call), and (b) for seek
86 // operations. Again, the code is usable without these. An ANSI libc
87 // should be available, given the requirement of an ANSI compiler. Some
88 // reasons why not: (a) the vendor didn't supply a complete ANSI
89 // environment, or (b) the ANSI libc calls are buggy, or (c) you ported
90 // gcc to your system but not glibc (for whatever reason). Note: without
91 // an ANSI C lib, if you ^C out of a program using one of the PLplot tek
92 // drivers, your terminal may be left in a strange state.
93 //--------------------------------------------------------------------------
94
95 #include "plConfig.h"
96 #ifdef caddr_t
97 #undef caddr_t
98 #ifndef __USE_BSD
99 typedef char * caddr_t;
100 #endif
101 #endif
102
103 // System headers
104
105 #include <ctype.h>
106 #include <math.h>
107 #include <string.h>
108 #include <limits.h>
109 #include <float.h>
110 #ifdef PL_HAVE_UNISTD_H
111 #include <unistd.h>
112 #endif
113
114 #include <locale.h>
115
116 // (AM) Define M_PI if the platform does not include it
117 // (MSVC for instance)
118 #if !defined ( M_PI )
119 #define M_PI 3.14159265358979323846
120 #endif
121
122 //
123 // Macros for file positioning. I tried switching to f[sg]etpos() because I
124 // like the semantics better, but ran into the problem that fpos_t is not
125 // always a base type (it may be a struct). This is a problem because the
126 // metafile driver needs to write relative offsets into the file itself. So
127 // instead we use f{seek,tell} at a low level but keep the f[sg]etpos
128 // semantics using these macros.
129 //
130
131 #ifdef STDC_FPOS_T
132 #undef STDC_FPOS_T
133 #endif
134
135 #ifdef STDC_FPOS_T
136 #define FPOS_T fpos_t
137 #define pl_fsetpos( a, b ) fsetpos( a, b )
138 #define pl_fgetpos( a, b ) fgetpos( a, b )
139
140 #else
141 #define FPOS_T long
142 #define pl_fsetpos( a, b ) fseek( a, *b, 0 )
143 #define pl_fgetpos( a, b ) ( -1L == ( *b = ftell( a ) ) )
144 #endif
145
146 #include "pldll.h"
147
148 // Include all externally-visible definitions and prototypes
149 // plplot.h also includes some handy system header files
150
151 #include "plplot.h"
152
153 // plstream definition
154
155 #include "plstrm.h"
156
157 // If not including this file from inside of plcore.h, declare plsc
158
159 #ifndef __PLCORE_H__
160 #ifdef __cplusplus
161 extern "C" {
162 #endif
163 // extern PLStream PLDLLIMPORT *plsc;
164 extern PLDLLIMPEXP_DATA( PLStream * ) plsc;
165 #ifdef __cplusplus
166 }
167 #endif
168 #include "pldebug.h"
169 #endif
170
171 //--------------------------------------------------------------------------
172 // Utility macros
173 //--------------------------------------------------------------------------
174
175 #ifndef TRUE
176 #define TRUE 1
177 #define FALSE 0
178 #endif
179
180 // Used to help ensure everything malloc'ed gets freed
181
182 #define free_mem( a ) \
183 if ( a != NULL ) { free( (void *) a ); a = NULL; }
184
185 // Allows multi-argument setup calls to not affect selected arguments
186
187 #define plsetvar( a, b ) \
188 if ( b != PL_NOTSET ) a = b;
189
190 // Lots of cool math macros
191
192 #ifndef MAX
193 #define MAX( a, b ) ( ( ( a ) > ( b ) ) ? ( a ) : ( b ) )
194 #endif
195 #ifndef MIN
196 #define MIN( a, b ) ( ( ( a ) < ( b ) ) ? ( a ) : ( b ) )
197 #endif
198 #ifndef ABS
199 #define ABS( a ) ( ( a ) < 0 ? -( a ) : ( a ) )
200 #endif
201 #ifndef ROUND
202 #define ROUND( a ) (PLINT) ( ( a ) < 0. ? ( ( a ) - .5 ) : ( ( a ) + .5 ) )
203 #endif
204 #ifndef BETW
205 #define BETW( ix, ia, ib ) ( ( ( ix ) <= ( ia ) && ( ix ) >= ( ib ) ) || ( ( ix ) >= ( ia ) && ( ix ) <= ( ib ) ) )
206 #endif
207 #ifndef SSQR
208 #define SSQR( a, b ) sqrt( ( a ) * ( a ) + ( b ) * ( b ) )
209 #endif
210 #ifndef SIGN
211 #define SIGN( a ) ( ( a ) < 0 ? -1 : 1 )
212 #endif
213 #ifndef TRANSFORM
214 #define TRANSFORM( x, y, xnew, ynew ) if ( plsc->coordinate_transform ) { plsc->coordinate_transform( ( x ), ( y ), ( xnew ), ( ynew ), plsc->coordinate_transform_data ); } else { *xnew = x; *ynew = y; }
215 #endif
216
217 // A coordinate value that should never occur
218
219 #define PL_UNDEFINED -9999999
220
221 // Declarations for save string functions
222
223 #ifdef PL_HAVE_SNPRINTF
224 // In case only _snprintf is declared (as for Visual C++ and
225 // Borland compiler toolset) we redefine the function names
226 #ifdef _PL_HAVE_SNPRINTF
227 #define snprintf _snprintf
228 #define snscanf _snscanf
229 #endif // _PL_HAVE_SNPRINTF
230 #else // !PL_HAVE_SNPRINTF
231 // declare dummy functions which just call the unsafe
232 // functions ignoring the size of the string
233 int plsnprintf( char *buffer, int n, PLCHAR_VECTOR format, ... );
234 int plsnscanf( PLCHAR_VECTOR buffer, int n, PLCHAR_VECTOR format, ... );
235 #define snprintf plsnprintf
236 #define snscanf plsnscanf
237 #endif // PL_HAVE_SNPRINTF
238
239 //--------------------------------------------------------------------------
240 // Add in missing isnan / isinf functions on some platforms
241 //--------------------------------------------------------------------------
242
243 #if defined ( PL__HAVE_ISNAN )
244 # define isnan _isnan
245 # if defined ( _MSC_VER )
246 # include <float.h>
247 # endif
248 #endif
249 #if defined ( PL__HAVE_ISINF )
250 # define isinf _isinf
251 #endif
252 #if defined ( PL_HAVE_FINITE )
253 # define isfinite finite
254 #endif
255 #if defined ( PL__HAVE_FINITE )
256 # define isfinite _finite
257 #endif
258
259 // Note these replacements follow the old BSD convention and not
260 // C99. In particular isinf does not distinguish +/- inf.
261 #if !defined ( PL_HAVE_ISNAN )
262 # define isnan( x ) ( ( x ) != ( x ) )
263 #endif
264 #if !defined ( PL_HAVE_ISINF )
265 # define isinf( x ) ( !isnan( x ) && isnan( x - x ) )
266 #endif
267 #if !defined ( PL_HAVE_ISFINITE )
268 # define isfinite( x ) ( !isnan( x - x ) )
269 #endif
270
271 // Check if C99 HUGE_VAL macro is available - if not then
272 // define a replacement
273 #ifndef HUGE_VAL
274 #define HUGE_VAL ( 1.0 / 0.0 )
275 #endif
276
277 //--------------------------------------------------------------------------
278 // PLPLOT control macros
279 //--------------------------------------------------------------------------
280
281 // Some constants
282
283 #define PL_MAXPOLY 256 // Max segments in polyline or polygon
284 #define PL_NSTREAMS 100 // Max number of concurrent streams.
285 #define PL_RGB_COLOR -1 // A hack
286
287 #define TEXT_MODE 0
288 #define GRAPHICS_MODE 1
289 #ifndef PI
290 #define PI 3.1415926535897932384
291 #endif
292
293 // These define the virtual coordinate system used by the metafile driver.
294 // Others are free to use it, or some variation, or define their own.
295
296 // Note desktop monitors of reasonable quality typically have 0.25 mm spacing
297 // between dots which corresponds to 4.0 dots per mm. The parameters here
298 // roughly correspond to a 14" monitor at 1024x768 resolution, which should
299 // work fine at other sizes/resolutions. The number of virtual dots per mm is
300 // scaled by a factor of 32, with pixels scaled accordingly. The customary
301 // x/y ratio of 4:3 is used.
302 //
303
304 #define PIXELS_X 32768 // Number of virtual pixels in x
305 #define PIXELS_Y 24576 // Number of virtual pixels in x
306 #define DPMM 4. // dots per mm
307 #define VDPMM ( DPMM * 32 ) // virtual dots per mm
308 #define LPAGE_X ( PIXELS_X / VDPMM ) // virtual page length in x in mm (256)
309 #define LPAGE_Y ( PIXELS_Y / VDPMM ) // virtual page length in y in mm (192)
310
311 // Constants that help to define ideal plspage arguments for devices
312
313 #define PLPLOT_MM_PER_INCH 25.4
314 #define PLPLOT_POINTS_PER_INCH 72.
315 #define PLPLOT_WIDTH_A4_MM 297.
316 #define PLPLOT_HEIGHT_A4_MM 210.
317 #define PLPLOT_WIDTH_A5_MM 210.
318 #define PLPLOT_HEIGHT_A5_MM 148.
319
320 // Devices with pixel units for sizes.
321
322 // Adopt this default value as reasonable approximation for typical
323 // LCD monitors, but note that the user can replace this default by
324 // setting plsc->[xy]dpi values (e.g., by using the -dpi command-line
325 // option or by calling plspage with non-zero first two arguments).
326 #define PLPLOT_DEFAULT_PIXELS_PER_INCH 90.
327 // These default pixel dimensions correspond to A5 size if actual
328 // pixels per inch is PLPLOT_DEFAULT_PIXELS_PER_INCH
329 #define PLPLOT_DEFAULT_WIDTH_PIXELS ( (int) ( PLPLOT_WIDTH_A5_MM * PLPLOT_DEFAULT_PIXELS_PER_INCH / PLPLOT_MM_PER_INCH ) )
330 #define PLPLOT_DEFAULT_HEIGHT_PIXELS ( (int) ( PLPLOT_HEIGHT_A5_MM * PLPLOT_DEFAULT_PIXELS_PER_INCH / PLPLOT_MM_PER_INCH ) )
331
332 // Devices with real world units for sizes.
333
334 // N.B. these devices normally use fixed values of units per inch,
335 // i.e., they ignore any attempt by users to set plsc->[xy]dpi values
336 // (e.g., by using the -dpi command-line option or by calling plspage
337 // with non-zero first two arguments).
338
339 // 1. Devices with mm units for sizes.
340 // These default mm dimensions correspond to A4 size.
341 #define PLPLOT_DEFAULT_WIDTH_MM ( (int) ( PLPLOT_WIDTH_A4_MM )
342 #define PLPLOT_DEFAULT_HEIGHT_MM ( (int) ( PLPLOT_HEIGHT_A4_MM )
343
344 // 2. Devices with points (= 1/72 inch) units for sizes.
345 // These default points dimensions correspond to A4 size.
346 #define PLPLOT_DEFAULT_WIDTH_POINTS ( (int) ( PLPLOT_WIDTH_A4_MM * PLPLOT_POINTS_PER_INCH / PLPLOT_MM_PER_INCH ) )
347 #define PLPLOT_DEFAULT_HEIGHT_POINTS ( (int) ( PLPLOT_HEIGHT_A4_MM * PLPLOT_POINTS_PER_INCH / PLPLOT_MM_PER_INCH ) )
348
349 // This defines the first argument of the plRotPhy invocation that is made
350 // in a number of device drivers (e.g., found in ps.c
351 // and pstex.c) to rotate them "permanently" from portrait mode to non-
352 // portrait mode. ORIENTATION of 1 corresponds to seascape mode (90 deg
353 // clockwise rotation from portrait). This is the traditional value
354 // effectively used in all older versions of PLplot. ORIENTATION of 3
355 // corresponds to landscape mode (90 deg *counter*-clockwise rotation from
356 // portrait) which is the new default non-portrait orientation.
357
358 #define ORIENTATION 3
359
360 // Switches for state function call.
361
362 #define PLSTATE_WIDTH 1 // pen width
363 #define PLSTATE_COLOR0 2 // change to color in cmap 0
364 #define PLSTATE_COLOR1 3 // change to color in cmap 1
365 #define PLSTATE_FILL 4 // set area fill to a standard pattern
366 #define PLSTATE_CMAP0 5 // change to cmap 0
367 #define PLSTATE_CMAP1 6 // change to cmap 1
368 #define PLSTATE_CHR 7 // change character height
369 #define PLSTATE_SYM 8 // change symbol size
370 #define PLSTATE_EOFILL 9 // change to even odd fill rule
371
372 // Enum for flagging the render status of PLplot
373 enum { AT_BOP, DRAWING, AT_EOP };
374
375
376 // Bit switches used in the driver interface
377
378 #define PLDI_MAP 0x01
379 #define PLDI_ORI 0x02
380 #define PLDI_PLT 0x04
381 #define PLDI_DEV 0x08
382
383 // Default size for family files, in KB.
384
385 #ifndef PL_FILESIZE_KB
386 #define PL_FILESIZE_KB 1000
387 #endif
388
389 // Font file names.
390
391 #define PLPLOT5_FONTS
392
393 #ifdef PLPLOT5_FONTS
394 #define PL_XFONT "plxtnd5.fnt"
395 #define PL_SFONT "plstnd5.fnt"
396 #else
397 #define PL_XFONT "plxtnd4.fnt"
398 #define PL_SFONT "plstnd4.fnt"
399 #endif
400
401 //--------------------------------------------------------------------------
402 // The following environment variables are defined:
403 //
404 // PLPLOT_BIN # where to find executables
405 // PLPLOT_LIB # where to find library files (fonts, maps, etc)
406 // PLPLOT_TCL # where to find tcl scripts
407 //
408 // PLPLOT_HOME # basename of plplot hierarchy
409 //
410 // search order:
411 // 1) the most specific possible locators, one of
412 // $(PLPLOT_BIN)
413 // $(PLPLOT_LIB)
414 // $(PLPLOT_TCL)
415 // as appropriate
416 //
417 // 2) the current directory
418 //
419 // 3) one of $(PLPLOT_HOME)/bin
420 // $(PLPLOT_HOME)/lib
421 // $(PLPLOT_HOME)/tcl
422 // as appropriate
423 //
424 // 4) as appropriate, the compile-time (Makefile)
425 // BIN_DIR, LIB_DIR, TCL_DIR
426 //
427 // 8 Jun 1994 mj olesen (olesen@weber.me.queensu.ca)
428 //
429 // Other notes:
430 //
431 // In addition to the directories above, the following are also used:
432 //
433 // Lib file search path: PLLIBDEV (see plctrl.c). This is checked last,
434 // and is a system-dependent hardwired location.
435 //
436 // Tcl search path: $HOME/tcl is searched before the install location,
437 // TCL_DIR.
438 //--------------------------------------------------------------------------
439
440 #define PLPLOT_BIN_ENV "PLPLOT_BIN"
441 #define PLPLOT_LIB_ENV "PLPLOT_LIB"
442 #define PLPLOT_TCL_ENV "PLPLOT_TCL"
443 #define PLPLOT_HOME_ENV "PLPLOT_HOME"
444
445 // Maximum size for path strings in the plplot code
446 #define PLPLOT_MAX_PATH 1024
447
448 //
449 // Some stuff that is included (and compiled into) plsym.h
450 // Other modules might want this, so we will "extern" it
451 //
452 //
453
454 #ifndef __PLSYM_H__
455
456 typedef struct
457 {
458 unsigned int Hershey;
459 PLUNICODE Unicode;
460 char Font;
461 } Hershey_to_Unicode_table;
462
463 extern int number_of_entries_in_hershey_to_unicode_table;
464 extern Hershey_to_Unicode_table hershey_to_unicode_lookup_table[];
465
466
467 #endif
468
469 // Greek character translation array (defined in plcore.c)
470 extern const char plP_greek_mnemonic[];
471
472 //--------------------------------------------------------------------------
473 // Function Prototypes
474 //
475 // These typically should not be called directly by the user.
476 //--------------------------------------------------------------------------
477
478 #ifdef __cplusplus
479 extern "C" {
480 #endif
481
482 // Number of elements in the affine vector representation of the affine
483 // transformation matrix.
484 #define NAFFINE 6
485
486 // Returns affine identity matrix
487
488 PLDLLIMPEXP void
489 plP_affine_identity( PLFLT *affine_vector );
490
491 // Translate new coordinate system axes relative to the old.
492
493 PLDLLIMPEXP void
494 plP_affine_translate( PLFLT *affine_vector, PLFLT xtranslate, PLFLT ytranslate );
495
496 // Scale new coordinate system axes relative to the old.
497
498 PLDLLIMPEXP void
499 plP_affine_scale( PLFLT *affine_vector, PLFLT xscale, PLFLT yscale );
500
501 // Rotate new coordinate system axes relative to the old.
502 // angle is in degrees.
503
504 PLDLLIMPEXP void
505 plP_affine_rotate( PLFLT *affine_vector, PLFLT angle );
506
507 // Skew new X coordinate axis relative to the old.
508 // angle is in degrees.
509
510 PLDLLIMPEXP void
511 plP_affine_xskew( PLFLT *affine_vector, PLFLT angle );
512
513 // Skew new Y coordinate axis relative to the old.
514 // angle is in degrees.
515
516 PLDLLIMPEXP void
517 plP_affine_yskew( PLFLT *affine_vector, PLFLT angle );
518
519 // Multiply two affine transformation matrices to form a third.
520 //
521 // A = B * C
522 //
523 //
524
525 PLDLLIMPEXP void
526 plP_affine_multiply(
527 PLFLT *affine_vectorA,
528 PLFLT_VECTOR affine_vectorB,
529 PLFLT_VECTOR affine_vectorC );
530
531 // Determines interval between numeric labels
532
533 void
534 pldtik( PLFLT vmin, PLFLT vmax, PLFLT *tick, PLINT *nsubt, PLBOOL ld );
535
536 // Writes numeric labels on side(s) of box in custom locations
537
538 void
539 label_box_custom( PLCHAR_VECTOR xopt, PLINT n_xticks, PLFLT_VECTOR xticks, PLCHAR_VECTOR yopt, PLINT n_yticks, PLFLT_VECTOR yticks );
540
541 // Determine factor to convert date / time in seconds to more natural
542 // units
543
544 void
545 pldtfac( PLFLT vmin, PLFLT vmax, PLFLT *factor, PLFLT *tstart );
546
547 // Determines precision of box labels
548
549 void
550 pldprec( PLFLT vmin, PLFLT vmax, PLFLT tick, PLINT lf,
551 PLINT *mode, PLINT *prec, PLINT digmax, PLINT *scale );
552
553 // Draws a polyline within the clip limits.
554
555 void
556 plP_pllclp( PLINT *x, PLINT *y, PLINT npts,
557 PLINT xmin, PLINT xmax, PLINT ymin, PLINT ymax,
558 void ( *draw )( short *, short *, PLINT ) );
559
560 // Fills a polygon within the clip limits.
561
562 void
563 plP_plfclp( PLINT *x, PLINT *y, PLINT npts,
564 PLINT xmin, PLINT xmax, PLINT ymin, PLINT ymax,
565 void ( *draw )( short *, short *, PLINT ) );
566
567 // Clip a polygon to the 3d bounding plane
568 int
569 plP_clip_poly( int Ni, PLFLT *Vi[3], int axis, PLFLT dir, PLFLT offset );
570
571 // Get clipped endpoints
572
573 int
574 plP_clipline( PLINT *p_x1, PLINT *p_y1, PLINT *p_x2, PLINT *p_y2,
575 PLINT xmin, PLINT xmax, PLINT ymin, PLINT ymax );
576
577 // Stores hex digit value into FCI (font characterization integer).
578 void
579 plP_hex2fci( unsigned char hexdigit, unsigned char hexpower, PLUNICODE *pfci );
580
581 // Retrieves hex digit value from FCI (font characterization integer).
582 PLDLLIMPEXP void
583 plP_fci2hex( PLUNICODE fci, unsigned char *phexdigit, unsigned char hexpower );
584
585 // Pattern fills in software the polygon bounded by the input points.
586
587 PLDLLIMPEXP void
588 plfill_soft( short *x, short *y, PLINT npts );
589
590 // In case of an abort this routine is called. It just prints out an
591 // error message and tries to clean up as much as possible.
592
593 PLDLLIMPEXP void
594 plexit( PLCHAR_VECTOR errormsg );
595
596 // Just a front-end to exit().
597
598 void
599 pl_exit( void );
600
601 // A handy way to issue warnings, if need be.
602
603 PLDLLIMPEXP void
604 plwarn( PLCHAR_VECTOR errormsg );
605
606 // Same as plwarn(), but appends ", aborting plot" to the error message
607
608 PLDLLIMPEXP void
609 plabort( PLCHAR_VECTOR errormsg );
610
611 // Loads either the standard or extended font.
612
613 void
614 plfntld( PLINT fnt );
615
616 // Release memory for fonts.
617
618 void
619 plfontrel( void );
620
621 // A replacement for strdup(), which isn't portable.
622
623 PLDLLIMPEXP char *
624 plstrdup( PLCHAR_VECTOR src );
625
626 // Bin up cmap 1 space and assign colors to make inverse mapping easy.
627
628 PLDLLIMPEXP void
629 plcmap1_calc( void );
630
631 // Draws a slanting tick at position (mx,my) (measured in mm) of
632 // vector length (dx,dy).
633
634 void
635 plstik( PLFLT mx, PLFLT my, PLFLT dx, PLFLT dy );
636
637 // Prints out a "string" at reference position with physical coordinates
638 // (refx,refy).
639
640 void
641 plstr( PLINT base, PLFLT *xform, PLINT refx, PLINT refy, PLCHAR_VECTOR string );
642
643 // Draws a tick parallel to x.
644
645 void
646 plxtik( PLINT x, PLINT y, PLINT below, PLINT above );
647
648 // Draws a tick parallel to y.
649
650 void
651 plytik( PLINT x, PLINT y, PLINT left, PLINT right );
652
653 // Driver interface filter --
654 // passes all coordinates through a variety of filters.
655
656 PLDLLIMPEXP void
657 difilt( PLINT *, PLINT *, PLINT,
658 PLINT *, PLINT *, PLINT *, PLINT * );
659
660 // Transforms the clipping region coordinates as necessary
661 // based on the current plot orientation, etc.
662
663 PLDLLIMPEXP void
664 difilt_clip( PLINT *, PLINT * );
665
666 // Calculate scale of font size and scale of magnitude of vertical
667 // offset associated with superscripts and subscripts.
668
669 PLDLLIMPEXP void
670 plP_script_scale( PLBOOL ifupper, PLINT *level,
671 PLFLT *old_scale, PLFLT *scale,
672 PLFLT *old_offset, PLFLT *offset );
673
674 // Driver draws text
675
676 void
677 plP_text( PLINT base, PLFLT just, PLFLT *xform, PLINT x, PLINT y,
678 PLINT refx, PLINT refy, PLCHAR_VECTOR string );
679
680 // Save LC_NUMERIC locale string, then set "C" locale to protect
681 // parts of PLplot which absolutely demand the LC_NUMERIC "C" locale.
682
683 PLDLLIMPEXP char *
684 plsave_set_locale( void );
685
686 // Restore LC_NUMERIC locale that was determined by plsave_set_locale.
687
688 PLDLLIMPEXP void
689 plrestore_locale( char * save_lc_numeric_locale );
690
691 // Writes the Hershey symbol "ch" centred at the physical coordinate (x,y).
692 void
693 plhrsh( PLINT ch, PLINT x, PLINT y );
694
695 // where should structure definitions that must be seen by drivers and core source files, be?
696
697 // structure to be used by plcore.c and anydriver.c, related to plP_text()
698
699 typedef struct
700 {
701 // Indicates the type of text stored in the structure. This flag
702 // is used by the plot metafiles to correctly store and then render
703 // the contents.
704 enum { PL_STRING_TEXT, PL_STRING_SYMBOL } text_type;
705
706 // Positioning settings
707 PLINT base; // ref point at base(1) or center(0) of text. Currently plplot only use 0
708 PLFLT just; // continuos justification, 0 left, 0.5 center, 1 right
709 PLFLT *xform; // transformation (rotation) matrix
710
711 // raw reference point--after any transformation
712 PLINT x;
713 PLINT y;
714
715 // processed ref. point--after justification, displacement, etc, processing
716 PLINT refx;
717 PLINT refy;
718
719 // font face OPTIONALLY used for rendering hershey codes
720 char font_face;
721
722 // The following 3 fields are used by the alternative text handling pathway.
723 // The alternative text handling pathway allows the driver to process
724 // each character individually for unicode font handling
725 // See drivers/cairo.h for details about how this works.
726 PLUNICODE n_fci; // font storage
727 PLUNICODE n_char; // character storage
728 PLINT n_ctrl_char; // control character
729
730 // Used by plsym to store a unicode character for use by plfreetype
731 PLUNICODE unicode_char; // an int to hold either a Hershey, ASC-II, or Unicode value for plsym calls
732
733 // Used to store a processed unicode string. Used by plsym and
734 // text rendering by the driver
735 PLUNICODE *unicode_array; // a pointer to an array of ints holding either a Hershey, ASC-II, or Unicode value for cached plsym
736 unsigned short unicode_array_len;
737
738 // Non-unicode strings and unprocessed string in the unicode case
739 const char *string; // text to draw
740 PLINT symbol; // plot symbol to draw
741 }EscText;
742
743 //
744 // structure that contains driver specific information, to be used by
745 // plargs.c and anydriver.c, related to plParseDrvOpts() and plHelpDrvOpts()
746 //
747
748 typedef struct
749 {
750 PLCHAR_VECTOR opt; // a string with the name of the option
751 PLINT type; // the type of the variable to be set, see bellow the available types
752 void *var_ptr; // a pointer to the variable to be set
753 PLCHAR_VECTOR hlp_msg; // help message of the option
754 } DrvOpt;
755
756 // the available variable types, DrvOpt.type, for driver specific options
757
758 enum { DRV_INT, DRV_FLT, DRV_STR };
759
760 // parse driver specific options, as in -drvopt <option[=value]>*
761
762 PLDLLIMPEXP int
763 plParseDrvOpts( DrvOpt * );
764
765 // give help on driver specific options
766
767 void
768 plHelpDrvOpts( DrvOpt * );
769
770 //
771 // structures to store contour lines
772 //
773
774 #define LINE_ITEMS 20
775
776 typedef struct cont_line
777 {
778 PLFLT *x;
779 PLFLT *y;
780 PLINT npts;
781 struct cont_line *next;
782 } CONT_LINE;
783
784 typedef struct cont_level
785 {
786 // INDENT-OFF (stop infinite recursion)
787 PLFLT level; // contour level
788 struct cont_line *line; // contour line struct
789 struct cont_level *next; // contour level struct
790 // INDENT-ON
791 } CONT_LEVEL;
792
793 void
794 cont_store( PLFLT_MATRIX f, PLINT nx, PLINT ny,
795 PLINT kx, PLINT lx, PLINT ky, PLINT ly,
796 PLFLT_VECTOR clevel, PLINT nlevel,
797 void ( *pltr )( PLFLT, PLFLT, PLFLT *, PLFLT *, PLPointer ),
798 PLPointer pltr_data,
799 CONT_LEVEL **contour );
800
801 void
802 cont_clean_store( CONT_LEVEL *ct );
803
804 // Get the viewport boundaries in world coordinates, expanded slightly
805
806 void
807 plP_xgvpw( PLFLT *p_xmin, PLFLT *p_xmax, PLFLT *p_ymin, PLFLT *p_ymax );
808
809 // Get x-y domain in world coordinates for 3d plots
810
811 void
812 plP_gdom( PLFLT *p_xmin, PLFLT *p_xmax, PLFLT *p_ymin, PLFLT *p_ymax );
813
814 // Get vertical (z) scale parameters for 3-d plot
815
816 void
817 plP_grange( PLFLT *p_zscl, PLFLT *p_zmin, PLFLT *p_zmax );
818
819 // Get parameters used in 3d plots
820
821 void
822 plP_gw3wc( PLFLT *p_dxx, PLFLT *p_dxy, PLFLT *p_dyx, PLFLT *p_dyy,
823 PLFLT *p_dyz );
824
825 // Get clip boundaries in physical coordinates
826
827 void
828 plP_gclp( PLINT *p_ixmin, PLINT *p_ixmax, PLINT *p_iymin, PLINT *p_iymax );
829
830 // Set clip boundaries in physical coordinates
831
832 void
833 plP_sclp( PLINT ixmin, PLINT ixmax, PLINT iymin, PLINT iymax );
834
835 // Get physical device limits in physical coordinates
836
837 PLDLLIMPEXP void
838 plP_gphy( PLINT *p_ixmin, PLINT *p_ixmax, PLINT *p_iymin, PLINT *p_iymax );
839
840 // Get number of subpages on physical device and current subpage
841
842 PLDLLIMPEXP void
843 plP_gsub( PLINT *p_nx, PLINT *p_ny, PLINT *p_cs );
844
845 // Set number of subpages on physical device and current subpage
846
847 PLDLLIMPEXP void
848 plP_ssub( PLINT nx, PLINT ny, PLINT cs );
849
850 // Set up plot parameters according to the number of subpages.
851
852 void
853 plP_subpInit( void );
854
855 // Get number of pixels to a millimeter
856
857 PLDLLIMPEXP void
858 plP_gpixmm( PLFLT *p_x, PLFLT *p_y );
859
860 // All the drivers call this to set physical pixels/mm.
861
862 PLDLLIMPEXP void
863 plP_setpxl( PLFLT xpmm0, PLFLT ypmm0 );
864
865 // Get background parameters (including line width) for 3d plot.
866
867 void
868 plP_gzback( PLINT **zbf, PLINT **zbc, PLFLT **zbt, PLFLT **zbw );
869
870 // Move to physical coordinates (x,y).
871
872 void
873 plP_movphy( PLINT x, PLINT y );
874
875 // Draw to physical coordinates (x,y).
876
877 void
878 plP_draphy( PLINT x, PLINT y );
879
880 // Move to world coordinates (x,y).
881
882 void
883 plP_movwor( PLFLT x, PLFLT y );
884
885 // Draw to world coordinates (x,y).
886
887 void
888 plP_drawor( PLFLT x, PLFLT y );
889
890 // Draw polyline in physical coordinates.
891
892 void
893 plP_draphy_poly( PLINT *x, PLINT *y, PLINT n );
894
895 // Draw polyline in world coordinates.
896
897 void
898 plP_drawor_poly( PLFLT_VECTOR x, PLFLT_VECTOR y, PLINT n );
899
900 // Sets up physical limits of plotting device.
901
902 PLDLLIMPEXP void
903 plP_setphy( PLINT xmin, PLINT xmax, PLINT ymin, PLINT ymax );
904
905 // Set up the subpage boundaries according to the current subpage selected
906
907 PLDLLIMPEXP void
908 plP_setsub( void );
909
910 // Get the floating point precision (in number of places) in numeric labels.
911
912 void
913 plP_gprec( PLINT *p_setp, PLINT *p_prec );
914
915 // Get the date / time format for numeric labels
916
917 const char *
918 plP_gtimefmt( void );
919
920 // Computes the length of a string in mm, including escape sequences.
921
922 PLFLT
923 plstrl( PLCHAR_VECTOR string );
924
925 // Similar to strpos, but searches for occurence of string str2.
926
927 PLINT
928 plP_stindex( PLCHAR_VECTOR str1, PLCHAR_VECTOR str2 );
929
930 // Searches string str for first occurence of character chr.
931
932 PLDLLIMPEXP PLINT
933 plP_strpos( PLCHAR_VECTOR str, int chr );
934
935 // Searches string str for character chr (case insensitive).
936
937 PLBOOL
938 plP_stsearch( PLCHAR_VECTOR str, int chr );
939
940 // Conversion functions
941
942 // device coords to physical coords (x)
943
944 PLINT
945 plP_dcpcx( PLFLT x );
946
947 // device coords to physical coords (y)
948
949 PLINT
950 plP_dcpcy( PLFLT y );
951
952 // millimeters from bottom left-hand corner to physical coords (x)
953
954 PLINT
955 plP_mmpcx( PLFLT x );
956
957 // millimeters from bottom left-hand corner to physical coords (y)
958
959 PLINT
960 plP_mmpcy( PLFLT y );
961
962 // world coords to physical coords (x)
963
964 PLINT
965 plP_wcpcx( PLFLT x );
966
967 // world coords to physical coords (y)
968
969 PLINT
970 plP_wcpcy( PLFLT y );
971
972 // physical coords to device coords (x)
973
974 PLFLT
975 plP_pcdcx( PLINT x );
976
977 // physical coords to device coords (y)
978
979 PLFLT
980 plP_pcdcy( PLINT y );
981
982 // millimeters from bottom left corner to device coords (x)
983
984 PLFLT
985 plP_mmdcx( PLFLT x );
986
987 // millimeters from bottom left corner to device coords (y)
988
989 PLFLT
990 plP_mmdcy( PLFLT y );
991
992 // world coords into device coords (x)
993
994 PLFLT
995 plP_wcdcx( PLFLT x );
996
997 // world coords into device coords (y)
998
999 PLFLT
1000 plP_wcdcy( PLFLT y );
1001
1002 // subpage coords to device coords (x)
1003
1004 PLFLT
1005 plP_scdcx( PLFLT x );
1006
1007 // subpage coords to device coords (y)
1008
1009 PLFLT
1010 plP_scdcy( PLFLT y );
1011
1012 // device coords to millimeters from bottom left-hand corner (x)
1013
1014 PLFLT
1015 plP_dcmmx( PLFLT x );
1016
1017 // device coords to millimeters from bottom left-hand corner (y)
1018
1019 PLFLT
1020 plP_dcmmy( PLFLT y );
1021
1022 // world coords into millimeters (x)
1023
1024 PLFLT
1025 plP_wcmmx( PLFLT x );
1026
1027 // world coords into millimeters (y)
1028
1029 PLFLT
1030 plP_wcmmy( PLFLT y );
1031
1032 // device coords to subpage coords (x)
1033
1034 PLFLT
1035 plP_dcscx( PLFLT x );
1036
1037 // device coords to subpage coords (y)
1038
1039 PLFLT
1040 plP_dcscy( PLFLT y );
1041
1042 // 3-d coords to 2-d projection (x)
1043
1044 PLFLT
1045 plP_w3wcx( PLFLT x, PLFLT y, PLFLT z );
1046
1047 // 3-d coords to 2-d projection (y)
1048
1049 PLFLT
1050 plP_w3wcy( PLFLT x, PLFLT y, PLFLT z );
1051
1052 // 3-d coords to 2-d projection (z)
1053
1054 PLFLT
1055 plP_w3wcz( PLFLT x, PLFLT y, PLFLT z );
1056
1057 // Returns the rotation and shear angle and stride from a plplot transformation matrix
1058
1059 PLDLLIMPEXP void
1060 plRotationShear( PLFLT *xFormMatrix, PLFLT *rotation, PLFLT *shear, PLFLT *stride );
1061
1062 // Test whether a point is in a polygon.
1063 int
1064 plP_pointinpolygon( PLINT n, PLFLT_VECTOR x, PLFLT_VECTOR y,
1065 PLFLT xp, PLFLT yp );
1066
1067 // Driver calls
1068
1069 // Initialize device.
1070
1071 void
1072 plP_init( void );
1073
1074 // Draw line between two points
1075
1076 void
1077 plP_line( short *x, short *y );
1078
1079 // Draw polyline
1080
1081 void
1082 plP_polyline( short *x, short *y, PLINT npts );
1083
1084 // Fill polygon
1085
1086 PLDLLIMPEXP void
1087 plP_fill( short *x, short *y, PLINT npts );
1088
1089 // Render gradient
1090
1091 void
1092 plP_gradient( short *x, short *y, PLINT npts );
1093
1094 // draw image
1095
1096 void
1097 plP_image( PLFLT *z, PLINT nx, PLINT ny, PLFLT xmin, PLFLT ymin, PLFLT dx, PLFLT dy,
1098 void ( *pltr )( PLFLT, PLFLT, PLFLT *, PLFLT *, PLPointer ), PLPointer pltr_data );
1099
1100 // Structure for holding arc data
1101 typedef struct
1102 {
1103 PLFLT x;
1104 PLFLT y;
1105 PLFLT a;
1106 PLFLT b;
1107 PLFLT angle1;
1108 PLFLT angle2;
1109 PLFLT rotate;
1110 PLBOOL fill;
1111 } arc_struct;
1112
1113 // End of page
1114
1115 PLDLLIMPEXP void
1116 plP_eop( void );
1117
1118 // End of page
1119
1120 PLDLLIMPEXP void
1121 plP_bop( void );
1122
1123 // Tidy up device (flush buffers, close file, etc.)
1124
1125 void
1126 plP_tidy( void );
1127
1128 // Change state.
1129
1130 PLDLLIMPEXP void
1131 plP_state( PLINT op );
1132
1133 // Escape function, for driver-specific commands.
1134
1135 PLDLLIMPEXP void
1136 plP_esc( PLINT op, void *ptr );
1137
1138 // Set up plot window parameters.
1139
1140 void
1141 plP_swin( PLWindow *plwin );
1142
1143 // Wait for user input
1144
1145 PLDLLIMPEXP void
1146 plP_wait( void );
1147
1148 // Return file pointer to lib file.
1149
1150 FILE *
1151 plLibOpen( PLCHAR_VECTOR fn );
1152
1153 // Does required startup initialization of library.
1154
1155 PLDLLIMPEXP void
1156 pllib_init( void );
1157
1158 // Does preliminary setup of device driver.
1159
1160 PLDLLIMPEXP void
1161 pllib_devinit( void );
1162
1163 // Utility to copy one PLColor to another.
1164
1165 PLDLLIMPEXP void
1166 pl_cpcolor( PLColor *to, PLColor *from );
1167
1168 // Does required startup initialization of a stream.
1169
1170 void
1171 plstrm_init( void );
1172
1173 // Builds a list of the active devices/streams by device name
1174
1175 void
1176 PLDLLIMPEXP plP_getinitdriverlist( char *names );
1177
1178 // Checks a give list of device names against active streams and returns the number of matches
1179
1180 PLINT
1181 plP_checkdriverinit( char *names );
1182
1183 // disable writing to plot buffer and pixmap
1184 void
1185 NoBufferNoPixmap( void );
1186
1187 // restart writing to plot buffer and pixmap
1188 void
1189 RestoreWrite2BufferPixmap( void );
1190
1191 void
1192 grimage( short *x, short *y, unsigned short *z, PLINT nx, PLINT ny );
1193
1194 PLDLLIMPEXP int
1195 plInBuildTree( void );
1196
1197 void
1198 plimageslow( PLFLT *idata, PLINT nx, PLINT ny,
1199 PLFLT xmin, PLFLT ymin, PLFLT dx, PLFLT dy,
1200 void ( *pltr )( PLFLT, PLFLT, PLFLT *, PLFLT *, PLPointer ),
1201 PLPointer pltr_data );
1202
1203 typedef struct
1204 {
1205 PLFLT xmin, ymin, dx, dy;
1206 } IMG_DT;
1207
1208 //
1209 // void plfvect()
1210 //
1211 // Internal routine to plot a vector array with arbitrary coordinate
1212 // and vector transformations.
1213 // This is not currently intended to be called direct by the user
1214 //
1215 PLDLLIMPEXP void
1216 plfvect( PLFLT ( *plf2eval )( PLINT, PLINT, PLPointer ),
1217 PLPointer f2evalv_data, PLPointer f2evalc_data,
1218 PLINT nx, PLINT ny, PLFLT scale,
1219 void ( *pltr )( PLFLT, PLFLT, PLFLT *, PLFLT *, PLPointer ),
1220 PLPointer pltr_data );
1221
1222 //
1223 // Internal function to get an index to the hershey table
1224 //
1225 int
1226 plhershey2unicode( int in );
1227
1228 // struct used for FCI to FontName lookups.
1229 typedef struct
1230 {
1231 PLUNICODE fci;
1232 const unsigned char *pfont;
1233 } FCI_to_FontName_Table;
1234
1235 // Internal function to obtain a pointer to a valid font name.
1236 PLDLLIMPEXP const char *
1237 plP_FCI2FontName( PLUNICODE fci,
1238 const FCI_to_FontName_Table lookup[], const int nlookup );
1239
1240
1241 // Internal function to free memory from driver options
1242 void
1243 plP_FreeDrvOpts( void );
1244
1245 // Convert a ucs4 unichar to utf8 char string
1246 PLDLLIMPEXP int
1247 ucs4_to_utf8( PLUNICODE unichar, char *ptr );
1248
1249 //
1250 // Wrapper functions for the system IO routines fread, fwrite
1251 //
1252
1253 // wraps fwrite
1254
1255 void
1256 plio_fwrite( void *, size_t, size_t, FILE * );
1257
1258 // wraps fread
1259
1260 void
1261 plio_fread( void *, size_t, size_t, FILE * );
1262
1263 // wraps fgets
1264
1265 void
1266 plio_fgets( char *, int, FILE * );
1267
1268 // Draws a tick parallel to x, using world coordinates
1269 void
1270 plwxtik( PLFLT x, PLFLT y, PLBOOL minor, PLBOOL invert );
1271
1272 // Draws a tick parallel to y, using world coordinates
1273 void
1274 plwytik( PLFLT x, PLFLT y, PLBOOL minor, PLBOOL invert );
1275
1276 // get drivers directory
1277
1278 #ifdef ENABLE_DYNDRIVERS
1279 PLDLLIMPEXP const char*
1280 plGetDrvDir( void );
1281 #endif
1282
1283 #ifdef PL_HAVE_FREETYPE
1284 PLDLLIMPEXP void
1285 plD_FreeType_init( PLStream * );
1286
1287 PLDLLIMPEXP void
1288 plD_render_freetype_text( PLStream *, EscText * );
1289
1290 PLDLLIMPEXP void
1291 plD_FreeType_Destroy( PLStream * );
1292
1293 PLDLLIMPEXP void
1294 pl_set_extended_cmap0( PLStream *, int, int );
1295
1296 #endif
1297
1298 // Create a temporary file securely
1299 PLDLLIMPEXP FILE *
1300 pl_create_tempfile( char **fname );
1301
1302 // Create a temporary fifo securely
1303 PLDLLIMPEXP char *
1304 pl_create_tempfifo( const char **p_fifoname, const char **p_dirname );
1305
1306 // Read a meta file
1307 PLDLLIMPEXP void
1308 plreadmetafile( char *infile );
1309
1310 #ifdef __cplusplus
1311 }
1312 #endif
1313
1314 #endif // __PLPLOTP_H__
plConfig.h
PLColor
Definition: plplot.h:546
plP_esc
PLDLLIMPEXP void plP_esc(PLINT op, void *ptr)
Definition: plcore.c:273
PLDLLIMPEXP_DATA
PLDLLIMPEXP_DATA(PLStream *) plsc
plP_checkdriverinit
PLINT plP_checkdriverinit(char *names)
Definition: plcore.c:4332
plP_mmdcx
PLFLT plP_mmdcx(PLFLT x)
Definition: plcvt.c:103
difilt_clip
PLDLLIMPEXP void difilt_clip(PLINT *, PLINT *)
Definition: plcore.c:1603
plP_strpos
PLDLLIMPEXP PLINT plP_strpos(PLCHAR_VECTOR str, int chr)
Definition: plsym.c:1216
NoBufferNoPixmap
void NoBufferNoPixmap(void)
Definition: plimage.c:41
plP_dcmmy
PLFLT plP_dcmmy(PLFLT y)
Definition: plcvt.c:163
plP_scdcy
PLFLT plP_scdcy(PLFLT y)
Definition: plcvt.c:143
plP_hex2fci
void plP_hex2fci(unsigned char hexdigit, unsigned char hexpower, PLUNICODE *pfci)
Definition: plcore.c:3945
EscText::just
PLFLT just
Definition: plplotP.h:708
plwarn
PLDLLIMPEXP void plwarn(PLCHAR_VECTOR errormsg)
Definition: plctrl.c:1863
plstrm_init
void plstrm_init(void)
Definition: plcore.c:2711
plf2eval
PLFLT plf2eval(PLINT ix, PLINT iy, PLPointer plf2eval_data)
Definition: plcont.c:447
plP_wcmmx
PLFLT plP_wcmmx(PLFLT x)
Definition: plcvt.c:171
plcmap1_calc
PLDLLIMPEXP void plcmap1_calc(void)
Bin up cmap 1 space and assign colors to make inverse mapping easy.
Definition: plctrl.c:764
plP_affine_rotate
PLDLLIMPEXP void plP_affine_rotate(PLFLT *affine_vector, PLFLT angle)
Definition: plaffine.c:123
plP_pcdcy
PLFLT plP_pcdcy(PLINT y)
Definition: plcvt.c:95
plio_fwrite
void plio_fwrite(void *, size_t, size_t, FILE *)
Definition: plstdio.c:68
PLUNICODE
PLUINT PLUNICODE
Definition: plplot.h:201
plP_dcscy
PLFLT plP_dcscy(PLFLT y)
Definition: plcvt.c:199
PLFLT_MATRIX
const PLFLT *const * PLFLT_MATRIX
Definition: plplot.h:253
plP_drawor_poly
void plP_drawor_poly(PLFLT_VECTOR x, PLFLT_VECTOR y, PLINT n)
Definition: plline.c:554
plP_wcmmy
PLFLT plP_wcmmy(PLFLT y)
Definition: plcvt.c:179
difilt
PLDLLIMPEXP void difilt(PLINT *, PLINT *, PLINT, PLINT *, PLINT *, PLINT *, PLINT *)
Definition: plcore.c:1460
plP_setsub
PLDLLIMPEXP void plP_setsub(void)
Definition: plpage.c:189
pllib_devinit
PLDLLIMPEXP void pllib_devinit(void)
Definition: plcore.c:2874
plsnscanf
int plsnscanf(PLCHAR_VECTOR buffer, int n, PLCHAR_VECTOR format,...)
Definition: plctrl.c:3045
plP_pcdcx
PLFLT plP_pcdcx(PLINT x)
Definition: plcvt.c:87
PLCHAR_VECTOR
const char * PLCHAR_VECTOR
Definition: plplot.h:243
PLWindow
Definition: plplot.h:450
AT_BOP
Definition: plplotP.h:373
plP_movphy
void plP_movphy(PLINT x, PLINT y)
Definition: plline.c:459
plP_w3wcy
PLFLT plP_w3wcy(PLFLT x, PLFLT y, PLFLT z)
Definition: plcvt.c:222
plP_line
void plP_line(short *x, short *y)
Definition: plcore.c:388
plwxtik
void plwxtik(PLFLT x, PLFLT y, PLBOOL minor, PLBOOL invert)
Definition: pltick.c:30
cont_line::next
struct cont_line * next
Definition: plplotP.h:781
plP_mmpcx
PLINT plP_mmpcx(PLFLT x)
Definition: plcvt.c:47
cont_level::line
struct cont_line * line
Definition: plplotP.h:788
DrvOpt::opt
PLCHAR_VECTOR opt
Definition: plplotP.h:750
cont_level
Definition: plplotP.h:784
DrvOpt::var_ptr
void * var_ptr
Definition: plplotP.h:752
Hershey_to_Unicode_table::Hershey
unsigned int Hershey
Definition: plplotP.h:458
plio_fgets
void plio_fgets(char *, int, FILE *)
Definition: plstdio.c:142
pldtfac
void pldtfac(PLFLT vmin, PLFLT vmax, PLFLT *factor, PLFLT *tstart)
Definition: pldtik.c:122
plP_polyline
void plP_polyline(short *x, short *y, PLINT npts)
Definition: plcore.c:417
plstrl
PLFLT plstrl(PLCHAR_VECTOR string)
Definition: plsym.c:976
PLPointer
void * PLPointer
Definition: plplot.h:209
plP_dcmmx
PLFLT plP_dcmmx(PLFLT x)
Definition: plcvt.c:155
RestoreWrite2BufferPixmap
void RestoreWrite2BufferPixmap(void)
Definition: plimage.c:51
plP_greek_mnemonic
const char plP_greek_mnemonic[]
Definition: plcore.c:142
plP_affine_xskew
PLDLLIMPEXP void plP_affine_xskew(PLFLT *affine_vector, PLFLT angle)
Definition: plaffine.c:143
arc_struct::fill
PLBOOL fill
Definition: plplotP.h:1110
plP_gtimefmt
const char * plP_gtimefmt(void)
Definition: plcore.c:3876
plP_affine_multiply
PLDLLIMPEXP void plP_affine_multiply(PLFLT *affine_vectorA, PLFLT_VECTOR affine_vectorB, PLFLT_VECTOR affine_vectorC)
Definition: plaffine.c:184
pldll.h
plexit
PLDLLIMPEXP void plexit(PLCHAR_VECTOR errormsg)
Definition: plctrl.c:1958
plP_w3wcz
PLFLT plP_w3wcz(PLFLT x, PLFLT y, PLFLT z)
Definition: plcvt.c:233
EscText::n_ctrl_char
PLINT n_ctrl_char
Definition: plplotP.h:728
plP_FCI2FontName
PLDLLIMPEXP const char * plP_FCI2FontName(PLUNICODE fci, const FCI_to_FontName_Table lookup[], const int nlookup)
Definition: plsym.c:1548
plreadmetafile
PLDLLIMPEXP void plreadmetafile(char *infile)
Definition: plmetafile.c:1122
DRV_STR
Definition: plplotP.h:758
plrestore_locale
PLDLLIMPEXP void plrestore_locale(char *save_lc_numeric_locale)
Definition: plctrl.c:3145
PLINT
int PLINT
Definition: plplot.h:181
IMG_DT::ymin
PLFLT ymin
Definition: plplotP.h:1205
PLBOOL
PLINT PLBOOL
Definition: plplot.h:204
plfill_soft
PLDLLIMPEXP void plfill_soft(short *x, short *y, PLINT npts)
Definition: plfill.c:307
cont_line::npts
PLINT npts
Definition: plplotP.h:780
plP_clipline
int plP_clipline(PLINT *p_x1, PLINT *p_y1, PLINT *p_x2, PLINT *p_y2, PLINT xmin, PLINT xmax, PLINT ymin, PLINT ymax)
Definition: plline.c:697
plP_tidy
void plP_tidy(void)
Definition: plcore.c:231
EscText::n_fci
PLUNICODE n_fci
Definition: plplotP.h:726
plP_stsearch
PLBOOL plP_stsearch(PLCHAR_VECTOR str, int chr)
Definition: plsym.c:1256
EscText::refy
PLINT refy
Definition: plplotP.h:717
FCI_to_FontName_Table::pfont
const unsigned char * pfont
Definition: plplotP.h:1232
plwytik
void plwytik(PLFLT x, PLFLT y, PLBOOL minor, PLBOOL invert)
Definition: pltick.c:66
plP_wcdcx
PLFLT plP_wcdcx(PLFLT x)
Definition: plcvt.c:119
plP_eop
PLDLLIMPEXP void plP_eop(void)
Definition: plcore.c:164
plP_setpxl
PLDLLIMPEXP void plP_setpxl(PLFLT xpmm0, PLFLT ypmm0)
Definition: plcore.c:4238
EscText
Definition: plplotP.h:699
cont_line::x
PLFLT * x
Definition: plplotP.h:778
plP_gpixmm
PLDLLIMPEXP void plP_gpixmm(PLFLT *p_x, PLFLT *p_y)
Definition: plcore.c:4229
cont_store
void cont_store(PLFLT_MATRIX f, PLINT nx, PLINT ny, PLINT kx, PLINT lx, PLINT ky, PLINT ly, PLFLT_VECTOR clevel, PLINT nlevel, void(*pltr)(PLFLT, PLFLT, PLFLT *, PLFLT *, PLPointer), PLPointer pltr_data, CONT_LEVEL **contour)
arc_struct::b
PLFLT b
Definition: plplotP.h:1106
DrvOpt::hlp_msg
PLCHAR_VECTOR hlp_msg
Definition: plplotP.h:753
plP_getinitdriverlist
void PLDLLIMPEXP plP_getinitdriverlist(char *names)
Definition: plcore.c:4302
pl_cpcolor
PLDLLIMPEXP void pl_cpcolor(PLColor *to, PLColor *from)
Definition: plcore.c:2738
plP_wait
PLDLLIMPEXP void plP_wait(void)
Definition: plcore.c:365
grimage
void grimage(short *x, short *y, unsigned short *z, PLINT nx, PLINT ny)
Definition: plimage.c:150
cont_line
Definition: plplotP.h:776
plP_affine_identity
PLDLLIMPEXP void plP_affine_identity(PLFLT *affine_vector)
Definition: plaffine.c:56
plP_gradient
void plP_gradient(short *x, short *y, PLINT npts)
Definition: plcore.c:516
plP_dcpcx
PLINT plP_dcpcx(PLFLT x)
Definition: plcvt.c:31
cont_clean_store
void cont_clean_store(CONT_LEVEL *ct)
Definition: plcont.c:173
plP_subpInit
void plP_subpInit(void)
Definition: plpage.c:134
DrvOpt
Definition: plplotP.h:748
plP_wcpcx
PLINT plP_wcpcx(PLFLT x)
Definition: plcvt.c:63
buffer
static PLINT * buffer
Definition: plfill.c:74
plHelpDrvOpts
void plHelpDrvOpts(DrvOpt *)
Definition: plargs.c:1540
plP_gzback
void plP_gzback(PLINT **zbf, PLINT **zbc, PLFLT **zbt, PLFLT **zbw)
Definition: plot3d.c:1551
xform
void xform(PLFLT x, PLFLT y, PLFLT *tx, PLFLT *ty, PLPointer pltr_data)
Definition: plplot_octaveOCTAVE_wrap.cxx:2917
arc_struct::rotate
PLFLT rotate
Definition: plplotP.h:1109
pl_exit
void pl_exit(void)
plP_plfclp
void plP_plfclp(PLINT *x, PLINT *y, PLINT npts, PLINT xmin, PLINT xmax, PLINT ymin, PLINT ymax, void(*draw)(short *, short *, PLINT))
Definition: plfill.c:538
hershey_to_unicode_lookup_table
Hershey_to_Unicode_table hershey_to_unicode_lookup_table[]
Definition: plhershey-unicode.h:48
cont_line::y
PLFLT * y
Definition: plplotP.h:779
plP_affine_scale
PLDLLIMPEXP void plP_affine_scale(PLFLT *affine_vector, PLFLT xscale, PLFLT yscale)
Definition: plaffine.c:93
pldtik
void pldtik(PLFLT vmin, PLFLT vmax, PLFLT *tick, PLINT *nsubt, PLBOOL ld)
Definition: pldtik.c:36
pl_create_tempfile
PLDLLIMPEXP FILE * pl_create_tempfile(char **fname)
Definition: plstdio.c:240
plP_setphy
PLDLLIMPEXP void plP_setphy(PLINT xmin, PLINT xmax, PLINT ymin, PLINT ymax)
Definition: plcore.c:4249
plsnprintf
int plsnprintf(char *buffer, int n, PLCHAR_VECTOR format,...)
Definition: plctrl.c:3013
plP_mmdcy
PLFLT plP_mmdcy(PLFLT y)
Definition: plcvt.c:111
CONT_LEVEL
struct cont_level CONT_LEVEL
arc_struct::x
PLFLT x
Definition: plplotP.h:1103
plP_fci2hex
PLDLLIMPEXP void plP_fci2hex(PLUNICODE fci, unsigned char *phexdigit, unsigned char hexpower)
Definition: plcore.c:3958
arc_struct::angle2
PLFLT angle2
Definition: plplotP.h:1108
DRV_FLT
Definition: plplotP.h:758
FCI_to_FontName_Table
Definition: plplotP.h:1229
plP_FreeDrvOpts
void plP_FreeDrvOpts(void)
Definition: plargs.c:1560
plhrsh
void plhrsh(PLINT ch, PLINT x, PLINT y)
Definition: plsym.c:359
Hershey_to_Unicode_table
Definition: plplotP.h:456
plP_init
void plP_init(void)
Definition: plcore.c:145
plP_clip_poly
int plP_clip_poly(int Ni, PLFLT *Vi[3], int axis, PLFLT dir, PLFLT offset)
Definition: plot3d.c:166
plP_wcpcy
PLINT plP_wcpcy(PLFLT y)
Definition: plcvt.c:73
plRotationShear
PLDLLIMPEXP void plRotationShear(PLFLT *xFormMatrix, PLFLT *rotation, PLFLT *shear, PLFLT *stride)
Definition: plot3d.c:2767
plstik
void plstik(PLFLT mx, PLFLT my, PLFLT dx, PLFLT dy)
Definition: pltick.c:130
plP_sclp
void plP_sclp(PLINT ixmin, PLINT ixmax, PLINT iymin, PLINT iymax)
Definition: plcore.c:4185
plP_drawor
void plP_drawor(PLFLT x, PLFLT y)
Definition: plline.c:505
plP_text
void plP_text(PLINT base, PLFLT just, PLFLT *xform, PLINT x, PLINT y, PLINT refx, PLINT refy, PLCHAR_VECTOR string)
Definition: plcore.c:1186
plP_scdcx
PLFLT plP_scdcx(PLFLT x)
Definition: plcvt.c:135
plParseDrvOpts
PLDLLIMPEXP int plParseDrvOpts(DrvOpt *)
Definition: plargs.c:1461
CONT_LINE
struct cont_line CONT_LINE
arc_struct::a
PLFLT a
Definition: plplotP.h:1105
plP_affine_translate
PLDLLIMPEXP void plP_affine_translate(PLFLT *affine_vector, PLFLT xtranslate, PLFLT ytranslate)
Definition: plaffine.c:73
EscText::PL_STRING_TEXT
Definition: plplotP.h:704
EscText::unicode_array_len
unsigned short unicode_array_len
Definition: plplotP.h:736
plytik
void plytik(PLINT x, PLINT y, PLINT left, PLINT right)
Definition: pltick.c:116
plLibOpen
FILE * plLibOpen(PLCHAR_VECTOR fn)
Definition: plctrl.c:2229
IMG_DT
Definition: plplotP.h:1203
PLStream
Definition: plstrm.h:523
plio_fread
void plio_fread(void *, size_t, size_t, FILE *)
Definition: plstdio.c:98
pldebug.h
plP_gw3wc
void plP_gw3wc(PLFLT *p_dxx, PLFLT *p_dxy, PLFLT *p_dyx, PLFLT *p_dyy, PLFLT *p_dyz)
Definition: plcore.c:4162
Hershey_to_Unicode_table::Unicode
PLUNICODE Unicode
Definition: plplotP.h:459
pl_create_tempfifo
PLDLLIMPEXP char * pl_create_tempfifo(const char **p_fifoname, const char **p_dirname)
Definition: plstdio.c:344
EscText::refx
PLINT refx
Definition: plplotP.h:716
plP_draphy
void plP_draphy(PLINT x, PLINT y)
Definition: plline.c:472
plabort
PLDLLIMPEXP void plabort(PLCHAR_VECTOR errormsg)
Definition: plctrl.c:1894
FCI_to_FontName_Table::fci
PLUNICODE fci
Definition: plplotP.h:1231
PLFLT
float PLFLT
Definition: plplot.h:163
plP_movwor
void plP_movwor(PLFLT x, PLFLT y)
Definition: plline.c:489
arc_struct::y
PLFLT y
Definition: plplotP.h:1104
DrvOpt::type
PLINT type
Definition: plplotP.h:751
EscText::symbol
PLINT symbol
Definition: plplotP.h:740
plfvect
PLDLLIMPEXP void plfvect(PLFLT(*plf2eval)(PLINT, PLINT, PLPointer), PLPointer f2evalv_data, PLPointer f2evalc_data, PLINT nx, PLINT ny, PLFLT scale, void(*pltr)(PLFLT, PLFLT, PLFLT *, PLFLT *, PLPointer), PLPointer pltr_data)
plP_ssub
PLDLLIMPEXP void plP_ssub(PLINT nx, PLINT ny, PLINT cs)
Definition: plcore.c:4219
plP_image
void plP_image(PLFLT *z, PLINT nx, PLINT ny, PLFLT xmin, PLFLT ymin, PLFLT dx, PLFLT dy, void(*pltr)(PLFLT, PLFLT, PLFLT *, PLFLT *, PLPointer), PLPointer pltr_data)
Definition: plcore.c:4375
arc_struct
Definition: plplotP.h:1101
plP_gclp
void plP_gclp(PLINT *p_ixmin, PLINT *p_ixmax, PLINT *p_iymin, PLINT *p_iymax)
Definition: plcore.c:4174
plxtik
void plxtik(PLINT x, PLINT y, PLINT below, PLINT above)
Definition: pltick.c:103
plP_gdom
void plP_gdom(PLFLT *p_xmin, PLFLT *p_xmax, PLFLT *p_ymin, PLFLT *p_ymax)
Definition: plcore.c:4141
Hershey_to_Unicode_table::Font
char Font
Definition: plplotP.h:460
plP_gprec
void plP_gprec(PLINT *p_setp, PLINT *p_prec)
Definition: plcore.c:3869
DRAWING
Definition: plplotP.h:373
plP_grange
void plP_grange(PLFLT *p_zscl, PLFLT *p_zmin, PLFLT *p_zmax)
Definition: plcore.c:4152
plP_fill
PLDLLIMPEXP void plP_fill(short *x, short *y, PLINT npts)
Definition: plcore.c:451
plP_bop
PLDLLIMPEXP void plP_bop(void)
Definition: plcore.c:198
AT_EOP
Definition: plplotP.h:373
EscText::y
PLINT y
Definition: plplotP.h:713
plP_w3wcx
PLFLT plP_w3wcx(PLFLT x, PLFLT y, PLFLT z)
DRV_INT
Definition: plplotP.h:758
plimageslow
void plimageslow(PLFLT *idata, PLINT nx, PLINT ny, PLFLT xmin, PLFLT ymin, PLFLT dx, PLFLT dy, void(*pltr)(PLFLT, PLFLT, PLFLT *, PLFLT *, PLPointer), PLPointer pltr_data)
plhershey2unicode
int plhershey2unicode(int in)
Definition: plsym.c:1490
pldprec
void pldprec(PLFLT vmin, PLFLT vmax, PLFLT tick, PLINT lf, PLINT *mode, PLINT *prec, PLINT digmax, PLINT *scale)
Definition: pldtik.c:251
ucs4_to_utf8
PLDLLIMPEXP int ucs4_to_utf8(PLUNICODE unichar, char *ptr)
Definition: plcore.c:1329
plP_gphy
PLDLLIMPEXP void plP_gphy(PLINT *p_ixmin, PLINT *p_ixmax, PLINT *p_iymin, PLINT *p_iymax)
Definition: plcore.c:4198
plP_stindex
PLINT plP_stindex(PLCHAR_VECTOR str1, PLCHAR_VECTOR str2)
Definition: plsym.c:1233
plP_mmpcy
PLINT plP_mmpcy(PLFLT y)
Definition: plcvt.c:55
pllib_init
PLDLLIMPEXP void pllib_init(void)
Definition: plcore.c:2262
plP_dcpcy
PLINT plP_dcpcy(PLFLT y)
Definition: plcvt.c:39
plsave_set_locale
PLDLLIMPEXP char * plsave_set_locale(void)
Definition: plctrl.c:3101
plP_xgvpw
void plP_xgvpw(PLFLT *p_xmin, PLFLT *p_xmax, PLFLT *p_ymin, PLFLT *p_ymax)
Definition: plcore.c:4118
PLDLLIMPEXP
#define PLDLLIMPEXP
Definition: pldll.h:49
plfntld
void plfntld(PLINT fnt)
Definition: plsym.c:1394
label_box_custom
void label_box_custom(PLCHAR_VECTOR xopt, PLINT n_xticks, PLFLT_VECTOR xticks, PLCHAR_VECTOR yopt, PLINT n_yticks, PLFLT_VECTOR yticks)
Definition: plbox.c:1925
EscText::string
const char * string
Definition: plplotP.h:739
plP_wcdcy
PLFLT plP_wcdcy(PLFLT y)
Definition: plcvt.c:127
plP_draphy_poly
void plP_draphy_poly(PLINT *x, PLINT *y, PLINT n)
Definition: plline.c:527
number_of_entries_in_hershey_to_unicode_table
int number_of_entries_in_hershey_to_unicode_table
Definition: plhershey-unicode.h:40
plstrm.h
plP_dcscx
PLFLT plP_dcscx(PLFLT x)
Definition: plcvt.c:191
plP_pointinpolygon
int plP_pointinpolygon(PLINT n, PLFLT_VECTOR x, PLFLT_VECTOR y, PLFLT xp, PLFLT yp)
Definition: plfill.c:1212
plplot.h
cont_level::level
PLFLT level
Definition: plplotP.h:787
PLFLT_VECTOR
const PLFLT * PLFLT_VECTOR
Definition: plplot.h:244
EscText::x
PLINT x
Definition: plplotP.h:712
EscText::unicode_char
PLUNICODE unicode_char
Definition: plplotP.h:731
plP_script_scale
PLDLLIMPEXP void plP_script_scale(PLBOOL ifupper, PLINT *level, PLFLT *old_scale, PLFLT *scale, PLFLT *old_offset, PLFLT *offset)
Definition: plsym.c:1302
EscText::n_char
PLUNICODE n_char
Definition: plplotP.h:727
plP_gsub
PLDLLIMPEXP void plP_gsub(PLINT *p_nx, PLINT *p_ny, PLINT *p_cs)
Definition: plcore.c:4209
plP_state
PLDLLIMPEXP void plP_state(PLINT op)
Definition: plcore.c:256
plP_swin
void plP_swin(PLWindow *plwin)
Definition: plcore.c:308
EscText::unicode_array
PLUNICODE * unicode_array
Definition: plplotP.h:735
plfontrel
void plfontrel(void)
Definition: plsym.c:1463
arc_struct::angle1
PLFLT angle1
Definition: plplotP.h:1107
EscText::font_face
char font_face
Definition: plplotP.h:720
plstrdup
PLDLLIMPEXP char * plstrdup(PLCHAR_VECTOR src)
Definition: plctrl.c:2985
cont_level::next
struct cont_level * next
Definition: plplotP.h:789
plstr
void plstr(PLINT base, PLFLT *xform, PLINT refx, PLINT refy, PLCHAR_VECTOR string)
Definition: plsym.c:810
EscText::xform
PLFLT * xform
Definition: plplotP.h:709
plInBuildTree
PLDLLIMPEXP int plInBuildTree(void)
Definition: plcore.c:2888
plP_pllclp
void plP_pllclp(PLINT *x, PLINT *y, PLINT npts, PLINT xmin, PLINT xmax, PLINT ymin, PLINT ymax, void(*draw)(short *, short *, PLINT))
Definition: plline.c:599
EscText::base
PLINT base
Definition: plplotP.h:707
plP_affine_yskew
PLDLLIMPEXP void plP_affine_yskew(PLFLT *affine_vector, PLFLT angle)
Definition: plaffine.c:162