QWT API (中文) 7.3.0
Qt绘图库 - 中文API文档
载入中...
搜索中...
未找到
qwt3d_io_gl2ps.h
1#ifndef QWT3D_IO_GL2PS_H
2#define QWT3D_IO_GL2PS_H
3
4#include <ctime>
5
6#include "qwt3d_types.h"
7#include "qwt3d_io.h"
8
9namespace Qwt3D
10{
11
17class QWT3D_EXPORT VectorWriter : public IO::Functor
18{
19 friend class IO;
20 QWT_DECLARE_PRIVATE(VectorWriter)
21
22public:
23 // The possible output formats for the text parts of the scene
24 enum TEXTMODE
25 {
26 PIXEL,
27 NATIVE,
28 TEX
29 };
30
31 // The possible behaviour for landscape settings
32 enum LANDSCAPEMODE
33 {
34 ON,
35 OFF,
36 AUTO
37 };
38
39 // The possible sorting types which are translated in gl2ps types
40 enum SORTMODE
41 {
42 NOSORT,
43 SIMPLESORT,
44 BSPSORT
45 };
46
48 ~VectorWriter() override;
49
50 // Sets landscape mode
51 void setLandscape(LANDSCAPEMODE val);
52 // Returns the current landscape mode
53 LANDSCAPEMODE landscape() const;
54
55 void setTextMode(TEXTMODE val, QString fname = "");
56 // Return current text output mode
57 TEXTMODE textMode() const;
58
59 // Sets one of the SORTMODE sorting modes
60 void setSortMode(SORTMODE val);
61 // Returns gl2ps sorting type
62 SORTMODE sortMode() const;
63 // Turns compressed output on or off (no effect if zlib support is not available)
64 void setCompressed(bool val);
65 // Returns compression mode (always false if zlib support has not been set)
66 bool compressed() const;
67
68 bool setFormat(QString const& format);
69
70private:
71 IO::Functor* clone() const override;
72 bool operator()(Plot3D* plot, QString const& fname) override;
73};
74
75GLint setDeviceLineWidth(GLfloat val);
76GLint setDevicePointSize(GLfloat val);
77GLint drawDevicePixels(GLsizei width, GLsizei height, GLenum format, GLenum type, const void* pixels);
78GLint drawDeviceText(const char* str,
79 const char* fontname,
80 int fontsize,
81 Qwt3D::Triple pos,
82 Qwt3D::RGBA rgba,
83 Qwt3D::ANCHOR align,
84 double gap);
85void setDevicePolygonOffset(GLfloat factor, GLfloat units);
86
87} // ns
88
89#endif // QWT3D_IO_GL2PS_H
Functor class for more flexible IO handler implementation
Definition qwt3d_io.h:36
Generic interface for standard and user written I/O handlers
Definition qwt3d_io.h:24
Base class for all plotting widgets
Definition qwt3d_plot.h:22
Provides EPS, PS, PDF, SVG, PGF and TeX output
Definition qwt3d_io_gl2ps.h:18
Red-Green-Blue-Alpha value
Definition qwt3d_types.h:364
Triple [x,y,z]
Definition qwt3d_types.h:170