Mercurial > hg > octave-lyh
comparison libinterp/interp-core/gl2ps-renderer.h @ 15195:2fc554ffbc28
split libinterp from src
* libinterp: New directory. Move all files from src directory here
except Makefile.am, main.cc, main-cli.cc, mkoctfile.in.cc,
mkoctfilr.in.sh, octave-config.in.cc, octave-config.in.sh.
* libinterp/Makefile.am: New file, extracted from src/Makefile.am.
* src/Makefile.am: Delete everything except targets and definitions
needed to build and link main and utility programs.
* Makefile.am (SUBDIRS): Include libinterp in the list.
* autogen.sh: Run config-module.sh in libinterp/dldfcn directory, not
src/dldfcn directory.
* configure.ac (AC_CONFIG_SRCDIR): Use libinterp/octave.cc, not
src/octave.cc.
(DL_LDFLAGS, LIBOCTINTERP): Use libinterp, not src.
(AC_CONFIG_FILES): Include libinterp/Makefile in the list.
* find-docstring-files.sh: Look in libinterp, not src.
* gui/src/Makefile.am (liboctgui_la_CPPFLAGS): Find header files in
libinterp, not src.
author | John W. Eaton <jwe@octave.org> |
---|---|
date | Sat, 18 Aug 2012 16:23:39 -0400 |
parents | src/interp-core/gl2ps-renderer.h@909a2797935b |
children | 3806afcf974a |
comparison
equal
deleted
inserted
replaced
15194:0f0b795044c3 | 15195:2fc554ffbc28 |
---|---|
1 /* | |
2 | |
3 Copyright (C) 2009-2012 Shai Ayal | |
4 | |
5 This file is part of Octave. | |
6 | |
7 Octave is free software; you can redistribute it and/or modify it | |
8 under the terms of the GNU General Public License as published by the | |
9 Free Software Foundation; either version 3 of the License, or (at your | |
10 option) any later version. | |
11 | |
12 Octave is distributed in the hope that it will be useful, but WITHOUT | |
13 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or | |
14 FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License | |
15 for more details. | |
16 | |
17 You should have received a copy of the GNU General Public License | |
18 along with Octave; see the file COPYING. If not, see | |
19 <http://www.gnu.org/licenses/>. | |
20 | |
21 */ | |
22 | |
23 #if !defined (gl2ps_renderer_h) | |
24 #define gl2ps_renderer_h 1 | |
25 | |
26 #include "gl-render.h" | |
27 #include "gl2ps.h" | |
28 | |
29 class | |
30 OCTINTERP_API | |
31 glps_renderer : public opengl_renderer | |
32 { | |
33 public: | |
34 glps_renderer (FILE *_fp, const std::string& _term) | |
35 : opengl_renderer () , fp (_fp), term (_term), | |
36 fontsize (), fontname () { } | |
37 | |
38 ~glps_renderer (void) { } | |
39 | |
40 void draw (const graphics_object& go); | |
41 | |
42 protected: | |
43 | |
44 Matrix render_text (const std::string& txt, | |
45 double x, double y, double z, | |
46 int halign, int valign, double rotation = 0.0); | |
47 | |
48 | |
49 void set_font (const base_properties& props); | |
50 | |
51 void draw_text (const text::properties& props); | |
52 void draw_pixels (GLsizei w, GLsizei h, GLenum format, | |
53 GLenum type, const GLvoid *data); | |
54 | |
55 void set_linestyle (const std::string& s, bool use_stipple = false) | |
56 { | |
57 opengl_renderer::set_linestyle (s, use_stipple); | |
58 | |
59 if (s == "-" && ! use_stipple) | |
60 gl2psDisable (GL2PS_LINE_STIPPLE); | |
61 else | |
62 gl2psEnable (GL2PS_LINE_STIPPLE); | |
63 } | |
64 | |
65 void set_polygon_offset (bool on, double offset = 0.0) | |
66 { | |
67 opengl_renderer::set_polygon_offset (on, offset); | |
68 if (on) | |
69 gl2psEnable (GL2PS_POLYGON_OFFSET_FILL); | |
70 else | |
71 gl2psDisable (GL2PS_POLYGON_OFFSET_FILL); | |
72 } | |
73 | |
74 void set_linewidth (float w) | |
75 { | |
76 gl2psLineWidth (w); | |
77 } | |
78 | |
79 private: | |
80 int alignment_to_mode (int ha, int va) const; | |
81 FILE *fp; | |
82 caseless_str term; | |
83 double fontsize; | |
84 std::string fontname; | |
85 }; | |
86 | |
87 #endif |