Pro Tvcross, length, xc, yc, color, COLOR = TheColor, THICK = thick ;+ ; NAME: ; TVCross ; PURPOSE: ; To draw a circle of specified radius centered on the cursor, or at ; specified position ; CALLING SEQUENCE: ; TVcross, length, x, y, color, [ COLOR = , THICK = ] ; INPUTS: ; length - length of cross to be drawn, scalar ; OPTIONAL INPUT: ; X - x position for circle center, vector or scalar ; Y - y position for circle center, vector or scalar ; If X and Y are not specified then program will draw circle at ; at the current cursor position ; COLOR - intensity value (0-255) used to draw the circle, Default = ; !P.COLOR. User can specify color using either this parameter or the ; COLOR keyword. ; OPTIONAL KEYWORD INPUTS: ; THICK - thickness of the drawn circle, default = !P.THICK (=1) ; COLOR - Intensity value used to draw the circle. Default = !P.COLOR ; OUTPUTS: ; None ;- On_Error, 2 ; Return to caller if N_params() LT 1 then begin print,'Syntax - tvcross, length, [ xc, yc, color, COLOR = ,THICK = ]' return endif if N_elements(length) NE 1 then message, $ 'ERROR - Cross length (first parameter) must be a scalar' if not keyword_set(TheColor) then begin IF N_Elements( Color ) eq 0 THEN Color = !P.COLOR endif else color = TheColor if not keyword_set(THICK) then thick = !P.THICK x = findgen(2*length) x=x*0.0 y = findgen(2*length) - length oPlot, x + xc, y+ yc , COLOR = Color, THICK = thick x = findgen(2*length) - length y = findgen(2*length) y = y*0.0 ; oPlot, x + xc, y+ yc , COLOR = Color, /DEV, THICK = thick oPlot, x + xc, y+ yc , COLOR = Color, THICK = thick Return End; TVcross