FxShapes Sample
This sample is located in \Samples\afc102\FxShapes.
Description
Using the Sample
Key Project Files
Technologies Demonstrated
Description
This sample shows the various pen lines, shapes, and styles provided by the com.ms.fx package. The sample displays a panel that contains the following components:
- The Primitive Types control provides options for selecting shapes. The default type is Line. The Formatted Text Option demonstrates both vertical writing and setting text along an outline.
- The Polygon #Points control increases or decreases the number of points that form a polygon from a minimum of 3 to a maximum of 10. This option is only enabled when the Polygon primitive type is selected.
- The Pen Styles control provides options for selecting styles that can be applied to a shape. The default style is Solid.
- The Pen Width control increases or decreases the width of the pen line. The default width is 4.
- The Test Area displays the shape with the options you've selected.
Using the Sample
To use the sample
You can manipulate the sample’s components by performing the following actions:
- Select different primitive types to enable the available pen styles and widths for the type. Options that are not available are dimmed.
- Change the position and scale of the primitive type by moving the mouse over the Test Area.
Key Project Files
BtnPanel.java
This class extends UIPanel and implements SDKConsts and IFxTextConstants. Its controls allow you to select the kind of object to be drawn, and the pen's texture and width.
PaintPnl.java
This class extends UIPanel and implements SDKConsts and IFxTextConstants. It creates the pens, formatted text, and the Test Area that displays the result of selected options.
Technologies Demonstrated
AFC
- This sample shows the various pen lines, shapes, and styles provided by the com.ms.fx package.
© 1999 Microsoft Corporation. All rights reserved. Terms of use.