DADiSP 6.5 B05 Release Notes
New Shape and Text Annotations
DADiSP 6.5 includes enhanced rectangle, ellipse, polyline, polygon and text objects.
Shape and text objects can be generated from the toolbar or created
programatically. The following annotation capabilities are available:
- Updated "Drawing Toolbar" supports rectangle, ellipse and
polygon filled or transparent shape creation.
- Full dialog based text, shape and line property editing.
- Add Worksheet Title and/or Footer Text.
- Associate arbitrary text tags with any shape or line.
- Reference text, shapes or lines by an object handle.
Object handles can get or set object properties using
a simple
handle.property
syntax. For example:
// generate a line
1..100;
// add text to plot
handle = text(10.0, 20.0, "My Text");
color = handle.color; // get object color
handle.color = lred; // set color to light red
handle.text = "Example Text"; // set object text |
This example draws a rectangle in a Window and uses the object
handle to set the color, width and fill color of the rectangle.
W1: gsin(100,.01);
h = rectdraw(W1, 0.2, -0.5, 0.6, 1.0);
h.color = lred; h.width = 4;h.fill = yellow; |
- Find any object based on property values. For example:
returns an array of handles to all the text, line or shape objects
in W1.
h = findhandle(W1, "color", lred); |
returns an array of handles to all the text, line or shape objects
in W1 with a color of light red.
h = findhandle(W1, "color", lred, "shape", "ellipse");
h.fill = lgreen; |
returns an array of handles to all the ellipse objects
in W1 with a border color of light red and then sets the
interior colors of those objects to light green. Any combination
of property values can be specified to locate objects.
The findtext
function searches for text objects only
and findshape
searches for shapes and
lines only.