diff options
author | Bartosz Kosiorek <gang65@poczta.onet.pl> | 2018-04-11 01:05:01 +0200 |
---|---|---|
committer | Bartosz Kosiorek <gang65@poczta.onet.pl> | 2018-04-16 23:10:15 +0200 |
commit | dbe3c29a3bf74b0d037eb035eca11aa4836db8da (patch) | |
tree | 7d7c716ece62c1a3627fe39daa0084cd6b2aff9a /drawinglayer/source/tools/emfppen.cxx | |
parent | 7d829719a25eaeee7022983ca211203c2a48cf51 (diff) |
tdf#113624 EMF+ Add support for different units conversion
With previous implementation only Pixel unit was supported.
Other units (eg. inch, milimeters, points, world) was treated
as Pixel.
With this patch the correct unit conversion was implemented to following records:
- FontObject
- PenObject
- SetWorldTransform
As a result records are properly scaled.
Tested with DrawString record from:
https://bugs.documentfoundation.org/attachment.cgi?id=140287
Change-Id: I77435ad8f1bbac08f298a03d91d0c7f1f1734e5c
Reviewed-on: https://gerrit.libreoffice.org/52699
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Bartosz Kosiorek <gang65@poczta.onet.pl>
Diffstat (limited to 'drawinglayer/source/tools/emfppen.cxx')
-rw-r--r-- | drawinglayer/source/tools/emfppen.cxx | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/drawinglayer/source/tools/emfppen.cxx b/drawinglayer/source/tools/emfppen.cxx index 096380ee8307..314fdf3f5f31 100644 --- a/drawinglayer/source/tools/emfppen.cxx +++ b/drawinglayer/source/tools/emfppen.cxx @@ -169,6 +169,8 @@ namespace emfplushelper SAL_INFO("drawinglayer", "EMF+\t graphics version: 0x" << std::hex << graphicsVersion << " type (must be set to zero): " << penType << " pen data flags: 0x" << penDataFlags << " unit: " << penUnit << " width: " << std::dec << penWidth); + penWidth = penWidth * EmfPlusHelperData::getUnitToPixelMultiplier(static_cast<UnitType>(penUnit)); + if (penDataFlags & PenDataTransform) { EmfPlusHelperData::readXForm(s, pen_transformation); |