/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /* * This file is part of the LibreOffice project. * * This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/.
*/
void EffectProperties::assignUsed( const EffectProperties& rSourceProps )
{
maShadow.assignUsed(rSourceProps.maShadow);
maGlow.assignUsed(rSourceProps.maGlow);
maSoftEdge.assignUsed(rSourceProps.maSoftEdge); if (!rSourceProps.m_Effects.empty())
{
m_Effects.clear();
m_Effects.reserve(rSourceProps.m_Effects.size()); for (autoconst& it : rSourceProps.m_Effects)
{
m_Effects.push_back(std::make_unique<Effect>(*it));
}
}
}
void EffectProperties::pushToPropMap( PropertyMap& rPropMap, const GraphicHelper& rGraphicHelper ) const
{ for (autoconst& it : m_Effects)
{ if( it->msName == "outerShdw" )
{
sal_Int32 nAttrDir = 0, nAttrDist = 0;
sal_Int32 nAttrSizeX = 100000, nAttrSizeY = 100000; // If shadow size is %100=100000 (means equal to object's size), sx sy is not exists, // Default values of sx, sy should be 100000 in this case.
sal_Int32 nAttrBlur = 0;
// Negative X or Y dist indicates left or up, respectively // Negative X or Y dist indicates left or up, respectively double nAngle = basegfx::deg2rad(static_cast<double>(nAttrDir) / PER_DEGREE);
sal_Int32 nDist = convertEmuToHmm( nAttrDist );
sal_Int32 nXDist = cos(nAngle) * nDist;
sal_Int32 nYDist = sin(nAngle) * nDist;
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.