Branch libreoffice-5-0-4
[LibreOffice.git] / vcl / inc / headless / svptextrender.hxx
blob13d99f4eaf4f69481812663ebd3c30e7b5f80ff8
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
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/.
9 * This file incorporates work covered by the following license notice:
11 * Licensed to the Apache Software Foundation (ASF) under one or more
12 * contributor license agreements. See the NOTICE file distributed
13 * with this work for additional information regarding copyright
14 * ownership. The ASF licenses this file to you under the Apache
15 * License, Version 2.0 (the "License"); you may not use this file
16 * except in compliance with the License. You may obtain a copy of
17 * the License at http://www.apache.org/licenses/LICENSE-2.0 .
20 #ifndef INCLUDED_VCL_INC_HEADLESS_SVPTEXTRENDER_HXX
21 #define INCLUDED_VCL_INC_HEADLESS_SVPTEXTRENDER_HXX
23 #include "textrender.hxx"
24 #include <vcl/region.hxx>
25 #include <deque>
27 class VCL_DLLPUBLIC SvpTextRender : public TextRenderImpl
29 private:
30 SvpSalGraphics& m_rParent;
31 // These fields are used only when we use FreeType to draw into a
32 // headless backend, i.e. not on iOS.
33 basebmp::Color m_aTextColor;
34 basebmp::Format m_eTextFmt;
35 ServerFont* m_pServerFont[ MAX_FALLBACK ];
36 public:
37 SvpTextRender(SvpSalGraphics& rParent);
38 virtual void setDevice(basebmp::BitmapDeviceSharedPtr& rDevice) SAL_OVERRIDE;
40 virtual void SetTextColor( SalColor nSalColor ) SAL_OVERRIDE;
41 virtual sal_uInt16 SetFont( FontSelectPattern*, int nFallbackLevel ) SAL_OVERRIDE;
42 virtual void GetFontMetric( ImplFontMetricData*, int nFallbackLevel ) SAL_OVERRIDE;
43 virtual const FontCharMapPtr GetFontCharMap() const SAL_OVERRIDE;
44 virtual bool GetFontCapabilities(vcl::FontCapabilities &rFontCapabilities) const SAL_OVERRIDE;
45 virtual void GetDevFontList( PhysicalFontCollection* ) SAL_OVERRIDE;
46 virtual void ClearDevFontCache() SAL_OVERRIDE;
47 virtual bool AddTempDevFont( PhysicalFontCollection*, const OUString& rFileURL, const OUString& rFontName ) SAL_OVERRIDE;
48 virtual bool CreateFontSubset(
49 const OUString& rToFile,
50 const PhysicalFontFace*,
51 const sal_GlyphId* pGlyphIDs,
52 const sal_uInt8* pEncoding,
53 sal_Int32* pWidths,
54 int nGlyphs,
55 FontSubsetInfo& rInfo) SAL_OVERRIDE;
57 virtual const Ucs2SIntMap* GetFontEncodingVector( const PhysicalFontFace*, const Ucs2OStrMap** ppNonEncoded, std::set<sal_Unicode> const**) SAL_OVERRIDE;
58 virtual const void* GetEmbedFontData(
59 const PhysicalFontFace*,
60 const sal_Ucs* pUnicodes,
61 sal_Int32* pWidths,
62 size_t nLen,
63 FontSubsetInfo& rInfo,
64 long* pDataLen ) SAL_OVERRIDE;
66 virtual void FreeEmbedFontData( const void* pData, long nDataLen ) SAL_OVERRIDE;
67 virtual void GetGlyphWidths(
68 const PhysicalFontFace*,
69 bool bVertical,
70 Int32Vector& rWidths,
71 Ucs2UIntMap& rUnicodeEnc ) SAL_OVERRIDE;
73 virtual bool GetGlyphBoundRect( sal_GlyphId nIndex, Rectangle& ) SAL_OVERRIDE;
74 virtual bool GetGlyphOutline( sal_GlyphId nIndex, ::basegfx::B2DPolyPolygon& ) SAL_OVERRIDE;
75 virtual SalLayout* GetTextLayout( ImplLayoutArgs&, int nFallbackLevel ) SAL_OVERRIDE;
76 virtual void DrawServerFontLayout( const ServerFontLayout& ) SAL_OVERRIDE;
77 virtual SystemFontData GetSysFontData( int nFallbackLevel ) const SAL_OVERRIDE;
80 #endif // INCLUDED_VCL_INC_HEADLESS_SVPTEXTRENDER_HXX
82 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */