Package com.ms.fx |
![]() Previous |
![]() Contents |
![]() Index |
![]() Next |
public class FxOutlineFont extends FxFont { // Fields protected Color backColor; protected Color color; // Constructor public FxOutlineFont(String name, int style, int size); // Methods public GlyphOutline getGlyphOutlineCallback(FxGraphics g, char ch); public boolean drawOutlineChar(FxGraphics g, int xOrig, int yOrig, GlyphOutline go); public boolean drawCharsCallback(FxGraphics g, char data[], int offset, int length, int x, int y, Rectangle optionRect, int options, int dx[], int dy[], boolean meta); public boolean drawBytesCallback(FxGraphics g, byte data[], int offset, int length, int x, int y, Rectangle optionRect, int options, int dx[], int dy[], boolean meta); public boolean drawStringCallback(FxGraphics g, String str, int x, int y, Rectangle optionRect, int options, int dx[], int dy[], boolean metaAdvVals); public void setColorCallback(Color c); public void setBackgroundCallback(Color c); }
A class that produces user-defined font objects.
The Microsoft com.ms.fx Java package is more powerful and more flexible than other graphics packages because it uses extensible objects .
public FxOutlineFont(String name, int style, int size);Creates a font object.
Parameter Description name The name of the font object. style The font style. size The font size.
public GlyphOutline getGlyphOutlineCallback(FxGraphics g, char ch);This method is called by an FxGraphics object to retrieve the outline of a character in the font.
Return Value:
Returns an OutlinePolygon object.
Parameter Description g The graphics object to use. ch The character whose outline is requested. Remarks:
This method is used internally and is not intended to be called by applications. It is made public so that derived classes may extend the callback functionality.
public boolean drawOutlineChar(FxGraphics g, int xOrig, int yOrig, GlyphOutline go);Draws an outline character.
Return Value:
Returns true if successful; otherwise, returns false.
Parameter Description g The graphics object to use. xOrig The x coordinate of the location to draw the character. yOrig The y coordinate of the location to draw the character. go The outline character to draw.
public boolean drawCharsCallback(FxGraphics g, char data[], int offset, int length, int x, int y, Rectangle optionRect, int options, int dx[], int dy[], boolean meta);This method is called by an FxGraphics object to draw an array of characters.
Return Value:
Returns true if successful; otherwise, returns false.
Parameter Description g The graphics object to use. data The array of characters. offset The offset. lenght The length of the array used. x The x coordinate of the location to draw the characters. y The y coordinate of the location to draw the characters. optionRect An optional rectangle used for clipping or opaquing. options The options used for this method. dx An array of dx values. dy An array of dy values. meta A Boolean value that determines if the meta advance values are used. Remarks:
This method is used internally and is not intended to be called by applications. It is made public so that derived classes may extend the callback functionality.
public boolean drawBytesCallback(FxGraphics g, byte data[], int offset, int length, int x, int y, Rectangle optionRect, int options, int dx[], int dy[], boolean meta);This method is called by an FxGraphics object to draw an array of bytes.
Return Value:
Returns true if successful; otherwise, returns false.
Parameter Description g The graphics object to use. data The array of bytes. offset The offset to use. length The length of the array used. x The x coordinate of the location where the bytes should be drawn. y The y coordinate of the location where the bytes should be drawn. optionRect An optional rectangle used for clipping or opaquing. options The options used for this method. dx An array of dx values. dy An array of dy values. meta A Boolean value that determines if the meta advance values are used. Remarks:
This method is used internally and is not intended to be called by applications. It is made public so that derived classes may extend the callback functionality.
public boolean drawStringCallback(FxGraphics g, String str, int x, int y, Rectangle optionRect, int options, int dx[], int dy[], boolean metaAdvVals);This method is called by an FxGraphics object to draw a string.
Return Value:
Returns true if successful; otherwise, returns false.
Parameter Description g The graphics object to use. str The string to draw. offset The offset to use. length The length of the array used. x The x coordinate of the location where the bytes should be drawn. y The y coordinate of the location where the bytes should be drawn. optionRect An optional rectangle used for clipping or opaquing. options The options used for this method. dx An array of dx values. dy An array of dy values. metaAdvVals A Boolean value that determines if the meta advance values are used. Remarks:
This method is used internally and is not intended to be called by applications. It is made public so that derived classes may extend the callback functionality.
public void setColorCallback(Color c);Sets the foreground color.
Return Value:
No return value.
Parameter Description c The color to set. Remarks:
Called by FxGraphics if setColor is called when an FxFont object is currently selected.
public void setBackgroundCallback(Color c);Sets the background color.
Return Value:
No return value.
Parameter Description c The color to set. Remarks:
Called by FxGraphics if setTextBackground is called when an IntelliFont object is currently selected.
© 1997 Microsoft Corporation. All rights reserved. Legal Notices.