diff options
author | Thorsten Behrens <tbehrens@suse.com> | 2012-01-31 00:52:50 +0100 |
---|---|---|
committer | Thorsten Behrens <tbehrens@suse.com> | 2013-10-07 17:33:45 +0200 |
commit | 3e2dba1accbd018f7dac362a2636bed135f1b5bb (patch) | |
tree | f9999b443935eb2f11f8655713f0a47af569cfc1 /include/basegfx/tools | |
parent | 60ff4fa99654e9c2ad9a9b023dae0ccda75d7d95 (diff) |
Add 7-segment display polygon generator to basegfx.
Basegfx gets a basegfx::tools::number2PolyPolygon method that
converts a number 0-9 into a 7-segment digit display polygon.
Change-Id: I4d3326c9fe9e42d07a6248781127f19ac27d8b72
Diffstat (limited to 'include/basegfx/tools')
-rw-r--r-- | include/basegfx/tools/tools.hxx | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/include/basegfx/tools/tools.hxx b/include/basegfx/tools/tools.hxx index c1fa0940ae35..c9af12b73fcd 100644 --- a/include/basegfx/tools/tools.hxx +++ b/include/basegfx/tools/tools.hxx @@ -27,6 +27,7 @@ namespace basegfx { class B2DPoint; class B2DRange; + class B2DPolyPolygon; namespace tools { @@ -94,6 +95,30 @@ namespace basegfx ::basegfx::B2DPoint& io_rRightBottom, const ::basegfx::B2DRange& rFitTarget ); + /** Creates polypolygon with the given number as seven-segment + digits + + @param fVal + Value to convert + + @param nTotalDigits + Total number of digits to display. If less is needed for + given number, fill space with blanks. + + @param nDecPlaces + Decimal places to show. When 0, display as integer. When + negative, fill given number of before-the-decimal point + with zero. + + @param bLitSegments + When true, return a polygon containing the segments that + are 'lit' for the given number. Return un-lit segments + otherwise. + */ + BASEGFX_DLLPUBLIC B2DPolyPolygon number2PolyPolygon(double fVal, + sal_Int32 nTotalDigits, + sal_Int32 nDecPlaces, + bool bLitSegments=true); } } |