GraphObject

 

Contents

Name

GraphObject

Remark

The GraphObject 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 GraphObject class is derived from the OriginObject class from which it inherits methods and properties.

Hierarchy

Examples

EX1

void GraphObject_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);
    }
}

header to Include

origin.h

Reference

Members

Name Brief Example
GetNode Get one node of a graph object in graph layer Examples
GetNumOfNodes Get number of nodes of a graph object in graph layer Examples
GetTempBoundingBox
GraphObject 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

Property

Name Brief Example
DisplayText The display text of a text label. Examples
Height Height in page (i.e. paper, logical) coordinate units of the object Examples
Left The left in page (i.e. paper, logical) coordinate units of the object Examples
Text The text of a text label. Read and Set access Examples
Top The top in page (i.e. paper, logical) coordinate units of the object Examples
Width Width in page (i.e. paper, logical) coordinate units of the object Examples