diff options
author | Korrawit Pruegsanusak <detective.conan.1412@gmail.com> | 2012-02-08 21:02:18 +0700 |
---|---|---|
committer | Korrawit Pruegsanusak <detective.conan.1412@gmail.com> | 2012-02-08 21:06:51 +0700 |
commit | a330f38093e2643a26239557050561afae9ff23d (patch) | |
tree | e31e00f724c06eeeba35ea649e1dbab959fb5ec8 | |
parent | 344ebc80330cc4f6ff9858ab6d06735568b87bf9 (diff) |
Recover some methods needed by windows directx
This partially reverts b3c3e116ff0eb9b550b73d3901395c042e31d192
-rw-r--r-- | basegfx/inc/basegfx/range/b2drange.hxx | 6 | ||||
-rw-r--r-- | basegfx/inc/basegfx/tools/unopolypolygon.hxx | 3 | ||||
-rw-r--r-- | basegfx/source/range/b2drange.cxx | 7 | ||||
-rw-r--r-- | basegfx/source/tools/unopolypolygon.cxx | 5 |
4 files changed, 21 insertions, 0 deletions
diff --git a/basegfx/inc/basegfx/range/b2drange.hxx b/basegfx/inc/basegfx/range/b2drange.hxx index 7d7edb05c654..b8a51aeb8800 100644 --- a/basegfx/inc/basegfx/range/b2drange.hxx +++ b/basegfx/inc/basegfx/range/b2drange.hxx @@ -292,6 +292,12 @@ namespace basegfx MyBasicRange maRangeY; }; + /** Round double to nearest integer for 2D range + + @return the nearest integer for this range + */ + BASEGFX_DLLPUBLIC B2IRange fround(const B2DRange& rRange); + /** Compute the set difference of the two given ranges This method calculates the symmetric difference (aka XOR) diff --git a/basegfx/inc/basegfx/tools/unopolypolygon.hxx b/basegfx/inc/basegfx/tools/unopolypolygon.hxx index 558ab7ea4c43..ca04b7a5f776 100644 --- a/basegfx/inc/basegfx/tools/unopolypolygon.hxx +++ b/basegfx/inc/basegfx/tools/unopolypolygon.hxx @@ -95,6 +95,9 @@ namespace unotools sal_Int32 nPointIndex, sal_Int32 nNumberOfPoints ) const; + /// Get cow copy of internal polygon. not thread-safe outside this object. + B2DPolyPolygon getPolyPolygonUnsafe() const; + /// Called whenever internal polypolygon gets modified virtual void modifying() const {} diff --git a/basegfx/source/range/b2drange.cxx b/basegfx/source/range/b2drange.cxx index 5884b7e564f4..2da38ce2dbc3 100644 --- a/basegfx/source/range/b2drange.cxx +++ b/basegfx/source/range/b2drange.cxx @@ -60,6 +60,13 @@ namespace basegfx } } + B2IRange fround(const B2DRange& rRange) + { + return rRange.isEmpty() ? + B2IRange() : + B2IRange(fround(rRange.getMinimum()), + fround(rRange.getMaximum())); + } } // end of namespace basegfx // eof diff --git a/basegfx/source/tools/unopolypolygon.cxx b/basegfx/source/tools/unopolypolygon.cxx index 2ffaabd149c4..80203c2587bc 100644 --- a/basegfx/source/tools/unopolypolygon.cxx +++ b/basegfx/source/tools/unopolypolygon.cxx @@ -445,6 +445,11 @@ namespace unotools return aSubsetPoly; } + B2DPolyPolygon UnoPolyPolygon::getPolyPolygonUnsafe() const + { + return maPolyPoly; + } + #define IMPLEMENTATION_NAME "gfx::internal::UnoPolyPolygon" #define SERVICE_NAME "com.sun.star.rendering.PolyPolygon2D" ::rtl::OUString SAL_CALL UnoPolyPolygon::getImplementationName() throw( uno::RuntimeException ) |