/* -*- 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/.
*/
std::vector<double> aStrokePattern;
basegfx::BColor aColor = (SwViewOption::GetCurrentViewOptions().*m_pColorFn)().getBColor(); if (rSettings.GetHighContrastMode())
{ // Only a solid line in high contrast mode
aColor = rSettings.GetDialogTextColor().getBColor();
} else
{ // Get a color for the contrast
basegfx::BColor aHslLine = basegfx::utils::rgb2hsl(aColor); double nLuminance = aHslLine.getZ();
nLuminance += (1.0 - nLuminance) * 0.75; if (aHslLine.getZ() > 0.7)
nLuminance = aHslLine.getZ() * 0.7;
aHslLine.setZ(nLuminance); const basegfx::BColor aOtherColor = basegfx::utils::hsl2rgb(aHslLine);
// Compute the plain line
aSeq.push_back(new drawinglayer::primitive2d::PolygonHairlinePrimitive2D(aPolygon, aOtherColor));
// Dashed line in twips
aStrokePattern.push_back(3);
aStrokePattern.push_back(3);
}
// Compute the dashed line primitive
aSeq.push_back( new drawinglayer::primitive2d::PolyPolygonStrokePrimitive2D(
basegfx::B2DPolyPolygon(aPolygon),
drawinglayer::attribute::LineAttribute((SwViewOption::GetCurrentViewOptions().*m_pColorFn)().getBColor()),
drawinglayer::attribute::StrokeAttribute(std::move(aStrokePattern))));
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.