diff options
author | Bartosz Kosiorek <gang65@poczta.onet.pl> | 2021-04-01 16:42:34 +0200 |
---|---|---|
committer | Bartosz Kosiorek <gang65@poczta.onet.pl> | 2021-04-02 21:25:31 +0200 |
commit | 036053b969bf95a4cb9b16601f2651ca227dd429 (patch) | |
tree | 4f2cc4409114e8d038727041c8779599c692a352 /emfio | |
parent | 58fd0b79bc3fd4f30e79d34e93698fa91c9d95a2 (diff) |
tdf#55058 EMF: Implement PAINTRGN record
The EMR_PAINTRGN record paints the specified region by using the brush
currently selected into the playback device context.
After implement support for PAINTRGN record, the reference image
is displayed correctly:
https://sourceforge.net/projects/libuemf/
Change-Id: I761779713d1200e6079ff798e9c3c9aaba57ad4f
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/113461
Tested-by: Jenkins
Reviewed-by: Bartosz Kosiorek <gang65@poczta.onet.pl>
Diffstat (limited to 'emfio')
-rw-r--r-- | emfio/source/reader/emfreader.cxx | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/emfio/source/reader/emfreader.cxx b/emfio/source/reader/emfreader.cxx index 12b4fce29323..321e9fc2b504 100644 --- a/emfio/source/reader/emfreader.cxx +++ b/emfio/source/reader/emfreader.cxx @@ -1934,6 +1934,18 @@ namespace emfio } break; + case EMR_PAINTRGN : + { + sal_uInt32 nRgnDataSize; + tools::PolyPolygon aPolyPoly; + mpInputStream->SeekRel( 0x10 ); // Skipping RectL bounds + mpInputStream->ReadUInt32( nRgnDataSize ); + + if ( ImplReadRegion( aPolyPoly, *mpInputStream, nRecSize ) ) + DrawPolyPolygon( aPolyPoly ); + } + break; + case EMR_CREATEDIBPATTERNBRUSHPT : { sal_uInt32 nStart = mpInputStream->Tell() - 8; @@ -1987,7 +1999,6 @@ namespace emfio case EMR_SETDIBITSTODEVICE : case EMR_FRAMERGN : case EMR_INVERTRGN : - case EMR_PAINTRGN : case EMR_FLATTENPATH : case EMR_WIDENPATH : case EMR_POLYDRAW : |