GraphObjectBase
The GraphObjectBase class provides methods and properties common to all Origin graph objects.
Origin graph objects include such things as text annotations, graphic annotations (e.g. rectangles, arrows, line objects, etc.), data plot style holders, and region of interest objects.
Origin graph objects are generally contained by layers on an Origin page thus the Origin C GraphLayer class contains a collection of GraphObjects.
An Origin C GraphObject is a wrapper object that is a reference to an internal Origin graph object. Origin C wrapper objects do not actually exist in Origin and merely refer to the internal Origin object. Consequently, multiple Origin C wrapper objects can refer to the same internal Origin object.
The GraphObjectBase class is derived from the OriginObject class from which it inherits methods and properties.
EX1
void GraphObjectBase_ex1() { GraphPage gp; gp.Create("origin"); GraphLayer gl(gp.GetName(), 0); if(gl) // If valid graph layer... { GraphObject go; // Declare GraphObject go = gl.GraphObjects("YL"); // Attach go to "YL" which is the the left Y-axis title out_str(go.Text); } }
origin.h
Name | Brief | Example |
---|---|---|
ExtractImageToFile | It extracts into a file an enhanced metafile or device independent bitmap depending on the type of GraphObj. (which could have been generated, e.g, by pasting a picture) | Examples |
GetLinkTable | Finds if any (usually true for table Objects) linked worksheet. | Examples |
GetObjectType | The type of the graphic object as a string. | Examples |
GraphObjectBase | Default constructor which creates a GraphObject which is not attached to an internal graphic object. It should be initialized using "GraphObjects" method of the Layer class because all the GraphObject's are conatined in layers. | Examples |
MoveObject | Bring object to the front or push it to the back etc. | Examples |
SetMetafile | Set HMETAFILE to GraphObject |
Name | Brief | Example |
---|---|---|
Attach | The attach mode of the object. Read and Set access.Possible values are 0 - to Layer 1 - to Page 2 - to axes |
Examples |
DX | Width of the object in axes units. Read and Set access | Examples |
DY | Height of the object in axes units. Read and Set access | Examples |
X | The X coordinate of the center of the object. Read and Set access | Examples |
XTemp | The X coordinate of the center of the object when it is being moved. Read access | Examples |
Y | The Y coordinate of the center of the object. Read and Set access | Examples |
YTemp | The Y coordinate of the center of the object when it is being moved. Read access | Examples |