update dev300-m58
[ooovba.git] / canvas / source / directx / dx_textlayout_drawhelper.hxx
blobdc5b7845297acb32c2abc64c61fe673cc4d069ca
1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 *
5 * Copyright 2008 by Sun Microsystems, Inc.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * $RCSfile: dx_textlayout_drawhelper.hxx,v $
10 * $Revision: 1.4 $
12 * This file is part of OpenOffice.org.
14 * OpenOffice.org is free software: you can redistribute it and/or modify
15 * it under the terms of the GNU Lesser General Public License version 3
16 * only, as published by the Free Software Foundation.
18 * OpenOffice.org is distributed in the hope that it will be useful,
19 * but WITHOUT ANY WARRANTY; without even the implied warranty of
20 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 * GNU Lesser General Public License version 3 for more details
22 * (a copy is included in the LICENSE file that accompanied this code).
24 * You should have received a copy of the GNU Lesser General Public License
25 * version 3 along with OpenOffice.org. If not, see
26 * <http://www.openoffice.org/license.html>
27 * for a copy of the LGPLv3 License.
29 ************************************************************************/
31 #ifndef _TEXTLAYOUT_DRAWHELPER_HXX
32 #define _TEXTLAYOUT_DRAWHELPER_HXX
34 #include <boost/shared_ptr.hpp>
36 #include <com/sun/star/uno/Sequence.hxx>
37 #include <com/sun/star/rendering/StringContext.hpp>
38 #include <com/sun/star/rendering/XCanvasFont.hpp>
39 #include <com/sun/star/geometry/Matrix2D.hpp>
40 #include <com/sun/star/rendering/XGraphicDevice.hpp>
42 #include <basegfx/matrix/b2dhommatrix.hxx>
43 #include <basegfx/vector/b2isize.hxx>
45 class ::com::sun::star::rendering::XCanvasFont;
47 namespace Gdiplus { class Graphics; }
49 namespace dxcanvas
51 struct Bitmap;
52 class TextLayoutDrawHelper
54 public:
55 TextLayoutDrawHelper(
56 const ::com::sun::star::uno::Reference< ::com::sun::star::rendering::XGraphicDevice >& xGraphicDevice);
57 ~TextLayoutDrawHelper();
59 // draw text
60 void drawText( const boost::shared_ptr<Gdiplus::Graphics>& rGraphics,
61 const ::com::sun::star::rendering::ViewState& rViewState,
62 const ::com::sun::star::rendering::RenderState& rRenderState,
63 const ::basegfx::B2ISize& rOutputOffset,
64 const ::com::sun::star::rendering::StringContext& rText,
65 const ::com::sun::star::uno::Sequence< double >& rLogicalAdvancements,
66 const ::com::sun::star::uno::Reference<
67 ::com::sun::star::rendering::XCanvasFont >& rCanvasFont,
68 const ::com::sun::star::geometry::Matrix2D& rFontMatrix,
69 bool bAlphaSurface );
71 ::com::sun::star::geometry::RealRectangle2D queryTextBounds(
72 const ::com::sun::star::rendering::StringContext& rText,
73 const ::com::sun::star::uno::Sequence< double >& rLogicalAdvancements,
74 const ::com::sun::star::uno::Reference<
75 ::com::sun::star::rendering::XCanvasFont >& rCanvasFont,
76 const ::com::sun::star::geometry::Matrix2D& rFontMatrix );
78 #ifdef DBG_UTIL
79 void test();
80 #endif
82 protected:
83 ::com::sun::star::uno::Reference<
84 ::com::sun::star::rendering::XGraphicDevice > mxGraphicDevice;
88 #endif /* _TEXTLAYOUT_DRAWHELPER_HXX */
89 // eof