An interface to Alias Canvas objects. Note that some functionality works only in OpenAlias plugins.
#include <AlCanvas.h>
class AlCanvas : public AlObject
struct CanvasLocation {
double origin[3];
double scale[2];
double axisX[3];
double axisY[3];
double axisZ[3];
};
struct CanvasInfo {
const char* name;
int imageSize[2];
void* image;
};
struct CanvasFileInfo {
const char* name;
const char* absoluteFilePath;
};
virtual ~AlCanvas();
AlCanvas();
virtual AlObject* copyWrapper() const;
virtual statusCode deleteObject();
virtual AlObjectType type() const;
const char * name() const;
statusCode setName( const char*);
// Only for use in OpenAlias plugins. Creation of canvas images
// can not be done from an OpenModel executable.
statusCode create(CanvasInfo&, CanvasLocation&);
statusCode create(CanvasFileInfo&, CanvasLocation&);
statusCode createInWindow(CanvasInfo&);
statusCode createInWindow(CanvasFileInfo&);
AlConstructionPlane* plane();
statusCode pick(API_BOOLEAN);
API_BOOLEAN isPicked() const;
statusCode getImage( CanvasInfo& );This wrapper provides access to Alias canvas objects. Some functions work only in OpenAlias binaries, not in OpenModel ones. If such restrictions apply, it is noted in the function description.
Construct a new AlCanvas wrapper object.
Deconstruct an AlCanvas wrapper object.
Makes a copy of the AlCanvas. The returned AlCanvas will reference the same data as the original.
Deletes the canvas wrapped by the AlCanvas wrapper.
sSuccess - the object was deleted
sFailure - an internal failure occurred
sInvalidObject - the object was invalid
Returns the class identifier ’kCanvasType’.
Returns a pointer to this canvas’s name.
Changes the canvas’s name to the given name. If the given name is not a unique one, then a unique name is generated based on the given name and assigned to the canvas. In this case, a status code of ’sNameChangedToUniqueOne’ is returned. A copy of the argument string is made, so you are responsible for deleting it.
< newName - the name to be given to the canvas
sSuccess - successful
sInvalidObject - the canvas is not valid
sInvalidArgument - given pointer is NULL
Create a new canvas.
This function works only in OpenAlias plugins.
sSuccess - the canvas was created
sFailure - the canvas failed to be createdCanvasLocation
sAlreadyCreated - object has already been created
Create a new canvas.
This function works only in OpenAlias plugins.
sSuccess - the canvas was created
sFailure - the canvas failed to be created
sAlreadyCreated - object has already been created
Create a new canvas in the current modeling window.
This function works only in OpenAlias plugins.
sSuccess - the canvas was created
sFailure - the canvas failed to be created
sAlreadyCreated - object has already been created
Create a new canvas in the current modeling window.
This function works only in OpenAlias plugins.
sSuccess - the canvas was created
sFailure - the canvas failed to be created
sAlreadyCreated - object has already been created
Return a new construction plane that coincides with the canvas of this wrapper.
Sets the Pick Status of the canvas
< state - new state of the canvas, a value of true makes the canvas picked and false sets it to unpicked
sSuccess - the state was set
sFailure - internal error
sInvalidObject - the object is not valid
Returns the pick status of the Canvas.
true - if the Canvas is picked
false - if it is not picked, the object is invalid
Returns the image of this canvas.
Works only in an OpenAlias plugin.
> info - the canvas info
sSuccess - the canvas info was written.
sFailure - the wrapper is invalid or called in an OpenModel plugin
sInvalidObject - the canvas this wrapper contains could not be found