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/polygon | |
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/polygon')
-rw-r--r-- | include/basegfx/polygon/b2dpolypolygontools.hxx | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/include/basegfx/polygon/b2dpolypolygontools.hxx b/include/basegfx/polygon/b2dpolypolygontools.hxx index 1d138a03b5b7..59f03ff3a63d 100644 --- a/include/basegfx/polygon/b2dpolypolygontools.hxx +++ b/include/basegfx/polygon/b2dpolypolygontools.hxx @@ -220,6 +220,26 @@ namespace basegfx // #i76891# Try to remove existing curve segments if they are simply edges BASEGFX_DLLPUBLIC B2DPolyPolygon simplifyCurveSegments(const B2DPolyPolygon& rCandidate); + /** Creates polypolygon for seven-segment display number + + This function takes an integer number between 0 and 9 and + convert it into the well-known seven-segment display + number (like most digital clocks show their numbers). The + digit will exactly fit the unit rectangle. The polypolygon + will be a line polygon, i.e. if you need the segment parts + to have width, use createAreaGeometry() on the result. + + @param cNumber + Number from '0' to '9' as ASCII char, or '-', 'E' and '.' + to convert to 7 segment code + + @param bLitSegments + When true, return a polygon containing the segments that + are 'lit' for the given number. Return un-lit segments + otherwise. + */ + B2DPolyPolygon createSevenSegmentPolyPolygon(sal_Char cNumber, bool bLitSegments=true); + /** snap some polygon coordinates to discrete coordinates This method allows to snap some polygon points to discrete (integer) values |