![]() |
||
|
[ First | Prev | Next | Last ] Shape Essentials1 CFODrawShapeCFODrawShape is the base class for all visual Shapes and components in XD++. A Shape has properties, two-dimensional bounds, and can draw itself onto a device context. Every Shape is associated with a unique name and Shape type. The CFODrawShape class is derived from FOIUnknown. 2 Shape Name Each Shape has a name that distinguishes from the other Shapes on the form. 3 TypeThis identifies the type of Shape. The type is set for primitive Shapes. For example, a button Shape is automatically assigned a type of FO_CUSTOM_COMP, You can change the type of a Shape by calling its SetType() method. 4 CaptionEvery Shape has a Caption. By default, the Caption is the same as the name. You can set the name through the Shape's SetObjectCaption() method. 5 Shape PropertiesEach Shape can have zero or more properties associated with it. Properties help to define the appearance and behavior of a Shape. Property values are stored as a list of pointers to property value objects, which are instances of classes derived from CFOBaseProperties. Developers can add their own custom properties to a class of Shapes. 6 Control PointsThere are nine control points on a Shape. They are situated around the Shape's bounding box: one on each corner, one halfway along each side, plus there is one in the center of the Shape.
7 HandlesThe grab handles appear on a Shape when it is selected by the end-user. These handles allow the end-user to see what is selected and then scale the Shape or move its vertices. On most Shapes, the grab handles are the eight control points around the edges of the bounding box. 8
Bullets (new) 9 User DataA Shape also has a generic CObject pointer that you can set to hold anything you like. There is no specific use for this pointer other than to allow the programmer to associate application specific data with a Shape. The object assigned to the user data pointer must be derived from CObject and support MFC serialization. 10 RegionEach Shape knows the amount of logical space it fills as defined by the canvas. The regions of a Shape's children are combined with its own to form one logical region. This region is used extensively for hit testing and screen invalidation. The bounding box for a Shape is calculated from this region object. Current XD++ ships with the following basic drawing Shapes, you can create your own Shape using XD++ Class Generator. 11.Basic Drawing Shapes
(Includes drawing basic shape (Line, Bezier Line, Rectangle, Ellipse etc), and normal link line, corner link line, UpRight link line and Bezier link line) 12.Custom shapes Add over 50 custom Shapes, as following:
13.Composite Shapes:
For Visual C++ 6.0, Visual C++.net 7.0, Visual C++.net 7.1 You can create composite shape with shapedesigner application ships with full source kit.
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||
Copyright ?1998-2007 UCanCode.Net Software, all rights reserved.
Other product and company names herein may be the trademarks of their respective owners.
Please direct your questions or comments to webmaster@ucancode.com