public class FontStyleBvr extends Behavior { // Methods public FontStyleBvr bold(); public FontStyleBvr color(ColorBvr color); public FontStyleBvr family(StringBvr face); public FontStyleBvr italic(); public FontStyleBvr size(NumberBvr points); public FontStyleBvr strikethrough(); public FontStyleBvr textAntialiasing(double antiAliasing); public FontStyleBvr underline(); public FontStyleBvr weight(NumberBvr weight); public static FontStyleBvr newUninitBvr();
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).
Specifies that, when the string is rendered into an image, it will be in bold.
public FontStyleBvr bold( );
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.
public FontStyleBvr color(
ColorBvr color
);
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.
public static FontStyleBvr family(
StringBvr face
);
Returns the FontStyleBvr object.
Specifies that, when the string is rendered into an image, it will be italicized.
public FontStyleBvr italic( );
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.
public FontStyleBvr size(
NumberBvr points
);
Returns the FontStyleBvr object.
Specifies that, when the string is rendered into an image, it will be struck through.
public FontStyleBvr strikethrough( );
Returns the FontStyleBvr object.
Determines whether the text will be antialiased.
public FontStyleBvr textAntialiasing(
double antiAliasing
);
Returns the FontStyleBvr object.
Specifies that, when a string is rendered into an image, it will be underlined.
public FontStyleBvr underline( );
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.
public FontStyleBvr weight(
NumberBvr weight
);
Returns the FontStyleBvr object.
This method allows 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.)
public static FontStyleBvr newUninitBvr( );
Returns the FontStyleBvr object.
The following methods are defined in the Statics class and are most relevant to objects of type FontStyleBvr.
public static FontStyleBvr font(StringBvr face, NumberBvr size, ColorBvr color);
The following fields are defined in the Statics class and are most relevant to objects of type FontStyleBvr.
public final static FontStyleBvr defaultFont;
© 1997 Microsoft Corporation. All rights reserved. Terms of Use.