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