00001 /*---------------------------------------------------------------------+ 00002 | Library QgarLib, graphics analysis and recognition | 00003 | Copyright (C) 2002 Qgar Project, LORIA | 00004 | | 00005 | This library is free software; you can redistribute it and/or | 00006 | modify it under the terms of the GNU Lesser General Public | 00007 | License version 2.1, as published by the Free Software Foundation. | 00008 | | 00009 | This library is distributed in the hope that it will be useful, | 00010 | but WITHOUT ANY WARRANTY; without even the implied warranty of | 00011 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. | 00012 | See the GNU Lesser General Public License for more details. | 00013 | | 00014 | The GNU Lesser General Public License is included in the file | 00015 | LICENSE.LGPL, in the root directory of the Qgar packaging. See | 00016 | http://www.gnu.org/licenses/lgpl.html for the terms of the licence. | 00017 | To receive a paper copy, write to the Free Software Foundation, | 00018 | Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. | 00019 | | 00020 | Contact Project Qgar for any information: | 00021 | LORIA - équipe Qgar | 00022 | B.P. 239, 54506 Vandoeuvre-lès-Nancy Cedex, France | 00023 | email: qgar-contact@loria.fr | 00024 | http://www.qgar.org/ | 00025 *---------------------------------------------------------------------*/ 00026 00027 00028 #ifndef __ABSTRACTGRAPHICSFILE_H_INCLUDED__ 00029 #define __ABSTRACTGRAPHICSFILE_H_INCLUDED__ 00030 00031 00032 /** 00033 * @file AbstractGraphicsFile.H 00034 * @brief Header file of class qgar::AbstractGraphicsFile. 00035 * 00036 * @author <a href="mailto:qgar-develop@loria.fr?subject=Qgar fwd Gerald Masini">Gérald Masini</a> 00037 * @date June, 27 2003 16:21 00038 * @since Qgar 2.1 00039 */ 00040 00041 // For RCS/CVS use: Do not delete 00042 /* $Id: AbstractGraphicsFile.H,v 1.14 2005/07/13 16:29:00 masini Exp $ */ 00043 00044 00045 00046 // QGAR 00047 #include <qgarlib/AbstractFile.H> 00048 #include <qgarlib/ConnectedComponents.H> 00049 #include <qgarlib/primitives.H> 00050 namespace qgar 00051 { 00052 // Avoid #include's when not necessary 00053 template <class T> class AbstractGenPointChain; 00054 template <class T> class GenTreeNode; 00055 class BoundingBox; 00056 } 00057 00058 00059 00060 namespace qgar 00061 { 00062 00063 00064 /** 00065 * @class AbstractGraphicsFile AbstractGraphicsFile.H "qgarlib/AbstractGraphicsFile.H" 00066 * @ingroup IO_FILE 00067 * 00068 * @brief Basic function to read/write graphical and geometrical 00069 * primitives in graphics files like Tgif files, DXF files, etc. 00070 * 00071 * Pure virtual functions are: 00072 * <ul> 00073 * <li>qgar::AbstractGraphicsFile::write(const GenPoint<int>&, int, QGEcolor)</li> 00074 * <li>qgar::AbstractGraphicsFile::write(const GenPoint<float>&, int, QGEcolor)</li> 00075 * <li>qgar::AbstractGraphicsFile::write(const GenPoint<double>&, int, QGEcolor)</li> 00076 * <li>qgar::AbstractGraphicsFile::write(AbstractGenPointChain<int>&, int, QGEcolor)</li> 00077 * <li>qgar::AbstractGraphicsFile::write(AbstractGenPointChain<float>&, int, QGEcolor)</li> 00078 * <li>qgar::AbstractGraphicsFile::write(AbstractGenPointChain<double>&, int, QGEcolor)</li> 00079 * <li>qgar::AbstractGraphicsFile::write(const GenSegment<int>&, int, QGEcolor, QGEoutline)</li> 00080 * <li>qgar::AbstractGraphicsFile::write(const GenSegment<float>&, int, QGEcolor, QGEoutline)</li> 00081 * <li>qgar::AbstractGraphicsFile::write(const GenSegment<double>&, int, QGEcolor, QGEoutline)</li> 00082 * <li>qgar::AbstractGraphicsFile::write(const GenPoint<int>&, double, int, QGEcolor, QGEoutline)</li> 00083 * <li>qgar::AbstractGraphicsFile::write(const GenPoint<float>&, double, int, QGEcolor, QGEoutline)</li> 00084 * <li>qgar::AbstractGraphicsFile::write(const GenPoint<double>&, double, int, QGEcolor, QGEoutline)</li> 00085 * <li>qgar::AbstractGraphicsFile::write(const GenArc<int>&, int, QGEcolor, QGEoutline)</li> 00086 * <li>qgar::AbstractGraphicsFile::write(const GenArc<float>&, int, QGEcolor, QGEoutline)</li> 00087 * <li>qgar::AbstractGraphicsFile::write(const GenArc<double>&, int, QGEcolor, QGEoutline)</li> 00088 * <li>qgar::AbstractGraphicsFile::write(const GenPolyline<int>&, int, QGEcolor, QGEoutline)</li> 00089 * <li>qgar::AbstractGraphicsFile::write(const GenPolyline<float>&, int, QGEcolor, QGEoutline)</li> 00090 * <li>qgar::AbstractGraphicsFile::write(const GenPolyline<double>&, int, QGEcolor, QGEoutline)</li> 00091 * <li>qgar::AbstractGraphicsFile::write(const BoundingBox&, int, QGEcolor, QGEoutline)</li> 00092 * <li>qgar::AbstractGraphicsFile::write(const ConnectedComponents::node_type* const, int, QGEcolor, QGEoutline)</li> 00093 * </ul> 00094 * 00095 * @warning 00096 * <ul> 00097 * <li>This is an abstract class: It cannot be instantiated.</li> 00098 * <li><b>The class is provided with both pure virtual and concrete 00099 * definitions of function qgar::AbstractGraphicsFile::write. 00100 * To get the concrete functions into the scope of a derived class 00101 * which implements the pure virtual functions, a <i>using</i> 00102 * declaration is required in the derived class.</b> 00103 * See class qgar::DxfFile for an example.</li> 00104 * </li> 00105 * 00106 * @author <a href="mailto:qgar-develop@loria.fr?subject=Qgar fwd Gerald Masini">Gerald Masini</a> 00107 * @date June, 27 2003 16:21 00108 * @since Qgar 2.1 00109 */ 00110 class AbstractGraphicsFile 00111 00112 : public AbstractFile 00113 00114 { 00115 // ------------------------------------------------------------------- 00116 // P U B L I C M E M B E R S 00117 // ------------------------------------------------------------------- 00118 public: 00119 00120 /** @name Constructors */ 00121 // ============ 00122 //@{ 00123 00124 /** 00125 * @brief Initialize with given name. 00126 * 00127 * @warning A file must be opened to be used. 00128 */ 00129 AbstractGraphicsFile(const char* aFileName); 00130 00131 //@} 00132 00133 00134 /** @name Destructor */ 00135 // ========== 00136 //@{ 00137 00138 /** 00139 * @brief Virtual destructor. 00140 */ 00141 virtual ~AbstractGraphicsFile(); 00142 00143 //@} 00144 00145 00146 /** @name Points */ 00147 // ====== 00148 //@{ 00149 00150 /** 00151 * @brief Record a point with coordinates of type <b>int</b>. 00152 * 00153 * @param aPt a point 00154 * @param aThickness thickness to be recorded (default <b>3</b>) 00155 * @param aColor color to be recorded (default qgar::QGE_COLOR_DEFAULT) 00156 */ 00157 virtual void write(const GenPoint<int>& aPt, 00158 int aThickness = 3, 00159 QGEcolor aColor = QGE_COLOR_DEFAULT) 00160 = 0; 00161 00162 /** 00163 * @brief Record a point with coordinates of type <b>float</b>. 00164 * 00165 * @param aPt a point 00166 * @param aThickness thickness to be recorded (default <b>3</b>) 00167 * @param aColor color to be recorded (default qgar::QGE_COLOR_DEFAULT) 00168 */ 00169 virtual void write(const GenPoint<float>& aPt, 00170 int aThickness = 3, 00171 QGEcolor aColor = QGE_COLOR_DEFAULT) 00172 = 0; 00173 00174 /** 00175 * @brief Record a point with coordinates of type <b>double</b>. 00176 * 00177 * @param aPt a point 00178 * @param aThickness thickness to be recorded (default <b>3</b>) 00179 * @param aColor color to be recorded (default qgar::QGE_COLOR_DEFAULT) 00180 */ 00181 virtual void write(const GenPoint<double>& aPt, 00182 int aThickness = 3, 00183 QGEcolor aColor = QGE_COLOR_DEFAULT) 00184 = 0; 00185 00186 /** 00187 * @brief Record a chain of points with coordinates of type <b>int</b>. 00188 * 00189 * @param aChain a chain 00190 * @param aThickness thickness to be recorded (default <b>3</b>) 00191 * @param aColor color to be recorded (default qgar::QGE_COLOR_DEFAULT) 00192 * 00193 * @todo 00194 * Parameter <b>aChain</b> cannot be declared <b>const</b> because 00195 * functions qgar::AbstractGenPointChain::setToBegin 00196 * and qgar::AbstractGenPointChain::moveNext are not declared <b>const</b>. 00197 * In particular, their implementation in class qgar::GenLinkedChain modify 00198 * data member 00199 * qgar::GenLinkedChain::_iter, that should be declared as <b>mutable</b>. 00200 */ 00201 virtual void write(AbstractGenPointChain<int>& aChain, 00202 int aThickness = 3, 00203 QGEcolor aColor = QGE_COLOR_DEFAULT) 00204 = 0; 00205 00206 /** 00207 * @brief Record a chain of points with coordinates of type <b>float</b>. 00208 * 00209 * @param aChain a chain 00210 * @param aThickness thickness to be recorded (default <b>3</b>) 00211 * @param aColor color to be recorded (default qgar::QGE_COLOR_DEFAULT) 00212 * 00213 * @todo 00214 * Parameter <b>aChain</b> cannot be declared <b>const</b> because 00215 * functions qgar::AbstractGenPointChain::setToBegin 00216 * and qgar::AbstractGenPointChain::moveNext are not declared <b>const</b>. 00217 * In particular, their implementation in class qgar::GenLinkedChain modify 00218 * data member 00219 * qgar::GenLinkedChain::_iter, that should be declared as <b>mutable</b>. 00220 */ 00221 virtual void write(AbstractGenPointChain<float>& aChain, 00222 int aThickness = 3, 00223 QGEcolor aColor = QGE_COLOR_DEFAULT) 00224 = 0; 00225 00226 /** 00227 * @brief Record a chain of points with coordinates of type <b>double</b>. 00228 * 00229 * @param aChain a chain 00230 * @param aThickness thickness to be recorded (default <b>3</b>) 00231 * @param aColor color to be recorded (default qgar::QGE_COLOR_DEFAULT) 00232 * 00233 * @todo 00234 * Parameter <b>aChain</b> cannot be declared <b>const</b> because 00235 * functions qgar::AbstractGenPointChain::setToBegin 00236 * and qgar::AbstractGenPointChain::moveNext are not declared <b>const</b>. 00237 * In particular, their implementation in class qgar::GenLinkedChain modify 00238 * data member 00239 * qgar::GenLinkedChain::_iter, that should be declared as <b>mutable</b>. 00240 */ 00241 virtual void write(AbstractGenPointChain<double>& aChain, 00242 int aThickness = 3, 00243 QGEcolor aColor = QGE_COLOR_DEFAULT) 00244 = 0; 00245 00246 //@} 00247 00248 00249 /** @name Segments */ 00250 // ======== 00251 //@{ 00252 /** 00253 * @brief Record a geometrical segment with coordinates of type <b>int</b>. 00254 * 00255 * @param aSeg a segment 00256 * @param aThickness thickness to be recorded (default <b>1</b>) 00257 * @param aColor color to be recorded (default qgar::QGE_COLOR_DEFAULT) 00258 * @param anOutline outline to be recorded (default qgar::QGE_OUTLINE_DEFAULT) 00259 */ 00260 virtual void write(const GenSegment<int>& aSeg, 00261 int aThickness = 1, 00262 QGEcolor aColor = QGE_COLOR_DEFAULT, 00263 QGEoutline anOutline = QGE_OUTLINE_DEFAULT) 00264 = 0; 00265 00266 /** 00267 * @brief Record a geometrical segment with coordinates of type <b>float</b>. 00268 * 00269 * @param aSeg a segment 00270 * @param aThickness thickness to be recorded (default <b>1</b>) 00271 * @param aColor color to be recorded (default qgar::QGE_COLOR_DEFAULT) 00272 * @param anOutline outline to be recorded (default qgar::QGE_OUTLINE_DEFAULT) 00273 */ 00274 virtual void write(const GenSegment<float>& aSeg, 00275 int aThickness = 1, 00276 QGEcolor aColor = QGE_COLOR_DEFAULT, 00277 QGEoutline anOutline = QGE_OUTLINE_DEFAULT) 00278 = 0; 00279 00280 /** 00281 * @brief Record a geometrical segment with coordinates of type <b>double</b>. 00282 * 00283 * @param aSeg a segment 00284 * @param aThickness thickness to be recorded (default <b>1</b>) 00285 * @param aColor color to be recorded (default qgar::QGE_COLOR_DEFAULT) 00286 * @param anOutline outline to be recorded (default qgar::QGE_OUTLINE_DEFAULT) 00287 */ 00288 virtual void write(const GenSegment<double>& aSeg, 00289 int aThickness = 1, 00290 QGEcolor aColor = QGE_COLOR_DEFAULT, 00291 QGEoutline anOutline = QGE_OUTLINE_DEFAULT) 00292 = 0; 00293 00294 /** 00295 * @brief Record a Qgar segment with coordinates of type <b>int</b>. 00296 * 00297 * @param aQSeg a Qgar segment 00298 * @param aThickness thickness to be recorded (default <b>-1</b>, i.e. current) 00299 * @param aColor color to be recorded (default qgar::QGE_COLOR_NONE, i.e. current) 00300 * @param anOutline outline to be recorded (default qgar::QGE_OUTLINE_NONE, i.e. current) 00301 */ 00302 void write(const GenQgarSegment<int>& aQSeg, 00303 int aThickness = -1, 00304 QGEcolor aColor = QGE_COLOR_NONE, 00305 QGEoutline anOutline = QGE_OUTLINE_NONE); 00306 00307 /** 00308 * @brief Record a Qgar segment with coordinates of type <b>float</b>. 00309 * 00310 * @param aQSeg a Qgar segment 00311 * @param aThickness thickness to be recorded (default <b>-1</b>, i.e. current) 00312 * @param aColor color to be recorded (default qgar::QGE_COLOR_NONE, i.e. current) 00313 * @param anOutline outline to be recorded (default qgar::QGE_OUTLINE_NONE, i.e. current) 00314 */ 00315 void write(const GenQgarSegment<float>& aQSeg, 00316 int aThickness = -1, 00317 QGEcolor aColor = QGE_COLOR_NONE, 00318 QGEoutline anOutline = QGE_OUTLINE_NONE); 00319 00320 /** 00321 * @brief Record a Qgar segment with coordinates of type <b>double</b>. 00322 * 00323 * @param aQSeg a Qgar segment 00324 * @param aThickness thickness to be recorded (default <b>-1</b>, i.e. current) 00325 * @param aColor color to be recorded (default qgar::QGE_COLOR_NONE, i.e. current) 00326 * @param anOutline outline to be recorded (default qgar::QGE_OUTLINE_NONE, i.e. current) 00327 */ 00328 void write(const GenQgarSegment<double>& aQSeg, 00329 int aThickness = -1, 00330 QGEcolor aColor = QGE_COLOR_NONE, 00331 QGEoutline anOutline = QGE_OUTLINE_NONE); 00332 00333 //@} 00334 00335 00336 /** @name Circles and arcs of circle */ 00337 // ========================== 00338 //@{ 00339 00340 /** 00341 * @brief Record a circle with coordinates of type <b>int</b>. 00342 * 00343 * @param aCentre centre of the circle 00344 * @param aRadius radius of the circle 00345 * @param aThickness thickness (default <b>1</b>) 00346 * @param aColor color (default qgar::QGE_COLOR_DEFAULT) 00347 * @param anOutline outline to be recorded (default qgar::QGE_OUTLINE_DEFAULT) 00348 */ 00349 virtual void write(const GenPoint<int>& aCentre, 00350 double aRadius, 00351 int aThickness = 1, 00352 QGEcolor aColor = QGE_COLOR_DEFAULT, 00353 QGEoutline anOutline = QGE_OUTLINE_DEFAULT) 00354 = 0; 00355 00356 /** 00357 * @brief Record a circle with coordinates of type <b>float</b>. 00358 * 00359 * @param aCentre centre of the circle 00360 * @param aRadius radius of the circle 00361 * @param aThickness thickness (default <b>1</b>) 00362 * @param aColor color (default qgar::QGE_COLOR_DEFAULT) 00363 * @param anOutline outline to be recorded (default qgar::QGE_OUTLINE_DEFAULT) 00364 */ 00365 virtual void write(const GenPoint<float>& aCentre, 00366 double aRadius, 00367 int aThickness = 1, 00368 QGEcolor aColor = QGE_COLOR_DEFAULT, 00369 QGEoutline anOutline = QGE_OUTLINE_DEFAULT) 00370 = 0; 00371 00372 /** 00373 * @brief Record a circle with coordinates of type <b>double</b>. 00374 * 00375 * @param aCentre centre of the circle 00376 * @param aRadius radius of the circle 00377 * @param aThickness thickness (default <b>1</b>) 00378 * @param aColor color (default qgar::QGE_COLOR_DEFAULT) 00379 * @param anOutline outline to be recorded (default qgar::QGE_OUTLINE_DEFAULT) 00380 */ 00381 virtual void write(const GenPoint<double>& aCentre, 00382 double aRadius, 00383 int aThickness = 1, 00384 QGEcolor aColor = QGE_COLOR_DEFAULT, 00385 QGEoutline anOutline = QGE_OUTLINE_DEFAULT) 00386 = 0; 00387 00388 /** 00389 * @brief Record a geometrical arc with coordinates of type <b>int</b>. 00390 * 00391 * @param anArc a segment 00392 * @param aThickness thickness to be recorded (default <b>1</b>) 00393 * @param aColor color to be recorded (default qgar::QGE_COLOR_DEFAULT) 00394 * @param anOutline outline to be recorded (default qgar::QGE_OUTLINE_DEFAULT) 00395 */ 00396 virtual void write(const GenArc<int>& anArc, 00397 int aThickness = 1, 00398 QGEcolor aColor = QGE_COLOR_DEFAULT, 00399 QGEoutline anOutline = QGE_OUTLINE_DEFAULT) 00400 = 0; 00401 00402 /** 00403 * @brief Record a geometrical arc with coordinates of type <b>float</b>. 00404 * 00405 * @param anArc a segment 00406 * @param aThickness thickness to be recorded (default <b>1</b>) 00407 * @param aColor color to be recorded (default qgar::QGE_COLOR_DEFAULT) 00408 * @param anOutline outline to be recorded (default qgar::QGE_OUTLINE_DEFAULT) 00409 */ 00410 virtual void write(const GenArc<float>& anArc, 00411 int aThickness = 1, 00412 QGEcolor aColor = QGE_COLOR_DEFAULT, 00413 QGEoutline anOutline = QGE_OUTLINE_DEFAULT) 00414 = 0; 00415 00416 /** 00417 * @brief Record a geometrical arc with coordinates of type <b>double</b>. 00418 * 00419 * @param anArc a segment 00420 * @param aThickness thickness to be recorded (default <b>1</b>) 00421 * @param aColor color to be recorded (default qgar::QGE_COLOR_DEFAULT) 00422 * @param anOutline outline to be recorded (default qgar::QGE_OUTLINE_DEFAULT) 00423 */ 00424 virtual void write(const GenArc<double>& anArc, 00425 int aThickness = 1, 00426 QGEcolor aColor = QGE_COLOR_DEFAULT, 00427 QGEoutline anOutline = QGE_OUTLINE_DEFAULT) 00428 = 0; 00429 00430 /** 00431 * @brief Record a Qgar arc with coordinates of type <b>int</b>. 00432 * 00433 * @param aQArc a Qgar arc 00434 * @param aThickness thickness to be recorded (default <b>-1</b>, i.e. current) 00435 * @param aColor color to be recorded (default qgar::QGE_COLOR_NONE, i.e. current) 00436 * @param anOutline outline to be recorded (default qgar::QGE_OUTLINE_NONE, i.e. current) 00437 */ 00438 void write(const GenQgarArc<int>& aQArc, 00439 int aThickness = -1, 00440 QGEcolor aColor = QGE_COLOR_NONE, 00441 QGEoutline anOutline = QGE_OUTLINE_NONE); 00442 00443 /** 00444 * @brief Record a Qgar arc with coordinates of type <b>float</b>. 00445 * 00446 * @param aQArc a Qgar arc 00447 * @param aThickness thickness to be recorded (default <b>-1</b>, i.e. current) 00448 * @param aColor color to be recorded (default qgar::QGE_COLOR_NONE, i.e. current) 00449 * @param anOutline outline to be recorded (default qgar::QGE_OUTLINE_NONE, i.e. current) 00450 */ 00451 void write(const GenQgarArc<float>& aQArc, 00452 int aThickness = -1, 00453 QGEcolor aColor = QGE_COLOR_NONE, 00454 QGEoutline anOutline = QGE_OUTLINE_NONE); 00455 00456 /** 00457 * @brief Record a Qgar arc with coordinates of type <b>double</b>. 00458 * 00459 * @param aQArc a Qgar arc 00460 * @param aThickness thickness to be recorded (default <b>-1</b>, i.e. current) 00461 * @param aColor color to be recorded (default qgar::QGE_COLOR_NONE, i.e. current) 00462 * @param anOutline outline to be recorded (default qgar::QGE_OUTLINE_NONE, i.e. current) 00463 */ 00464 void write(const GenQgarArc<double>& aQArc, 00465 int aThickness = -1, 00466 QGEcolor aColor = QGE_COLOR_NONE, 00467 QGEoutline anOutline = QGE_OUTLINE_NONE); 00468 00469 //@} 00470 00471 00472 /** @name Polylines */ 00473 // ========= 00474 //@{ 00475 00476 /** 00477 * @brief Record a geometrical polyline with coordinates of type <b>int</b>. 00478 * 00479 * @param aPoly a polyline 00480 * @param aThickness thickness to be recorded (default <b>1</b>) 00481 * @param aColor color to be recorded (default qgar::QGE_COLOR_DEFAULT) 00482 * @param anOutline outline to be recorded (default qgar::QGE_OUTLINE_DEFAULT) 00483 */ 00484 virtual void write(const GenPolyline<int>& aPoly, 00485 int aThickness = 1, 00486 QGEcolor aColor = QGE_COLOR_DEFAULT, 00487 QGEoutline anOutline = QGE_OUTLINE_DEFAULT) 00488 = 0; 00489 00490 /** 00491 * @brief Record a geometrical polyline with coordinates of type <b>float</b>. 00492 * 00493 * @param aPoly a polyline 00494 * @param aThickness thickness to be recorded (default <b>1</b>) 00495 * @param aColor color to be recorded (default qgar::QGE_COLOR_DEFAULT) 00496 * @param anOutline outline to be recorded (default qgar::QGE_OUTLINE_DEFAULT) 00497 */ 00498 virtual void write(const GenPolyline<float>& aPoly, 00499 int aThickness = 1, 00500 QGEcolor aColor = QGE_COLOR_DEFAULT, 00501 QGEoutline anOutline = QGE_OUTLINE_DEFAULT) 00502 = 0; 00503 00504 /** 00505 * @brief Record a geometrical polyline with coordinates of type <b>double</b>. 00506 * 00507 * @param aPoly a polyline 00508 * @param aThickness thickness to be recorded (default <b>1</b>) 00509 * @param aColor color to be recorded (default qgar::QGE_COLOR_DEFAULT) 00510 * @param anOutline outline to be recorded (default qgar::QGE_OUTLINE_DEFAULT) 00511 */ 00512 virtual void write(const GenPolyline<double>& aPoly, 00513 int aThickness = 1, 00514 QGEcolor aColor = QGE_COLOR_DEFAULT, 00515 QGEoutline anOutline = QGE_OUTLINE_DEFAULT) 00516 = 0; 00517 00518 /** 00519 * @brief Record a Qgar polyline with coordinates of type <b>int</b>. 00520 * 00521 * @param aQPoly a Qgar polyline 00522 * @param aThickness thickness to be recorded (default <b>-1</b>, i.e. current) 00523 * @param aColor color to be recorded (default qgar::QGE_COLOR_NONE, i.e. current) 00524 * @param anOutline outline to be recorded (default qgar::QGE_OUTLINE_NONE, i.e. current) 00525 */ 00526 void write(const GenQgarPolyline<int>& aQPoly, 00527 int aThickness = -1, 00528 QGEcolor aColor = QGE_COLOR_NONE, 00529 QGEoutline anOutline = QGE_OUTLINE_NONE); 00530 00531 /** 00532 * @brief Record a Qgar polyline with coordinates of type <b>float</b>. 00533 * 00534 * @param aQPoly a Qgar polyline 00535 * @param aThickness thickness to be recorded (default <b>-1</b>, i.e. current) 00536 * @param aColor color to be recorded (default qgar::QGE_COLOR_NONE, i.e. current) 00537 * @param anOutline outline to be recorded (default qgar::QGE_OUTLINE_NONE, i.e. current) 00538 */ 00539 void write(const GenQgarPolyline<float>& aQPoly, 00540 int aThickness = -1, 00541 QGEcolor aColor = QGE_COLOR_NONE, 00542 QGEoutline anOutline = QGE_OUTLINE_NONE); 00543 00544 /** 00545 * @brief Record a Qgar polyline with coordinates of type <b>double</b>. 00546 * 00547 * @param aQPoly a Qgar polyline 00548 * @param aThickness thickness to be recorded (default <b>-1</b>, i.e. current) 00549 * @param aColor color to be recorded (default qgar::QGE_COLOR_NONE, i.e. current) 00550 * @param anOutline outline to be recorded (default qgar::QGE_OUTLINE_NONE, i.e. current) 00551 */ 00552 void write(const GenQgarPolyline<double>& aQPoly, 00553 int aThickness = -1, 00554 QGEcolor aColor = QGE_COLOR_NONE, 00555 QGEoutline anOutline = QGE_OUTLINE_NONE); 00556 //@} 00557 00558 00559 /** @name Bounding Boxes */ 00560 // ============== 00561 //@{ 00562 00563 /** 00564 * @brief Record a bounding box 00565 * @param aBox a bounding box with coordinates of type <b>int</b>. 00566 * 00567 * @param aThickness thickness to be recorded (default <b>1</b>) 00568 * @param aColor color to be recorded (default qgar::QGE_COLOR_DEFAULT) 00569 * @param anOutline outline to be recorded (default qgar::QGE_OUTLINE_DEFAULT) 00570 */ 00571 virtual void write(const BoundingBox& aBox, 00572 int aThickness = 1, 00573 QGEcolor aColor = QGE_COLOR_DEFAULT, 00574 QGEoutline anOutline = QGE_OUTLINE_DEFAULT) 00575 = 0; 00576 00577 //@} 00578 00579 00580 /** @name Components */ 00581 // ========== 00582 //@{ 00583 00584 /** 00585 * @brief Record a (connected) component. 00586 * 00587 * A component is represented by its contour and the contours 00588 * of included components. 00589 * 00590 * @param aPNode pointer to the node of the component tree 00591 * including the component 00592 * @param aThickness thickness to be recorded (default <b>1</b>) 00593 * @param aColor color to be recorded (default qgar::QGE_COLOR_DEFAULT) 00594 * @param anOutline outline to be recorded (default qgar::QGE_OUTLINE_DEFAULT) 00595 */ 00596 virtual void write(const ConnectedComponents::node_type* const aPNode, 00597 int aThickness = 1, 00598 QGEcolor aColor = QGE_COLOR_DEFAULT, 00599 QGEoutline anOutline = QGE_OUTLINE_DEFAULT) 00600 = 0; 00601 00602 //@} 00603 00604 00605 // ------------------------------------------------------------------- 00606 }; // class AbstractGraphicsFile 00607 00608 00609 } // namespace qgar 00610 00611 00612 #endif /* __ABSTRACTGRAPHICSFILE_H_INCLUDED__ */