LibreOffice Module canvas (master) 1
ogl_canvasfont.hxx
Go to the documentation of this file.
1/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2/*
3 * This file is part of the LibreOffice project.
4 *
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/.
8 */
9
10#pragma once
11
13
14#include <com/sun/star/rendering/XCanvasFont.hpp>
15#include <com/sun/star/geometry/Matrix2D.hpp>
16
17#include <rtl/ref.hxx>
18
19
20/* Definition of CanvasFont class */
21
22namespace oglcanvas
23{
24 class SpriteCanvas;
25
26 typedef ::comphelper::WeakComponentImplHelper< css::rendering::XCanvasFont > CanvasFontBaseT;
27
29 {
30 public:
32
34 CanvasFont(const CanvasFont&) = delete;
35 const CanvasFont& operator=(const CanvasFont&) = delete;
36
37 CanvasFont( css::rendering::FontRequest fontRequest,
38 const css::uno::Sequence< css::beans::PropertyValue >& extraFontProperties,
39 const css::geometry::Matrix2D& fontMatrix );
40
41 // XCanvasFont
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;
47
48 const css::geometry::Matrix2D& getFontMatrix() const { return maFontMatrix; }
49
50 sal_uInt32 getEmphasisMark() const { return mnEmphasisMark; }
51
52 private:
53 css::rendering::FontRequest maFontRequest;
54 sal_uInt32 mnEmphasisMark;
55 css::geometry::Matrix2D maFontMatrix;
56 };
57}
58
59/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
virtual css::uno::Sequence< double > SAL_CALL getAvailableSizes() override
virtual css::rendering::FontMetrics SAL_CALL getFontMetrics() override
const CanvasFont & operator=(const CanvasFont &)=delete
virtual css::uno::Sequence< css::beans::PropertyValue > SAL_CALL getExtraFontProperties() override
css::rendering::FontRequest maFontRequest
CanvasFont(const CanvasFont &)=delete
make noncopyable
const css::geometry::Matrix2D & getFontMatrix() const
sal_uInt32 getEmphasisMark() const
css::geometry::Matrix2D maFontMatrix
CanvasFont(css::rendering::FontRequest fontRequest, const css::uno::Sequence< css::beans::PropertyValue > &extraFontProperties, const css::geometry::Matrix2D &fontMatrix)
virtual css::rendering::FontRequest SAL_CALL getFontRequest() override
virtual css::uno::Reference< css::rendering::XTextLayout > SAL_CALL createTextLayout(const css::rendering::StringContext &aText, sal_Int8 nDirection, sal_Int64 nRandomSeed) override
rtl::Reference< CanvasFont > ImplRef
::comphelper::WeakComponentImplHelper< css::rendering::XCanvasFont > CanvasFontBaseT
signed char sal_Int8