Coyote Graphics Routines

Date: Fri Mar 27 12:14:20 2015

single page | use frames     summary     class     fields     routine details     file attributes

.\

cgarrow.pro


top cgArrow

Graphics

cgArrow, x0, y0, x1, y1 [, /ADDCMD] [, /CLIP] [, COLOR=string/integer/long] [, CRECT=float] [, /DATA] [, HSIZE=float] [, HTHICK=float] [, LINESTYLE=integer] [, /NORMAL] [, /SOLID] [, THICK=float] [, /WINDOW], _REF_EXTRA=_REF_EXTRA

Provides a device-independent and color-model-independent way of drawing an arrow in a specified color.

The program requires the Coyote Library to be installed on your machine.

Parameters

x0 in required type=integer/float

The x location of the blunt end of the arrow. May be a vector. Assumes device coordinates.

y0 in required type=integer/float

The y location of the blunt end of the arrow. May be a vector. Assumes device coordinates.

x1 in required type=integer/float

The x location of the sharp end of the arrow. May be a vector. Assumes device coordinates.

y1 in required type=integer/float

The y location of the sharp end of the arrow. May be a vector. Assumes device coordinates.

Keywords

ADDCMD in optional type=boolean default=0

An alternative way to set the Window keyword.

CLIP in optional type=boolean default=0

Set the keyword to clip arrow output to the clipping rectangle specified in the CRect keyword. See the documentation for the IDL graphics keyword NOCLIP.

COLOR in optional type=string/integer/long default=white

An alternative way to specify the color to use in erasing the graphics window. Color names are those used with cgColor. This parameter is used in preference to the background_color parameter.

CRECT in optional type=float

A four-element array giving the clipping rectangle [xo, yo, x1, y1]. The default clipping rectangle is the plot area. See the documenation for the IDL graphics keyword CLIP.

DATA in optional type=boolean default=0

Set this keyword of the arrow locations are in data coordinates. Device coordinates are assumed.

HSIZE in optional type=float

The size of the the arrow head. By default 1/64th the width of the device. (!D.X_SIZE / 64.)

HTHICK in optional type=float default=1.0

The thickness of the line drawing the arrowhead.

LINESTYLE in optional type=integer default=0

The line style of the arrow. Line style integers as in PLOT.

NORMAL in optional type=boolean default=0

Set this keyword of the arrow locations are in normalized coordinates. Device coordinates are assumed.

SOLID in optional type=boolean default=0

Set this keyword to draw solid, filled arrows.

THICK in optional type=float default=1.0

The thickness of the line drawing the shaft of the arrow.

WINDOW in optional type=boolean default=0

Set this keyword to add the command to an cgWindow application.

_REF_EXTRA

Examples

Used to draw arrows:

IDL> cgArrow, 50, 50, 100, 100, /Solid

Author information

Author:

FANNING SOFTWARE CONSULTING:

David W. Fanning 1645 Sheely Drive Fort Collins, CO 80526 USA Phone: 970-221-0438 E-mail: david@idlcoyote.com Coyote's Guide to IDL Programming: http://www.idlcoyote.com

Copyright:

Copyright (c) 2010-2015, Fanning Software Consulting, Inc.

History:

Change History:

Written, 23 November 2010. DWF. Based on old Arrow routine in IDL. Added Window keyword 24 January 2011. DWF. Modified error handler to restore the entry decomposition state if there is an error. 17 March 2011. DWF Added the ADDCMD keyword to make the interface more consistent with other Coyote Grapics routines. 18 April 2013. DWF. Modified to allow a vector of colors to be added with the COLOR keyword. 23 February 2015. DWF. Algorithm modified slightly to get the program a little closer to the machine to speed up vector drawing when there are lots of vectors. 23 February 2015. DWF.

File attributes

Modification date: Fri Mar 27 11:07:37 2015
Lines: 285
Docformat: rst rst