#include <ShapeUpAPI.h>
Inheritance diagram for SUShape:
Public Member Functions | |
SUShape () | |
SUShape (SUHANDLE hShape) | |
bool | IsSelected (SUHANDLE hTheme) const |
void | Select (SUHANDLE hTheme, bool bSelect) |
ShapeType | GetShapeType () const |
void | GetBounds (SURectf &r) const |
size_t | GetPartCount () const |
size_t | GetCoordinateCount (size_t part) const |
void | GetCoordinate (size_t part, size_t coordIndex, SUPointf &coord) const |
void | GetClosestPoint (const SUPointf &ref, SUPointf &closest) const |
std::string | GetAttribute (SUHANDLE hTheme, size_t index) const |
void | SetAttribute (SUHANDLE hTheme, size_t index, const char *data) |
void | SetAttributes (SUHANDLE hTheme, size_t count, const char *data[]) |
size_t | GetShapeSizeBytes () const |
void | GetShapeBytes (unsigned char *buffer, size_t bufferSize) const |
SUShape::SUShape | ( | ) | [inline] |
Default constructor.
SUShape::SUShape | ( | SUHANDLE | hShape | ) | [inline] |
Constructor.
hShape | = handle to a ShapeUp shape. |
bool SUShape::IsSelected | ( | SUHANDLE | hTheme | ) | const [inline] |
Checks whether a shape is selected or not.
hTheme | = handle to a ShapeUp theme, or a SUTheme object, in which to find this object. Note: A shape can be contained in more than one theme under certain circumstances. |
void SUShape::Select | ( | SUHANDLE | hTheme, | |
bool | bSelect | |||
) | [inline] |
Selects or deselects the shape object.
hTheme | = handle to a ShapeUp theme, or a SUTheme object, in which to find this object. Note: A shape can be contained in more than one theme under certain circumstances. | |
bSelect | = if true, the shape will be selected, else deselected. |
ShapeType SUShape::GetShapeType | ( | ) | const [inline] |
Gets the shape type of this shape.
void SUShape::GetBounds | ( | SURectf & | r | ) | const [inline] |
Gets the shapes bounding box.
r | [out] = a rectangle that will receive the shape bounds. |
size_t SUShape::GetPartCount | ( | ) | const [inline] |
Gets the count of all parts in this shape.
size_t SUShape::GetCoordinateCount | ( | size_t | part | ) | const [inline] |
Gets the count of all coordinates in a part for this shape.
part | [in] = zero based index of the part to query. |
void SUShape::GetCoordinate | ( | size_t | part, | |
size_t | coordIndex, | |||
SUPointf & | coord | |||
) | const [inline] |
Gets a coordinate from this shape.
part | [in] = zero based index of the part to query. | |
coordIndex | [in] = zero based index of the coordinate of the part to query. | |
coord | [out] = the coordinate at the specified index. |
Gets the coordinate of this shape closest to a reference point.
ref | [in] = reference point. | |
closest | [out] = the coordinate on this shape closest to ref. |
std::string SUShape::GetAttribute | ( | SUHANDLE | hTheme, | |
size_t | index | |||
) | const [inline] |
Queries this shape for one of its attributes.
hTheme | = handle to a ShapeUp theme, or a SUTheme object, in which to find this object. Note: A shape can be contained in more than one theme under certain circumstances. | |
index | = zero-based index of the attribute column to query. |
void SUShape::SetAttribute | ( | SUHANDLE | hTheme, | |
size_t | index, | |||
const char * | data | |||
) | [inline] |
Sets an attribute for this shape.
hTheme | = handle to a ShapeUp theme, or a SUTheme object, in which to find this object. Note: A shape can be contained in more than one theme under certain circumstances. | |
index | = zero-based index of the attribute column to set. | |
data | = null-terminated string containing the attribute data. |
void SUShape::SetAttributes | ( | SUHANDLE | hTheme, | |
size_t | count, | |||
const char * | data[] | |||
) | [inline] |
Sets multiple attribute values of a shape within a theme.
hTheme | is an SUHANDLE to the theme containing the shape. | |
count | is the number of attribute values in data. | |
data | is an array of null-terminated strings that contains the new values. The data array may contain fewer attributes than the theme can handle. To avoid affecting an attribute value, set the appropriate field to NULL. To clear an attribute, set the field to an empty string, "". |
size_t SUShape::GetShapeSizeBytes | ( | ) | const [inline] |
Queries this shape for how many bytes are required to store the underlying binary shape object.
void SUShape::GetShapeBytes | ( | unsigned char * | buffer, | |
size_t | bufferSize | |||
) | const [inline] |
Retrieves the underlying binary shape object.
buffer | = a byte buffer larege enough to store the binary shape object. To get the size needed, first query the shape using the GetShapeSizeBytes() method. | |
bufferSize | = the size in bytes of buffer. |