14. Overview PensΒΆ
Example
The following example creates a sin dataset with a 0.4 mm line.
// Create sin curve
x = linspace(0,2*PI,100);
y = sin(x);
h = plot(x, y);
// Create pen
hPen = PenCreate(PS_DASH, 4, [255, 0, 0]);
// Set pen for the new dataset (0.4 mm, red)
XYSetPen(h[3], hPen);
// Delete Pen
// The ...SetPen functions uses
// a copy of the pen
PenDestroy(hPen);
Create and Destroy | |
---|---|
PenCreate | Creates a pen object. |
PenDestroy | PenDestroy destroys the given pen and frees any memory the pen occupied. |
PenDialog | PenDialog displays a dialog box to configure a pen object. |
Set | |
---|---|
PenSetColor | PenSetColor sets the line color of a pen object. |
PenSetStyle | PenSetStyle sets the line style of a pen object. |
PenSetWidth | PenSetWidth sets the line width of a pen object. |
Get | |
---|---|
PenGetColor | PenGetColor returns the color of a pen object. |
PenGetStyle | PenGetStyle returns the line style of a pen object. |
PenGetWidth | PenGetWidth returns the line width of a pen object. |
See also
id-192412