The FontStyleBvr class is used to specify how strings will be rendered into images. These methods are similar to the HTML tags specifying the font face (called here a family), size, color and attributes (bold and italic).
For relevant methods and fields from the Statics class, see the following topics.
FontStyleBvr Methods
bold Specifies that, when the string is rendered into an image, it will be in bold. color Specifies the color of the string when it is rendered into an image. family Specifies the font face that will be used when the image is rendered. italic Specifies that, when the string is rendered into an image, it will be italicized. size Specifies the size of the font, in points. strikethrough Specifies that, when the string is rendered into an image, it will be struck through. textAntialiasing Determines whether the text will be antialiased. underline Specifies that, when a string is rendered into an image, it will be underlined. weight Specifies the thickness of the boldness of the font. newUninitBvr Enables you to refer to a FontStyleBvr behavior before that behavior has been defined.
Specifies that, when the string is rendered into an image, it will be in bold.
Syntax
public FontStyleBvr bold( );
Return Value
Returns the FontStyleBvr object.
Specifies the color of the string when it is rendered into an image. Because this is a ColorBvr object, the color can vary over time.
Syntax
public FontStyleBvr color( ColorBvr color );
Parameters
- color
- ColorBvr object specifying the color of the string.
Return Value
Returns the FontStyleBvr object.
Specifies the font face that will be used when the image is rendered. Because this is a StringBvr object, the face can vary over time.
Syntax
public static FontStyleBvr family( StringBvr face );
Parameters
- face
- StringBvr object specifying the font face. This behavior can also be of type java.lang.String.
Return Value
Returns the FontStyleBvr object.
Specifies that, when the string is rendered into an image, it will be italicized.
Syntax
public FontStyleBvr italic( );
Return Value
Returns the FontStyleBvr object.
Specifies the size of the font, in points. Because this is a NumberBvr object, the size can vary over time. This parameter can also be of type double.
Syntax
public FontStyleBvr size( NumberBvr points );
Parameters
- points
- NumberBvr object specifying the size of the font. This parameter can also be of type double.
Return Value
Returns the FontStyleBvr object.
Specifies that, when the string is rendered into an image, it will be struck through.
Syntax
public FontStyleBvr strikethrough( );
Return Value
Returns the FontStyleBvr object.
Determines whether the text will be antialiased.
Syntax
public FontStyleBvr textAntialiasing( double antiAliasing );
Parameters
- antiAliasing
- A double value that specifies whether the text will be antialiased. A 0 (the default value) means there is no antialiasing and a 1 means there is.
Return Value
Returns the FontStyleBvr object.
Specifies that, when a string is rendered into an image, it will be underlined.
Syntax
public FontStyleBvr underline( );
Return Value
Returns the FontStyleBvr object.
Specifies the thickness of the boldness of the font. This attribute can be thought of as an animated bold. Note that the font itself will have specific, discrete settings for the different weights. Varying this value will not, therefore, result in a continuous change but in a series of discrete changes. The FontStyleBvr.bold method always overrides this setting.
Syntax
public FontStyleBvr weight( NumberBvr weight );
Parameters
- weight
- NumberBvr object that specifies the thickness of the boldness of the font. The value can range from 0 (the thinnest) to 1 (the thickest). This parameter can also be of type double.
Return Value
Returns the FontStyleBvr object.
Enables you to refer to a FontStyleBvr behavior before that behavior has been defined. With this method you can create the behavior and use it in the definition of other behaviors, but not actually define its contents until some later point. (This is accomplished with the init method, which is available on all behaviors.)
Syntax
public static FontStyleBvr newUninitBvr( );
Return Value
Returns the FontStyleBvr object.
Top of Page
© 2000 Microsoft and/or its suppliers. All rights reserved. Terms of Use.