/* -*- 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/. * * This file incorporates work covered by the following license notice: * * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed * with this work for additional information regarding copyright * ownership. The ASF licenses this file to you under the Apache * License, Version 2.0 (the "License"); you may not use this file * except in compliance with the License. You may obtain a copy of * the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
namespace tools
{ /** Init render state from OutDevState
This method initializes the given render state object, sets up the transformation and the clip from the OutDevState.
*/ void initRenderState( css::rendering::RenderState& renderState, const ::cppcanvas::internal::OutDevState& outdevState );
/** Calc output offset relative to baseline
The XCanvas API always renders text relative to its baseline. This method calculates an offset in logical coordinates, depending on the OutDevState's textReferencePoint and the font currently set, to offset the text from the baseline.
@param outdevState State to take textReferencePoint from
@param rVDev VDev to obtain font metrics from.
*/
::Size getBaselineOffset( const ::cppcanvas::internal::OutDevState& outdevState, const VirtualDevice& rVDev );
/** Construct a matrix that converts from logical to pixel coordinate system.
This method calculates a matrix that approximates the VirtualDevice's LogicToPixel conversion (disregarding any offset components, thus the 'linear' in the method name - the returned matrix is guaranteed to be linear).
@param o_rMatrix This matrix will receive the calculated transform, and is also returned from this method.
/** This method modifies the clip, to cancel the given transformation.
As the clip is relative to the render state transformation, offsetting or scaling the render state must modify the clip, to keep it at the same position relative to the primitive at hand
@param o_rRenderState Render state to change the clip in
@param rOutdevState Input state. Is used to retrieve the original clip from
@param rOffset The clip is offsetted by the negative of this value.
@param pScaling The clip is inversely scaled by this value (if given)
@param pRotation The clip is inversely rotated by this value (if given)
@return true, if the clip has changed, false if not
*/ bool modifyClip( css::rendering::RenderState& o_rRenderState, conststruct ::cppcanvas::internal::OutDevState& rOutdevState, const CanvasSharedPtr& rCanvas, const ::basegfx::B2DPoint& rOffset, const ::basegfx::B2DVector* pScaling, constdouble* pRotation );
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 ist noch experimentell.