1*d1766043SAndrew Rist/**************************************************************
2*d1766043SAndrew Rist *
3*d1766043SAndrew Rist * Licensed to the Apache Software Foundation (ASF) under one
4*d1766043SAndrew Rist * or more contributor license agreements.  See the NOTICE file
5*d1766043SAndrew Rist * distributed with this work for additional information
6*d1766043SAndrew Rist * regarding copyright ownership.  The ASF licenses this file
7*d1766043SAndrew Rist * to you under the Apache License, Version 2.0 (the
8*d1766043SAndrew Rist * "License"); you may not use this file except in compliance
9*d1766043SAndrew Rist * with the License.  You may obtain a copy of the License at
10*d1766043SAndrew Rist *
11*d1766043SAndrew Rist *   http://www.apache.org/licenses/LICENSE-2.0
12*d1766043SAndrew Rist *
13*d1766043SAndrew Rist * Unless required by applicable law or agreed to in writing,
14*d1766043SAndrew Rist * software distributed under the License is distributed on an
15*d1766043SAndrew Rist * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16*d1766043SAndrew Rist * KIND, either express or implied.  See the License for the
17*d1766043SAndrew Rist * specific language governing permissions and limitations
18*d1766043SAndrew Rist * under the License.
19*d1766043SAndrew Rist *
20*d1766043SAndrew Rist *************************************************************/
21*d1766043SAndrew Rist
22*d1766043SAndrew Rist
23cdf0e10cSrcweir#ifndef __com_sun_star_rendering_XCanvasFont_idl__
24cdf0e10cSrcweir#define __com_sun_star_rendering_XCanvasFont_idl__
25cdf0e10cSrcweir
26cdf0e10cSrcweir#ifndef __com_sun_star_uno_XInterface_idl__
27cdf0e10cSrcweir#include <com/sun/star/uno/XInterface.idl>
28cdf0e10cSrcweir#endif
29cdf0e10cSrcweir#ifndef __com_sun_star_lang_IllegalArgumentException_idl__
30cdf0e10cSrcweir#include <com/sun/star/lang/IllegalArgumentException.idl>
31cdf0e10cSrcweir#endif
32cdf0e10cSrcweir#ifndef __com_sun_star_geometry_RealRectangle2D_idl__
33cdf0e10cSrcweir#include <com/sun/star/geometry/RealRectangle2D.idl>
34cdf0e10cSrcweir#endif
35cdf0e10cSrcweir#ifndef __com_sun_star_rendering_FontRequest_idl__
36cdf0e10cSrcweir#include <com/sun/star/rendering/FontRequest.idl>
37cdf0e10cSrcweir#endif
38cdf0e10cSrcweir#ifndef __com_sun_star_rendering_FontMetrics_idl__
39cdf0e10cSrcweir#include <com/sun/star/rendering/FontMetrics.idl>
40cdf0e10cSrcweir#endif
41cdf0e10cSrcweir#ifndef __com_sun_star_rendering_RenderState_idl__
42cdf0e10cSrcweir#include <com/sun/star/rendering/RenderState.idl>
43cdf0e10cSrcweir#endif
44cdf0e10cSrcweir#ifndef __com_sun_star_rendering_ViewState_idl__
45cdf0e10cSrcweir#include <com/sun/star/rendering/ViewState.idl>
46cdf0e10cSrcweir#endif
47cdf0e10cSrcweir#ifndef __com_sun_star_rendering_StringContext_idl__
48cdf0e10cSrcweir#include <com/sun/star/rendering/StringContext.idl>
49cdf0e10cSrcweir#endif
50cdf0e10cSrcweir
51cdf0e10cSrcweir#ifndef __com_sun_star_beans_PropertyValue_idl__
52cdf0e10cSrcweir#include <com/sun/star/beans/PropertyValue.idl>
53cdf0e10cSrcweir#endif
54cdf0e10cSrcweir
55cdf0e10cSrcweir
56cdf0e10cSrcweirmodule com { module sun { module star { module rendering {
57cdf0e10cSrcweir
58cdf0e10cSrcweirpublished interface XCanvas;
59cdf0e10cSrcweirpublished interface XTextLayout;
60cdf0e10cSrcweirpublished interface XPolyPolygon2D;
61cdf0e10cSrcweir
62cdf0e10cSrcweir/** This interface provides access to a specific, XCanvas-dependent
63cdf0e10cSrcweir    font incarnation. This font is not universally usable, but belongs
64cdf0e10cSrcweir    to the XCanvas it was queried from.
65cdf0e10cSrcweir */
66cdf0e10cSrcweirpublished interface XCanvasFont : ::com::sun::star::uno::XInterface
67cdf0e10cSrcweir{
68cdf0e10cSrcweir    /** Create a text layout interface.<p>
69cdf0e10cSrcweir
70cdf0e10cSrcweir        Create a text layout interface for the given string, using
71cdf0e10cSrcweir        this font to generate the glyphs from.<p>
72cdf0e10cSrcweir
73cdf0e10cSrcweir        @param aText
74cdf0e10cSrcweir        The text to layout.
75cdf0e10cSrcweir
76cdf0e10cSrcweir        @param nDirection
77cdf0e10cSrcweir        Main text direction for the string specified. The main text
78cdf0e10cSrcweir        direction is e.g. important for characters that are not
79cdf0e10cSrcweir        strong, i.e. that change affinity according to the current
80cdf0e10cSrcweir        writing direction. Make sure that across text portions and
81cdf0e10cSrcweir        lines, the direction is set consistently.
82cdf0e10cSrcweir
83cdf0e10cSrcweir        @param nRandomSeed
84cdf0e10cSrcweir        Optional random seed for OpenType glyph variations.
85cdf0e10cSrcweir     */
86cdf0e10cSrcweir    XTextLayout											createTextLayout( [in] StringContext aText, [in] byte nDirection, [in] hyper nRandomSeed );
87cdf0e10cSrcweir
88cdf0e10cSrcweir    //-------------------------------------------------------------------------
89cdf0e10cSrcweir
90cdf0e10cSrcweir    /** Query the FontRequest that was used to generate this object.
91cdf0e10cSrcweir     */
92cdf0e10cSrcweir    FontRequest											getFontRequest();
93cdf0e10cSrcweir
94cdf0e10cSrcweir    //-------------------------------------------------------------------------
95cdf0e10cSrcweir
96cdf0e10cSrcweir    /** Query metric information about the font, that is generic to
97cdf0e10cSrcweir        all its glyphs.<p>
98cdf0e10cSrcweir
99cdf0e10cSrcweir        Note that the metric values in the returned result are in the
100cdf0e10cSrcweir        font coordinate system, i.e. relative to the corresponding
101cdf0e10cSrcweir        size of this font. That is, when this font was created with a
102cdf0e10cSrcweir        cell size of 20 units, the metrics returned are calculated
103cdf0e10cSrcweir        relative to this size.
104cdf0e10cSrcweir     */
105cdf0e10cSrcweir    FontMetrics											getFontMetrics();
106cdf0e10cSrcweir
107cdf0e10cSrcweir    //-------------------------------------------------------------------------
108cdf0e10cSrcweir
109cdf0e10cSrcweir    /** Query the list of available font sizes.<p>
110cdf0e10cSrcweir
111cdf0e10cSrcweir        This method queries the list of available font sizes (in
112cdf0e10cSrcweir        device units) for this font. For scalable fonts that are not
113cdf0e10cSrcweir        restricted to discrete sizes, this list is <em>empty</em>,
114cdf0e10cSrcweir        meaning that every size is possible. Fonts that <em>do</em>
115cdf0e10cSrcweir        restrict the device size to certain discrete values, setting
116cdf0e10cSrcweir        an overall transformation that scales the
117cdf0e10cSrcweir        <member>FontRequest::CellSize</member> to something not
118cdf0e10cSrcweir        contained in the list returned by this method can lead to
119cdf0e10cSrcweir        visible disturbances.<p>
120cdf0e10cSrcweir     */
121cdf0e10cSrcweir    sequence< double >                                      getAvailableSizes();
122cdf0e10cSrcweir
123cdf0e10cSrcweir    //-------------------------------------------------------------------------
124cdf0e10cSrcweir
125cdf0e10cSrcweir    /** Query the list of additional font properties.<p>
126cdf0e10cSrcweir     */
127cdf0e10cSrcweir    sequence< ::com::sun::star::beans::PropertyValue >	getExtraFontProperties();
128cdf0e10cSrcweir
129cdf0e10cSrcweir    //-------------------------------------------------------------------------
130cdf0e10cSrcweir
131cdf0e10cSrcweir};
132cdf0e10cSrcweir
133cdf0e10cSrcweir}; }; }; };
134cdf0e10cSrcweir
135cdf0e10cSrcweir#endif
136cdf0e10cSrcweir
137