1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
3 * This file is part of the LibreOffice project.
5 * This Source Code Form is subject to the terms of the Mozilla Public
6 * License, v. 2.0. If a copy of the MPL was not distributed with this
7 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
12 #include <comphelper/compbase.hxx>
14 #include <com/sun/star/rendering/XCanvasFont.hpp>
15 #include <com/sun/star/geometry/Matrix2D.hpp>
17 #include <rtl/ref.hxx>
20 /* Definition of CanvasFont class */
26 typedef ::comphelper::WeakComponentImplHelper
< css::rendering::XCanvasFont
> CanvasFontBaseT
;
28 class CanvasFont
: public CanvasFontBaseT
31 typedef rtl::Reference
<CanvasFont
> ImplRef
;
34 CanvasFont(const CanvasFont
&) = delete;
35 const CanvasFont
& operator=(const CanvasFont
&) = delete;
37 CanvasFont( css::rendering::FontRequest fontRequest
,
38 const css::uno::Sequence
< css::beans::PropertyValue
>& extraFontProperties
,
39 const css::geometry::Matrix2D
& fontMatrix
);
42 virtual css::uno::Reference
< css::rendering::XTextLayout
> SAL_CALL
createTextLayout( const css::rendering::StringContext
& aText
, sal_Int8 nDirection
, sal_Int64 nRandomSeed
) override
;
43 virtual css::rendering::FontRequest SAL_CALL
getFontRequest( ) override
;
44 virtual css::rendering::FontMetrics SAL_CALL
getFontMetrics( ) override
;
45 virtual css::uno::Sequence
< double > SAL_CALL
getAvailableSizes( ) override
;
46 virtual css::uno::Sequence
< css::beans::PropertyValue
> SAL_CALL
getExtraFontProperties( ) override
;
48 const css::geometry::Matrix2D
& getFontMatrix() const { return maFontMatrix
; }
50 sal_uInt32
getEmphasisMark() const { return mnEmphasisMark
; }
53 css::rendering::FontRequest maFontRequest
;
54 sal_uInt32 mnEmphasisMark
;
55 css::geometry::Matrix2D maFontMatrix
;
59 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */