merge the formfield patch from ooo-build
[ooovba.git] / offapi / com / sun / star / rendering / XCanvasFont.idl
blobfc2d4b4eff5922bd0a9123d7e7f1c83ffeba7592
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: XCanvasFont.idl,v $
10 * $Revision: 1.5 $
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 ************************************************************************/
30 #ifndef __com_sun_star_rendering_XCanvasFont_idl__
31 #define __com_sun_star_rendering_XCanvasFont_idl__
33 #ifndef __com_sun_star_uno_XInterface_idl__
34 #include <com/sun/star/uno/XInterface.idl>
35 #endif
36 #ifndef __com_sun_star_lang_IllegalArgumentException_idl__
37 #include <com/sun/star/lang/IllegalArgumentException.idl>
38 #endif
39 #ifndef __com_sun_star_geometry_RealRectangle2D_idl__
40 #include <com/sun/star/geometry/RealRectangle2D.idl>
41 #endif
42 #ifndef __com_sun_star_rendering_FontRequest_idl__
43 #include <com/sun/star/rendering/FontRequest.idl>
44 #endif
45 #ifndef __com_sun_star_rendering_FontMetrics_idl__
46 #include <com/sun/star/rendering/FontMetrics.idl>
47 #endif
48 #ifndef __com_sun_star_rendering_RenderState_idl__
49 #include <com/sun/star/rendering/RenderState.idl>
50 #endif
51 #ifndef __com_sun_star_rendering_ViewState_idl__
52 #include <com/sun/star/rendering/ViewState.idl>
53 #endif
54 #ifndef __com_sun_star_rendering_StringContext_idl__
55 #include <com/sun/star/rendering/StringContext.idl>
56 #endif
58 #ifndef __com_sun_star_beans_PropertyValue_idl__
59 #include <com/sun/star/beans/PropertyValue.idl>
60 #endif
63 module com { module sun { module star { module rendering {
65 interface XCanvas;
66 interface XTextLayout;
67 interface XPolyPolygon2D;
69 /** This interface provides access to a specific, XCanvas-dependent
70 font incarnation. This font is not universally usable, but belongs
71 to the XCanvas it was queried from.
73 interface XCanvasFont : ::com::sun::star::uno::XInterface
75 /** Create a text layout interface.<p>
77 Create a text layout interface for the given string, using
78 this font to generate the glyphs from.<p>
80 @param aText
81 The text to layout.
83 @param nDirection
84 Main text direction for the string specified. The main text
85 direction is e.g. important for characters that are not
86 strong, i.e. that change affinity according to the current
87 writing direction. Make sure that across text portions and
88 lines, the direction is set consistently.
90 @param nRandomSeed
91 Optional random seed for OpenType glyph variations.
93 XTextLayout createTextLayout( [in] StringContext aText, [in] byte nDirection, [in] hyper nRandomSeed );
95 //-------------------------------------------------------------------------
97 /** Query the FontRequest that was used to generate this object.
99 FontRequest getFontRequest();
101 //-------------------------------------------------------------------------
103 /** Query metric information about the font, that is generic to
104 all its glyphs.<p>
106 Note that the metric values in the returned result are in the
107 font coordinate system, i.e. relative to the corresponding
108 size of this font. That is, when this font was created with a
109 cell size of 20 units, the metrics returned are calculated
110 relative to this size.
112 FontMetrics getFontMetrics();
114 //-------------------------------------------------------------------------
116 /** Query the list of available font sizes.<p>
118 This method queries the list of available font sizes (in
119 device units) for this font. For scalable fonts that are not
120 restricted to discrete sizes, this list is <em>empty</em>,
121 meaning that every size is possible. Fonts that <em>do</em>
122 restrict the device size to certain discrete values, setting
123 an overall transformation that scales the
124 <member>FontRequest::CellSize</member> to something not
125 contained in the list returned by this method can lead to
126 visible disturbances.<p>
128 sequence< double > getAvailableSizes();
130 //-------------------------------------------------------------------------
132 /** Query the list of additional font properties.<p>
134 sequence< ::com::sun::star::beans::PropertyValue > getExtraFontProperties();
136 //-------------------------------------------------------------------------
140 }; }; }; };
142 #endif