Package cli.System.Drawing

Examples of cli.System.Drawing.StringFormat


    /**
     * {@inheritDoc}
     */
    @Override
    float getCodePointAdvance( int cp ) {
        StringFormat format = new StringFormat(StringFormat.get_GenericTypographic());

        format.set_FormatFlags( StringFormatFlags.wrap( StringFormatFlags.MeasureTrailingSpaces | StringFormatFlags.NoWrap |
                             StringFormatFlags.FitBlackBox ));
        format.set_Trimming( StringTrimming.wrap( StringTrimming.None ) );
        format.SetMeasurableCharacterRanges(new CharacterRange[] {new CharacterRange(0, 1)});
        Graphics g = createGraphics( frc );
        Region[] regions = g.MeasureCharacterRanges(String.valueOf((char)cp), font.getNetFont(),
                                                    new RectangleF(0, 0, Integer.MAX_VALUE, Integer.MAX_VALUE), format);
        SizeF size = regions[0].GetBounds(g).get_Size();
        regions[0].Dispose();
View Full Code Here

TOP

Related Classes of cli.System.Drawing.StringFormat

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.