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