mirror of https://github.com/CGAL/cgal
157 lines
7.6 KiB
Plaintext
157 lines
7.6 KiB
Plaintext
FUNNELWEB LISTING FILE
|
|
======================
|
|
|
|
|
|
Global Local| Input File
|
|
------------+-------------------------------------------------------------------
|
|
.................
|
|
29 29| We provide a Postscript output for all geometric classes
|
|
30 30| of \cgal. Thanks to this stream, you will be able to create file printable
|
|
31 31| or a file you will be able to insert in Latex documents. Indeed the generate
|
|
Warning|.............................................................................^Line has trailing spaces up to and including this space.
|
|
32 32| output file can be an EPSF file.
|
|
33 33|
|
|
.................
|
|
43 43|
|
|
44 44| typedef const char *DashStyle;
|
|
45 45|
|
|
Warning|......^Line has trailing spaces up to and including this space.
|
|
46 46| class CGAL_PS_Stream {
|
|
47 47| public:
|
|
48 48|
|
|
Warning|..^Line has trailing spaces up to and including this space.
|
|
49 49| typedef CGAL_Bbox_2 PS_BBox;
|
|
50 50|
|
|
.................
|
|
59 59| static const float INCH;
|
|
60 60| static const float POINT;
|
|
61 61|
|
|
Warning|..^Line has trailing spaces up to and including this space.
|
|
62 62| enum OutputMode {READABLE, QUIET, READABLE_EPS, QUIET_EPS, GS_VIEW};
|
|
63 63| enum DotStyle {NONE, XCROSS, ICROSS, EDOT, FDOT, EBOX, FBOX};
|
|
64 64|
|
|
Warning|..^Line has trailing spaces up to and including this space.
|
|
65 65| @}
|
|
66 66|
|
|
.................
|
|
114 114| friend CGAL_PS_Stream;
|
|
115 115| friend CGAL_PS_Stream &operator<<(CGAL_PS_Stream &ps, const Grid &g);
|
|
116 116|
|
|
Warning|......^Line has trailing spaces up to and including this space.
|
|
117 117| public:
|
|
118 118| Grid(double x, double y, DashStyle str="[1 5] 0")
|
|
.................
|
|
138 138| You have just to define a Label object and insert it in the stream
|
|
139 139| to display the string in the postscript output. Default font and
|
|
140 140| size is used to display texts but you are able to change this using the
|
|
Warning|........................................................................^Line has trailing spaces up to and including this space.
|
|
141 141| modifiers of the stream.
|
|
142 142| @$@<class CGAL_PS_Stream@>+=@{@-
|
|
.................
|
|
161 161| {$\alpha^{y}_{i}$}
|
|
162 162| \end{verbatim}
|
|
163 163|
|
|
Warning|..^Line has trailing spaces up to and including this space.
|
|
164 164| These labels wont be displayed on a gs view but only with latex.
|
|
165 165| To include such a file you have to type ("toto.ps" is the file in which
|
|
166 166| the Postscript output of CGAL had been redirected) :
|
|
Warning|.....................................................^Line has trailing spaces up to and including this space.
|
|
167 167| \begin{verbatim}
|
|
168 168|
|
|
Warning|......^Line has trailing spaces up to and including this space.
|
|
169 169| \documentclass[]{article}
|
|
170 170| \begin{document}
|
|
.................
|
|
177 177| \Ipe{toto.ps}
|
|
178 178| \end{center}
|
|
179 179| \end{figure*}
|
|
Warning|..............^Line has trailing spaces up to and including this space.
|
|
180 180|
|
|
181 181| after.
|
|
182 182|
|
|
183 183| \end{document}
|
|
Warning|...............^Line has trailing spaces up to and including this space.
|
|
184 184|
|
|
185 185| \end{verbatim}
|
|
186 186|
|
|
Warning|......^Line has trailing spaces up to and including this space.
|
|
187 187| @$@<class CGAL_PS_Stream@>+=@{@-
|
|
188 188|
|
|
Warning|......^Line has trailing spaces up to and including this space.
|
|
189 189| class Latex_Label {
|
|
190 190| friend CGAL_PS_Stream;
|
|
.................
|
|
341 341| of real objects represented in the postscript view.
|
|
342 342|
|
|
343 343| In this coonstructors, the whole page is used,
|
|
Warning|...............................................^Line has trailing spaces up to and including this space.
|
|
344 344| the bounding box is defined by bb.
|
|
345 345|
|
|
.................
|
|
424 424| int height() const {return _height;}
|
|
425 425| OutputMode mode() const {return _mode;}
|
|
426 426|
|
|
Warning|......^Line has trailing spaces up to and including this space.
|
|
427 427| // Utils
|
|
428 428| double xratio() { return _xratio;}
|
|
.................
|
|
585 585| };
|
|
586 586|
|
|
587 587| */
|
|
Warning|....^Line has trailing spaces up to and including this space.
|
|
588 588|
|
|
589 589| @}
|
|
.................
|
|
608 608| CGAL_PS_Stream::CGAL_PS_Stream(const PS_BBox &bb, const char *fname,
|
|
609 609| OutputMode mode)
|
|
610 610| : _bbox(bb),_mode(mode),_width((int)21*CM), _height((int)29.7*CM),_os(cerr)
|
|
Warning|..............................................................................^Line has trailing spaces up to and including this space.
|
|
611 611| {
|
|
612 612| _xratio=_width/(_bbox.xmax()-_bbox.xmin());
|
|
.................
|
|
668 668| The destructor insert all the latex instruction if needed.
|
|
669 669| Then, it inserts all the latex labels, and finaly it closes the stream.
|
|
670 670|
|
|
Warning|......^Line has trailing spaces up to and including this space.
|
|
671 671| @$@<Constructors and Destructors@>+=@{@-
|
|
672 672| CGAL_PS_Stream::~CGAL_PS_Stream()
|
|
.................
|
|
692 692| while (!tmp.empty())
|
|
693 693| {
|
|
694 694| os() << "%%\\put(" << tmp.front().xpos()
|
|
Warning|...................................................^Line has trailing spaces up to and including this space.
|
|
695 695| << "," <<tmp.front().ypos()
|
|
Warning|...........................................^Line has trailing spaces up to and including this space.
|
|
696 696| <<"){\\IPEtext{\\IPEfs{10}\\rm "<< tmp.front().text()
|
|
Warning|.....................................................................^Line has trailing spaces up to and including this space.
|
|
697 697| <<" }}" << endl;
|
|
698 698| tmp.pop_front();
|
|
.................
|
|
928 928| Manipulators allow to influence the state of the stream. They permit
|
|
929 929| to change the color, the line width, the line style, the size and the style
|
|
930 930| of the dot when we draw a point, to instert label in the stream,
|
|
Warning|.................................................................^Line has trailing spaces up to and including this space.
|
|
931 931| to set the font of the text and its size.
|
|
932 932|
|
|
933 933| From an implementation point of view there are different solutions.
|
|
934 934| We use a class defining pointers on member fonctions.
|
|
Warning|.......................................................^Line has trailing spaces up to and including this space.
|
|
935 935| This is the definition of member function called when a modifier is
|
|
Warning|....................................................................^Line has trailing spaces up to and including this space.
|
|
936 936| inserted in the stream.
|
|
937 937|
|
|
.................
|
|
1112 1112| //os() << "%% CGAL - LATEX : " << x2ps(context().get_pos().x()) << " "
|
|
1113 1113| // << y2ps(context().get_pos().y()) << " " << ch << endl;
|
|
1114 1114|
|
|
Warning|..^Line has trailing spaces up to and including this space.
|
|
1115 1115| return *this;
|
|
1116 1116| }
|
|
.................
|
|
------------+-------------------------------------------------------------------
|
|
|
|
Tangle: Completed ../include/CGAL/IO/Postscript_stream.h.
|
|
Tangle: Completed ../src/Postscript_stream.C.
|
|
|
|
There were 26 Warnings.
|