Drawing graphs.
Drawing graphs.
static int draw(ItemRef frame, char* graph_path)
Replace the contents of a frame with a graph. The graph is defined in a XML file. If the representation contains support points, these must be manually deleted prior to the new creation of the graph. The folllowing working method is suggested :
Name | Type | Default | Description |
Return | int | 0 or ErrorCode | |
frame | ItemRef | - | Target frame, in which the graph is to be inserted. |
graph_path | String or char* | - | XML file with the description of the graph. ? |
Set up the a new frame and draw a graph in this frame. The description of the graph can be found hier.
#include "internal/types.h"
int main () { ItemRef frame = item::alloc (); int result; float l, t, r, b;
result = frame::create ( frame, kRectangle, 100.0, 210.0, 300.0, 400.0, 1 // Seite ); if (result) { showmessage ("Rahmen anlegen : %s", serror (result)); item::release (frame); return 0; }
result = graph::draw (frame, "/Users/paul/Desktop/graph1.xml"); if (result) { showmessage ("Graphen zeichnen: %s", serror (result)); item::release (frame); return 0; }
item::release (frame); return 0; }
Alphabetic index HTML hierarchy of classes or Java