当前位置: 首页>>代码示例>>Java>>正文


Java GlyphLayout.get方法代码示例

本文整理汇总了Java中sun.font.GlyphLayout.get方法的典型用法代码示例。如果您正苦于以下问题:Java GlyphLayout.get方法的具体用法?Java GlyphLayout.get怎么用?Java GlyphLayout.get使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在sun.font.GlyphLayout的用法示例。


在下文中一共展示了GlyphLayout.get方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: layoutGlyphVector

import sun.font.GlyphLayout; //导入方法依赖的package包/类
/**
 * Returns a new <code>GlyphVector</code> object, performing full
 * layout of the text if possible.  Full layout is required for
 * complex text, such as Arabic or Hindi.  Support for different
 * scripts depends on the font and implementation.
 * <p>
 * Layout requires bidi analysis, as performed by
 * <code>Bidi</code>, and should only be performed on text that
 * has a uniform direction.  The direction is indicated in the
 * flags parameter,by using LAYOUT_RIGHT_TO_LEFT to indicate a
 * right-to-left (Arabic and Hebrew) run direction, or
 * LAYOUT_LEFT_TO_RIGHT to indicate a left-to-right (English)
 * run direction.
 * <p>
 * In addition, some operations, such as Arabic shaping, require
 * context, so that the characters at the start and limit can have
 * the proper shapes.  Sometimes the data in the buffer outside
 * the provided range does not have valid data.  The values
 * LAYOUT_NO_START_CONTEXT and LAYOUT_NO_LIMIT_CONTEXT can be
 * added to the flags parameter to indicate that the text before
 * start, or after limit, respectively, should not be examined
 * for context.
 * <p>
 * All other values for the flags parameter are reserved.
 *
 * @param frc the specified <code>FontRenderContext</code>
 * @param text the text to layout
 * @param start the start of the text to use for the <code>GlyphVector</code>
 * @param limit the limit of the text to use for the <code>GlyphVector</code>
 * @param flags control flags as described above
 * @return a new <code>GlyphVector</code> representing the text between
 * start and limit, with glyphs chosen and positioned so as to best represent
 * the text
 * @throws ArrayIndexOutOfBoundsException if start or limit is
 * out of bounds
 * @see java.text.Bidi
 * @see #LAYOUT_LEFT_TO_RIGHT
 * @see #LAYOUT_RIGHT_TO_LEFT
 * @see #LAYOUT_NO_START_CONTEXT
 * @see #LAYOUT_NO_LIMIT_CONTEXT
 * @since 1.4
 */
public GlyphVector layoutGlyphVector(FontRenderContext frc,
                                     char[] text,
                                     int start,
                                     int limit,
                                     int flags) {

    GlyphLayout gl = GlyphLayout.get(null); // !!! no custom layout engines
    StandardGlyphVector gv = gl.layout(this, frc, text,
                                       start, limit-start, flags, null);
    GlyphLayout.done(gl);
    return gv;
}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:55,代码来源:Font.java

示例2: layoutGlyphVector

import sun.font.GlyphLayout; //导入方法依赖的package包/类
/**
 * Returns a new {@code GlyphVector} object, performing full
 * layout of the text if possible.  Full layout is required for
 * complex text, such as Arabic or Hindi.  Support for different
 * scripts depends on the font and implementation.
 * <p>
 * Layout requires bidi analysis, as performed by
 * {@code Bidi}, and should only be performed on text that
 * has a uniform direction.  The direction is indicated in the
 * flags parameter,by using LAYOUT_RIGHT_TO_LEFT to indicate a
 * right-to-left (Arabic and Hebrew) run direction, or
 * LAYOUT_LEFT_TO_RIGHT to indicate a left-to-right (English)
 * run direction.
 * <p>
 * In addition, some operations, such as Arabic shaping, require
 * context, so that the characters at the start and limit can have
 * the proper shapes.  Sometimes the data in the buffer outside
 * the provided range does not have valid data.  The values
 * LAYOUT_NO_START_CONTEXT and LAYOUT_NO_LIMIT_CONTEXT can be
 * added to the flags parameter to indicate that the text before
 * start, or after limit, respectively, should not be examined
 * for context.
 * <p>
 * All other values for the flags parameter are reserved.
 *
 * @param frc the specified {@code FontRenderContext}
 * @param text the text to layout
 * @param start the start of the text to use for the {@code GlyphVector}
 * @param limit the limit of the text to use for the {@code GlyphVector}
 * @param flags control flags as described above
 * @return a new {@code GlyphVector} representing the text between
 * start and limit, with glyphs chosen and positioned so as to best represent
 * the text
 * @throws ArrayIndexOutOfBoundsException if start or limit is
 * out of bounds
 * @see java.text.Bidi
 * @see #LAYOUT_LEFT_TO_RIGHT
 * @see #LAYOUT_RIGHT_TO_LEFT
 * @see #LAYOUT_NO_START_CONTEXT
 * @see #LAYOUT_NO_LIMIT_CONTEXT
 * @since 1.4
 */
