4
// Copyright (C) 2005 Rafael Laboissiere
7
// This file is part of PLplot.
9
// PLplot is free software; you can redistribute it and/or modify
10
// it under the terms of the GNU General Library Public License as published
11
// by the Free Software Foundation; either version 2 of the License, or
12
// (at your option) any later version.
14
// PLplot 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 Library General Public License for more details.
19
// You should have received a copy of the GNU Library General Public License
20
// along with PLplot; if not, write to the Free Software
21
// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
24
// In Debian, run like this:
26
// PLPLOT_FREETYPE_SANS_FONT=/usr/share/fonts/truetype/arphic/bkai00mp.ttf \
27
// PLPLOT_FREETYPE_SERIF_FONT=/usr/share/fonts/truetype/freefont/FreeSerif.ttf \
28
// PLPLOT_FREETYPE_MONO_FONT=/usr/share/fonts/truetype/ttf-devanagari-fonts/lohit_hi.ttf \
29
// PLPLOT_FREETYPE_SCRIPT_FONT=/usr/share/fonts/truetype/unfonts/UnBatang.ttf \
30
// PLPLOT_FREETYPE_SYMBOL_FONT=/usr/share/fonts/truetype/ttf-bangla-fonts/JamrulNormal.ttf \
31
// ./x24 -dev png -drvopt smooth=0 -o x24cxx.png
35
// ttf-arphic-bkai00mp
44
#include "plc++demos.h"
54
static PLINT red[], green[], blue[];
56
static PLFLT px[], py[], sx[], sy[];
61
PLINT x24::red[] = {240, 204, 204, 204, 0, 39, 125};
62
PLINT x24::green[] = {240, 0, 125, 204, 204, 80, 0};
63
PLINT x24::blue[] = {240, 0, 0, 0, 0, 204, 125};
65
PLFLT x24::px[] = {0.0, 0.0, 1.0, 1.0};
66
PLFLT x24::py[] = {0.0, 0.16667, 0.16667, 0.0};
99
/* Taken from http://www.columbia.edu/~fdc/pace/ */
101
char* x24::peace[] = {
128
x24::x24(int argc, char *argv[])
132
pls = new plstream();
134
pls->parseopts (&argc, argv, PL_PARSE_FULL);
139
pls->vpor (0.0, 1.0, 0.0, 1.0);
140
pls->wind (0.0, 1.0, 0.0, 1.0);
142
pls->box("", 1.0, 0, "", 1.0, 0);
145
pls->scmap0 (red, green, blue, 7);
150
for (i = 0; i < 6; i++) {
153
pls->fill (4, px, py);
155
for (j = 0; j < 4; j++)
161
for (i = 0; i < 12; i++)
162
pls->ptex (sx [i], sy [i], 1.0, 0.0, 0.5, peace [i]);
168
int main( int argc, char **argv )
170
x24 *x = new x24( argc, argv );