diff options
author | Radek Doulik <rodo@novell.com> | 2012-01-12 11:06:11 +0100 |
---|---|---|
committer | Radek Doulik <rodo@novell.com> | 2012-01-12 11:13:18 +0100 |
commit | 72c50c235447f293a3772105fdfdd4f45d09ff9e (patch) | |
tree | fa08ae30ec588094815fdfdd8496650c99f74cd8 /tools | |
parent | 41320291f7a2327447596ff4d66098ccf1bdacfb (diff) |
make it possible to create 360 degrees arc (circle)
Diffstat (limited to 'tools')
-rw-r--r-- | tools/inc/tools/poly.hxx | 3 | ||||
-rw-r--r-- | tools/source/generic/poly.cxx | 5 |
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 fa2d1f5ae8cc..8c64a9f55246 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 |