public GlyphVector layoutGlyphVector(FontRenderContext frc,
                                     char[] text,
                                     int start,
                                     int limit,
                                     int flags) {

    GlyphLayout gl = GlyphLayout.get(null); // !!! no custom layout engines
    StandardGlyphVector gv = gl.layout(this, frc, text,
                                       start, limit-start, flags, null);
    GlyphLayout.done(gl);
    return gv;
}
 
开发者ID:AdoptOpenJDK,项目名称:openjdk-jdk10,代码行数:55,代码来源:Font.java

示例3: layoutGlyphVector

import sun.font.GlyphLayout; //导入方法依赖的package包/类
/**
 * Returns a new <code>GlyphVector</code> object, performing full
 * layout of the text if possible.  Full layout is required for
 * complex text, such as Arabic or Hindi.  Support for different
 * scripts depends on the font and implementation.  
 * <p>
 * Layout requires bidi analysis, as performed by 
 * <code>Bidi</code>, and should only be performed on text that
 * has a uniform direction.  The direction is indicated in the
 * flags parameter,by using LAYOUT_RIGHT_TO_LEFT to indicate a
 * right-to-left (Arabic and Hebrew) run direction, or 
 * LAYOUT_LEFT_TO_RIGHT to indicate a left-to-right (English) 
 * run direction.
 * <p>
 * In addition, some operations, such as Arabic shaping, require 
 * context, so that the characters at the start and limit can have 
 * the proper shapes.  Sometimes the data in the buffer outside
 * the provided range does not have valid data.  The values
 * LAYOUT_NO_START_CONTEXT and LAYOUT_NO_LIMIT_CONTEXT can be
 * added to the flags parameter to indicate that the text before
 * start, or after limit, respectively, should not be examined
 * for context.
 * <p>
 * All other values for the flags parameter are reserved.
 * 
 * @param frc the specified <code>FontRenderContext</code>
 * @param text the text to layout
 * @param start the start of the text to use for the <code>GlyphVector</code>
 * @param limit the limit of the text to use for the <code>GlyphVector</code>
 * @param flags control flags as described above
 * @return a new <code>GlyphVector</code> representing the text between
 * start and limit, with glyphs chosen and positioned so as to best represent 
 * the text
 * @throws ArrayIndexOutOfBoundsException if start or limit is 
 * out of bounds
 * @see java.text.Bidi
 * @see #LAYOUT_LEFT_TO_RIGHT
 * @see #LAYOUT_RIGHT_TO_LEFT
 * @see #LAYOUT_NO_START_CONTEXT
 * @see #LAYOUT_NO_LIMIT_CONTEXT
 * @since 1.4
 */
public GlyphVector layoutGlyphVector(FontRenderContext frc,
                                     char[] text,
                                     int start,
                                     int limit,
                                     int flags) {

    GlyphLayout gl = GlyphLayout.get(null); // !!! no custom layout engines
    StandardGlyphVector gv = gl.layout(this, frc, text,
                                       start, limit-start, flags, null);
    GlyphLayout.done(gl);
    return gv;
}
 
开发者ID:jgaltidor,项目名称:VarJ,代码行数:55,代码来源:Font.java


注:本文中的sun.font.GlyphLayout.get方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。