1/*************************************************************************
2 *
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 *
5 * Copyright 2000, 2010 Oracle and/or its affiliates.
6 *
7 * OpenOffice.org - a multi-platform office productivity suite
8 *
9 * This file is part of OpenOffice.org.
10 *
11 * OpenOffice.org is free software: you can redistribute it and/or modify
12 * it under the terms of the GNU Lesser General Public License version 3
13 * only, as published by the Free Software Foundation.
14 *
15 * OpenOffice.org is distributed in the hope that it will be useful,
16 * but WITHOUT ANY WARRANTY; without even the implied warranty of
17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
18 * GNU Lesser General Public License version 3 for more details
19 * (a copy is included in the LICENSE file that accompanied this code).
20 *
21 * You should have received a copy of the GNU Lesser General Public License
22 * version 3 along with OpenOffice.org.  If not, see
23 * <http://www.openoffice.org/license.html>
24 * for a copy of the LGPLv3 License.
25 *
26 ************************************************************************/
27#ifndef __com_sun_star_rendering_XCanvasFont_idl__
28#define __com_sun_star_rendering_XCanvasFont_idl__
29
30#ifndef __com_sun_star_uno_XInterface_idl__
31#include <com/sun/star/uno/XInterface.idl>
32#endif
33#ifndef __com_sun_star_lang_IllegalArgumentException_idl__
34#include <com/sun/star/lang/IllegalArgumentException.idl>
35#endif
36#ifndef __com_sun_star_geometry_RealRectangle2D_idl__
37#include <com/sun/star/geometry/RealRectangle2D.idl>
38#endif
39#ifndef __com_sun_star_rendering_FontRequest_idl__
40#include <com/sun/star/rendering/FontRequest.idl>
41#endif
42#ifndef __com_sun_star_rendering_FontMetrics_idl__
43#include <com/sun/star/rendering/FontMetrics.idl>
44#endif
45#ifndef __com_sun_star_rendering_RenderState_idl__
46#include <com/sun/star/rendering/RenderState.idl>
47#endif
48#ifndef __com_sun_star_rendering_ViewState_idl__
49#include <com/sun/star/rendering/ViewState.idl>
50#endif
51#ifndef __com_sun_star_rendering_StringContext_idl__
52#include <com/sun/star/rendering/StringContext.idl>
53#endif
54
55#ifndef __com_sun_star_beans_PropertyValue_idl__
56#include <com/sun/star/beans/PropertyValue.idl>
57#endif
58
59
60module com { module sun { module star { module rendering {
61
62published interface XCanvas;
63published interface XTextLayout;
64published interface XPolyPolygon2D;
65
66/** This interface provides access to a specific, XCanvas-dependent
67    font incarnation. This font is not universally usable, but belongs
68    to the XCanvas it was queried from.
69 */
70published interface XCanvasFont : ::com::sun::star::uno::XInterface
71{
72    /** Create a text layout interface.<p>
73
74        Create a text layout interface for the given string, using
75        this font to generate the glyphs from.<p>
76
77        @param aText
78        The text to layout.
79
80        @param nDirection
81        Main text direction for the string specified. The main text
82        direction is e.g. important for characters that are not
83        strong, i.e. that change affinity according to the current
84        writing direction. Make sure that across text portions and
85        lines, the direction is set consistently.
86
87        @param nRandomSeed
88        Optional random seed for OpenType glyph variations.
89     */
90    XTextLayout											createTextLayout( [in] StringContext aText, [in] byte nDirection, [in] hyper nRandomSeed );
91
92    //-------------------------------------------------------------------------
93
94    /** Query the FontRequest that was used to generate this object.
95     */
96    FontRequest											getFontRequest();
97
98    //-------------------------------------------------------------------------
99
100    /** Query metric information about the font, that is generic to
101        all its glyphs.<p>
102
103        Note that the metric values in the returned result are in the
104        font coordinate system, i.e. relative to the corresponding
105        size of this font. That is, when this font was created with a
106        cell size of 20 units, the metrics returned are calculated
107        relative to this size.
108     */
109    FontMetrics											getFontMetrics();
110
111    //-------------------------------------------------------------------------
112
113    /** Query the list of available font sizes.<p>
114
115        This method queries the list of available font sizes (in
116        device units) for this font. For scalable fonts that are not
117        restricted to discrete sizes, this list is <em>empty</em>,
118        meaning that every size is possible. Fonts that <em>do</em>
119        restrict the device size to certain discrete values, setting
120        an overall transformation that scales the
121        <member>FontRequest::CellSize</member> to something not
122        contained in the list returned by this method can lead to
123        visible disturbances.<p>
124     */
125    sequence< double >                                      getAvailableSizes();
126
127    //-------------------------------------------------------------------------
128
129    /** Query the list of additional font properties.<p>
130     */
131    sequence< ::com::sun::star::beans::PropertyValue >	getExtraFontProperties();
132
133    //-------------------------------------------------------------------------
134
135};
136
137}; }; }; };
138
139#endif
140
141