gx_font.h

来自「This is a resource based on j2me embedde」· C头文件 代码 · 共 89 行

H
89
字号
/* *    * * Copyright  1990-2007 Sun Microsystems, Inc. All Rights Reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER *  * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License version * 2 only, as published by the Free Software Foundation. *  * This program is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License version 2 for more details (a copy is * included at /legal/license.txt). *  * You should have received a copy of the GNU General Public License * version 2 along with this work; if not, write to the Free Software * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA * 02110-1301 USA *  * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa * Clara, CA 95054 or visit www.sun.com if you need additional * information or have any questions. */#ifndef _GX_FONT_H#define _GX_FONT_H/** * @defgroup lowui_gx Common Putpixel And Platform Graphics External Interface * @ingroup lowui *//** * @file * @ingroup lowui_gx * * @brief Porting api for graphics library */#include <kni.h>#ifdef __cplusplusextern "C" {#endif/** * Obtains the ascent, descent and leading info for the font indicated. * * @param face The face of the font (Defined in <B>Font.java</B>) * @param style The style of the font (Defined in <B>Font.java</B>) * @param size The size of the font (Defined in <B>Font.java</B>) * @param ascent The font's ascent should be returned here. * @param descent The font's descent should be returned here. * @param leading The font's leading should be returned here. */extern void gx_get_fontinfo(int face, int style, int size,                            int *ascent, int *descent, int *leading);/** * Gets the advance width for the first n characters in charArray if * they were to be drawn in the font indicated by the parameters. * * <p> * <b>Reference:</b> * Related Java platform declaration: * <pre> *     charsWidth(chars ch[])I * </pre> * * @param face The font face to be used (Defined in <B>Font.java</B>) * @param style The font style to be used (Defined in * <B>Font.java</B>) * @param size The font size to be used. (Defined in <B>Font.java</B>) * @param charArray The string to be measured * @param n The number of character to be measured * @return The total advance width in pixels (a non-negative value) */extern int gx_get_charswidth(int face, int style, int size,                              const jchar *charArray, int n);#ifdef __cplusplus}#endif#endif /* _GX_FONT_H */

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?