DirectAnimation Animated Header --FontStyleBvr Class DirectAnimation Animated Header --FontStyleBvr Class* Microsoft DirectAnimation SDK
*Contents  *Index  *Topic Contents
*Previous Topic: EventCallbackObject Interface
*Next Topic: GeometryBvr Class

FontStyleBvr Class


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).

FontStyleBvr Methods

bullet1.gifbold

bullet1.gifcolor

bullet1.giffamily

bullet1.gifitalic

bullet1.gifsize

bullet1.gifstrikethrough

bullet1.giftextAntialiasing

bullet1.gifunderline

bullet1.gifweight

bullet1.gifnewUninitBvr


bold

FontStyleBvr Class

Specifies that, when the string is rendered into an image, it will be in bold.

public FontStyleBvr bold( );

Return Values

Returns the FontStyleBvr object.


color

FontStyleBvr Class

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
  );

Parameters
color
The ColorBvr object specifying the color of the string.
Return Values

Returns the FontStyleBvr object.


family

FontStyleBvr Class

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
  );

Parameters
face
The StringBvr object specifying the font face. This behavior can also be of type java.lang.String.
Return Values

Returns the FontStyleBvr object.


italic

FontStyleBvr Class

Specifies that, when the string is rendered into an image, it will be italicized.

public FontStyleBvr italic( );

Return Values

Returns the FontStyleBvr object.


size

FontStyleBvr Class

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
  );

Parameters
points
The NumberBvr object specifying the size of the font. This parameter can also be of type double.
Return Values

Returns the FontStyleBvr object.


strikethrough

FontStyleBvr Class

Specifies that, when the string is rendered into an image, it will be struck through.

public FontStyleBvr strikethrough( );

Return Values

Returns the FontStyleBvr object.


textAntialiasing

FontStyleBvr Class

Determines whether the text will be antialiased.

public FontStyleBvr textAntialiasing(
  double antiAliasing
  );

Parameters
antiAliasing
A double that specifies whether or not the text will be antialiased. A 0 (the default value) means there is no antialiasing and a 1 means there is.
Return Values

Returns the FontStyleBvr object.


underline

FontStyleBvr Class

Specifies that, when a string is rendered into an image, it will be underlined.

public FontStyleBvr underline( );

Return Values

Returns the FontStyleBvr object.


weight

FontStyleBvr Class

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
  );

Parameters
weight
A 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 Values

Returns the FontStyleBvr object.


newUninitBvr

FontStyleBvr Class

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( );

Return Values

Returns the FontStyleBvr object.

Relevant Methods from the Statics Class

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);

Relevant Fields from the Statics Class

The following fields are defined in the Statics class and are most relevant to objects of type FontStyleBvr.

public final static FontStyleBvr defaultFont;

© 1998 Microsoft Corporation. All rights reserved. Terms of Use.

*Top of Page