1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
5 * Copyright 2008 by Sun Microsystems, Inc.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * $RCSfile: testtools.hxx,v $
12 * This file is part of OpenOffice.org.
14 * OpenOffice.org is free software: you can redistribute it and/or modify
15 * it under the terms of the GNU Lesser General Public License version 3
16 * only, as published by the Free Software Foundation.
18 * OpenOffice.org is distributed in the hope that it will be useful,
19 * but WITHOUT ANY WARRANTY; without even the implied warranty of
20 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 * GNU Lesser General Public License version 3 for more details
22 * (a copy is included in the LICENSE file that accompanied this code).
24 * You should have received a copy of the GNU Lesser General Public License
25 * version 3 along with OpenOffice.org. If not, see
26 * <http://www.openoffice.org/license.html>
27 * for a copy of the LGPLv3 License.
29 ************************************************************************/
31 #ifndef _BASEGFX_TESTTOOLS_HXX
32 #define _BASEGFX_TESTTOOLS_HXX
34 #include <basegfx/point/b2dpoint.hxx>
52 /** Create a plotter for the given output stream
54 This class can be used to generate gnuplot scripts for
55 a number of basegfx graphics primitives, useful for
56 debugging, regression-testing and comparing basegfx.
58 Plotter( ::std::ostream
& rOutputStream
);
60 /** Delete the plotter
62 This implicitely flushes all potential pending writes
67 /** Plot a 2d polygon into the current graph
69 void plot( const B2DPolygon
& rPoly
);
71 /** Plot a 2d polyPolygon into the current graph
73 void plot( const B2DPolyPolygon
& rPolyPoly
);
75 /** Plot a 2d point into the current graph
77 void plot( const B2DPoint
& rPoint
);
79 /** Plot a 2d rectangle into the current graph
81 void plot( const B2DRange
& rRect
);
83 /** Plot a 2d line into the current graph
85 void plot( const B2DPoint
& rStartPoint
, const B2DPoint
& rEndPoint
);
87 /** Plot a 2d cubic bezier curve into the current graph
89 void plot( const B2DCubicBezier
& rCurve
);
92 void writeSeparator();
94 ::std::ostream
& mrOutputStream
;
95 ::std::vector
< B2DPoint
> maPoints
;
101 #endif /* _BASEGFX_TESTTOOLS_HXX */