![]() |
CNiShape | ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() |
Class |
Declared in: NiShape.h |
Overview
CNiShape encapsulates the interface to a single shape for an annotation on a graph control, which allows you to modify the appearance and behavior of the shape.
You get individual shapes using the Shape property on a CNiAnnotation object.
Note: To specify a date/time value, you must convert your date or time value to a double. A date is implemented as a floating-point value with the integer part of the number measuring days from midnight, 30 December 1899, and the fractional part representing the time of day. The absolute value of the fractional part of the number represents the time as a fraction of a day. Thus, 1 second equals 1 / 24 hours / 60 minutes, which is 1/86400 or approximately 1.157407e-5. So, midnight, 31 December 1899, is represented by 1.0. Similarly, 6 AM, 1 January 1900, is represented by 2.25, and midnight, 29 December 1899, is -1.0. However, 6 AM, 29 December 1899, is -1.25.
Base Classes
Data Items
![]() |
CNiColor | Color | Specifies the color of the shape. |
![]() |
bool | FillVisible | Specifies if the shape is filled with CNiShape::Color. |
![]() |
CNiImage | Image | Specifies the shape image. |
![]() |
CNiColor | LineColor | Specifies the line color of the shape. |
![]() |
LineStyles | LineStyle | Specifies the line style of the shape. |
![]() |
short | LineWidth | Specifies the line width of the shape. |
![]() |
PointStyles | PointStyle | Specifies the point style for the shape. |
![]() |
RegionAreas | RegionArea | Specifies the region area of the shape. |
![]() |
Types | Type | Specifies the type of shape. |
![]() |
CNiReal64Vector | XCoordinates | Specifies the x coordinates of the shape. |
![]() |
CNiReal64Vector | YCoordinates | Specifies the y coordinates of the shape. |
Constructors
![]() |
CNiShape() |
Default constructor. | |
![]() |
CNiShape( CWShape_CI* pCustom, CNiInterface::ThreadAccess option ) |
Constructor that attaches to the specified CWShape_CI pointer. | |
![]() |
CNiShape( const CNiShape& source ) |
Copy constructor. |
Destructors
Functions
![]() |
static const IID & | GetIid() |
Returns the globally unique identifier (GUID) of the ActiveX interface to which this class connects. |
![]() |
const CNiShape & | Assignment operator. | |
![]() |
void | SetCoordinates( const CNiVector & xCoordinates, const CNiVector & yCoordinates ) |
Sets the x and y coordinates of the shape at the same time. |
Example
// Change the type of the shape on the first annotation.
CNiGraph graph; CNiShape shape = graph.Annotations.Item(1).Shape; shape.Type = CNiShape::Rectangle;