[Libreoffice-commits] core.git: Branch 'aoo/trunk' - 2 commits - canvas/source drawinglayer/source
Armin Le Grand
alg at apache.org
Fri Jun 14 05:07:42 PDT 2013
canvas/source/vcl/canvascustomsprite.cxx | 5 ++---
drawinglayer/source/primitive2d/primitivetools2d.cxx | 5 +++--
drawinglayer/source/processor2d/vclprocessor2d.cxx | 6 ++++--
3 files changed, 9 insertions(+), 7 deletions(-)
New commits:
commit a34f3fdf50dbf8eac0599dfb018fc0040ef2a2f0
Author: Armin Le Grand <alg at apache.org>
Date: Fri Jun 14 12:02:40 2013 +0000
i12525 use X and Y for unit evaluation
diff --git a/drawinglayer/source/primitive2d/primitivetools2d.cxx b/drawinglayer/source/primitive2d/primitivetools2d.cxx
index 1cd573c..e70fcff 100644
--- a/drawinglayer/source/primitive2d/primitivetools2d.cxx
+++ b/drawinglayer/source/primitive2d/primitivetools2d.cxx
@@ -38,8 +38,9 @@ namespace drawinglayer
{
::osl::MutexGuard aGuard( m_aMutex );
- // get the current DiscreteUnit
- const double fDiscreteUnit((rViewInformation.getInverseObjectToViewTransformation() * basegfx::B2DVector(1.0, 0.0)).getLength());
+ // get the current DiscreteUnit, look at X and Y and use the maximum
+ const basegfx::B2DVector aDiscreteVector(rViewInformation.getInverseObjectToViewTransformation() * basegfx::B2DVector(1.0, 1.0));
+ const double fDiscreteUnit(std::min(fabs(aDiscreteVector.getX()), fabs(aDiscreteVector.getY())));
if(getBuffered2DDecomposition().hasElements() && !basegfx::fTools::equal(fDiscreteUnit, getDiscreteUnit()))
{
diff --git a/drawinglayer/source/processor2d/vclprocessor2d.cxx b/drawinglayer/source/processor2d/vclprocessor2d.cxx
index ea51d51..574d743 100644
--- a/drawinglayer/source/processor2d/vclprocessor2d.cxx
+++ b/drawinglayer/source/processor2d/vclprocessor2d.cxx
@@ -1279,7 +1279,8 @@ namespace drawinglayer
{
const basegfx::BColor aColorA(maBColorModifierStack.getModifiedColor(rCandidate.getColorA()));
const basegfx::BColor aColorB(maBColorModifierStack.getModifiedColor(rCandidate.getColorB()));
- const double fDiscreteUnit((getViewInformation2D().getInverseObjectToViewTransformation() * basegfx::B2DVector(1.0, 0.0)).getLength());
+ const basegfx::B2DVector aDiscreteVector(getViewInformation2D().getInverseObjectToViewTransformation() * basegfx::B2DVector(1.0, 1.0));
+ const double fDiscreteUnit(std::min(fabs(aDiscreteVector.getX()), fabs(aDiscreteVector.getY())));
// use color distance and discrete lengths to calculate step count
const sal_uInt32 nSteps(calculateStepsForSvgGradient(aColorA, aColorB, fDelta, fDiscreteUnit));
@@ -1321,7 +1322,8 @@ namespace drawinglayer
{
const basegfx::BColor aColorA(maBColorModifierStack.getModifiedColor(rCandidate.getColorA()));
const basegfx::BColor aColorB(maBColorModifierStack.getModifiedColor(rCandidate.getColorB()));
- const double fDiscreteUnit((getViewInformation2D().getInverseObjectToViewTransformation() * basegfx::B2DVector(1.0, 0.0)).getLength());
+ const basegfx::B2DVector aDiscreteVector(getViewInformation2D().getInverseObjectToViewTransformation() * basegfx::B2DVector(1.0, 1.0));
+ const double fDiscreteUnit(std::min(fabs(aDiscreteVector.getX()), fabs(aDiscreteVector.getY())));
// use color distance and discrete lengths to calculate step count
const sal_uInt32 nSteps(calculateStepsForSvgGradient(aColorA, aColorB, fDeltaScale, fDiscreteUnit));
commit 16235b6d5c6222fe6fdb49f30e885ba701050fdb
Author: Armin Le Grand <alg at apache.org>
Date: Fri Jun 14 11:20:45 2013 +0000
i122485 Preliminary fix: Do not use 1Bit deep VDevs in Linux environment
diff --git a/canvas/source/vcl/canvascustomsprite.cxx b/canvas/source/vcl/canvascustomsprite.cxx
index d567f2b..1287ed7 100644
--- a/canvas/source/vcl/canvascustomsprite.cxx
+++ b/canvas/source/vcl/canvascustomsprite.cxx
@@ -80,9 +80,8 @@ namespace vclcanvas
BackBufferSharedPtr pBackBuffer( new BackBuffer( rOutDevProvider->getOutDev() ) );
pBackBuffer->setSize( aSize );
- // create mask backbuffer, with one bit color depth
- BackBufferSharedPtr pBackBufferMask( new BackBuffer( rOutDevProvider->getOutDev(),
- true ) );
+ // create mask backbuffer, with one bit color depth #122485# use full depth to avoid problem with 1bit depth, get AAed masks
+ BackBufferSharedPtr pBackBufferMask( new BackBuffer( rOutDevProvider->getOutDev() ) ); // , true ) ); // #122485#
pBackBufferMask->setSize( aSize );
// TODO(F1): Implement alpha vdev (could prolly enable
More information about the Libreoffice-commits
mailing list