diff options
author | Bartosz Kosiorek <gang65@poczta.onet.pl> | 2019-04-01 11:41:20 +0200 |
---|---|---|
committer | Bartosz Kosiorek <gang65@poczta.onet.pl> | 2019-04-01 13:55:50 +0200 |
commit | 4a215887a845452f984c5453de883b538f660ad4 (patch) | |
tree | 175320e2e83faf6cefbd91f213612fe4d47ce370 /drawinglayer/source/tools/emfpbrush.cxx | |
parent | c1fc31b1032d5e8940223b5688138298896f78f0 (diff) |
tdf#103859 EMF+ Add transparency support for linear gradients
Change-Id: I2a3c21b936bc765f152be5bb8064b9d13aabaa07
Reviewed-on: https://gerrit.libreoffice.org/69927
Tested-by: Jenkins
Reviewed-by: Bartosz Kosiorek <gang65@poczta.onet.pl>
Diffstat (limited to 'drawinglayer/source/tools/emfpbrush.cxx')
-rw-r--r-- | drawinglayer/source/tools/emfpbrush.cxx | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/drawinglayer/source/tools/emfpbrush.cxx b/drawinglayer/source/tools/emfpbrush.cxx index 5e4cdaadae5d..2f860273f50b 100644 --- a/drawinglayer/source/tools/emfpbrush.cxx +++ b/drawinglayer/source/tools/emfpbrush.cxx @@ -45,10 +45,10 @@ namespace emfplushelper : type(0) , additionalFlags(0) , wrapMode(0) - , areaX(0.0) - , areaY(0.0) - , areaWidth(0.0) - , areaHeight(0.0) + , firstPointX(0.0) + , firstPointY(0.0) + , secondPointX(0.0) + , secondPointY(0.0) , hasTransformation(false) , blendPoints(0) , blendFactors(nullptr) @@ -110,8 +110,8 @@ namespace emfplushelper s.ReadUInt32(color); solidColor = ::Color(0xff - (color >> 24), (color >> 16) & 0xff, (color >> 8) & 0xff, color & 0xff); SAL_INFO("drawinglayer", "EMF+\tcenter color: 0x" << std::hex << color << std::dec); - s.ReadFloat(areaX).ReadFloat(areaY); - SAL_INFO("drawinglayer", "EMF+\tcenter point: " << areaX << "," << areaY); + s.ReadFloat(firstPointX).ReadFloat(firstPointY); + SAL_INFO("drawinglayer", "EMF+\tcenter point: " << firstPointX << "," << firstPointY); s.ReadInt32(surroundColorsNumber); SAL_INFO("drawinglayer", "EMF+\t number of surround colors: " << surroundColorsNumber); @@ -153,8 +153,8 @@ namespace emfplushelper s.Seek(pos + pathLength); const ::basegfx::B2DRectangle aBounds(::basegfx::utils::getRange(path->GetPolygon(rR, false))); - areaWidth = aBounds.getWidth(); - areaHeight = aBounds.getHeight(); + secondPointX = aBounds.getWidth(); + secondPointY = aBounds.getHeight(); SAL_INFO("drawinglayer", "EMF+\t polygon bounding box: " << aBounds.getMinX() << "," << aBounds.getMinY() << " " << aBounds.getWidth() << "x" << aBounds.getHeight()); } else @@ -170,8 +170,8 @@ namespace emfplushelper s.Seek(pos + 8 * boundaryPointCount); const ::basegfx::B2DRectangle aBounds(::basegfx::utils::getRange(path->GetPolygon(rR, false))); - areaWidth = aBounds.getWidth(); - areaHeight = aBounds.getHeight(); + secondPointX = aBounds.getWidth(); + secondPointY = aBounds.getHeight(); SAL_INFO("drawinglayer", "EMF+\t polygon bounding box: " << aBounds.getMinX() << "," << aBounds.getMinY() << " " << aBounds.getWidth() << "x" << aBounds.getHeight()); } @@ -242,8 +242,8 @@ namespace emfplushelper { s.ReadUInt32(additionalFlags).ReadInt32(wrapMode); SAL_INFO("drawinglayer", "EMF+\tlinear gradient, additional flags: 0x" << std::hex << additionalFlags << std::dec); - s.ReadFloat(areaX).ReadFloat(areaY).ReadFloat(areaWidth).ReadFloat(areaHeight); - SAL_INFO("drawinglayer", "EMF+\tarea: " << areaX << "," << areaY << " - " << areaWidth << "x" << areaHeight); + s.ReadFloat(firstPointX).ReadFloat(firstPointY).ReadFloat(secondPointX).ReadFloat(secondPointY); + SAL_INFO("drawinglayer", "EMF+\tFirst gradinet point: " << firstPointX << ":" << firstPointY << ", second gradient point " << secondPointX << ":" << secondPointY); sal_uInt32 color; s.ReadUInt32(color); solidColor = ::Color(0xff - (color >> 24), (color >> 16) & 0xff, (color >> 8) & 0xff, color & 0xff); |