summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorRadek Doulik <rodo@novell.com>2012-01-12 11:06:11 +0100
committerRadek Doulik <rodo@novell.com>2012-01-12 11:16:59 +0100
commite4cd111fae5f9b781471d4150915bb189eff90ef (patch)
tree899d9a6d026d3bc4adc8f1d24224feca9531967e /tools
parentc99e8165043041d1989c7d9ad47e89b40af00a56 (diff)
make it possible to create 360 degrees arc (circle)
Diffstat (limited to 'tools')
-rw-r--r--tools/inc/tools/poly.hxx3
-rw-r--r--tools/source/generic/poly.cxx5
2 files changed, 6 insertions, 2 deletions
diff --git a/tools/inc/tools/poly.hxx b/tools/inc/tools/poly.hxx
index 592326658558..480b357f14d5 100644
--- a/tools/inc/tools/poly.hxx
+++ b/tools/inc/tools/poly.hxx
@@ -140,7 +140,8 @@ public:
sal_uInt16 nPoints = 0 );
Polygon( const Rectangle& rBound,
const Point& rStart, const Point& rEnd,
- PolyStyle ePolyStyle = POLY_ARC );
+ PolyStyle ePolyStyle = POLY_ARC,
+ sal_Bool bWholeCircle = sal_False );
Polygon( const Point& rBezPt1, const Point& rCtrlPt1,
const Point& rBezPt2, const Point& rCtrlPt2,
sal_uInt16 nPoints = 0 );
diff --git a/tools/source/generic/poly.cxx b/tools/source/generic/poly.cxx
index f062b9e61185..14b34d33fcb9 100644
--- a/tools/source/generic/poly.cxx
+++ b/tools/source/generic/poly.cxx
@@ -510,7 +510,7 @@ Polygon::Polygon( const Point& rCenter, long nRadX, long nRadY, sal_uInt16 nPoin
// -----------------------------------------------------------------------
Polygon::Polygon( const Rectangle& rBound,
- const Point& rStart, const Point& rEnd, PolyStyle eStyle )
+ const Point& rStart, const Point& rEnd, PolyStyle eStyle, sal_Bool bFullCircle )
{
DBG_CTOR( Polygon, NULL );
@@ -547,6 +547,9 @@ Polygon::Polygon( const Rectangle& rBound,
if( fDiff < 0. )
fDiff += F_2PI;
+ if ( bFullCircle )
+ fDiff = F_2PI;
+
// Punktanzahl proportional verkleinern ( fDiff / (2PI) );
// ist eingentlich nur fuer einen Kreis richtig; wir
// machen es hier aber trotzdem