[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[GEMPAK #VPN-568835]: How to draw an arrow



Mark,

Lines with arrows are in the class of special lines (vgstruct.h --> SPLN_ELM)
You can view the special lines available with their numbers by running the 
plotsyms program such as:
% plotsyms
Enter device: xw
Select a symbol type number or type EXIT:12
Enter symbol color or type EXIT:3
Enter second front color or type EXIT:5
Enter symbol size or type EXIT:1
Enter symbol line width or type EXIT:1
Enter background color, 0 for none, or type EXIT:0


Steve Chiswell
Unidata User Support

> Hi,
>
> I have submitted a couple of questions recently about moving the cloud
> labels for BUFR-generated SIGWX.
> I have accomplished this and I can draw a line from the label to the
> edge of the cloud.
> 
> However, I haven't discovered how to draw an line with an arrowhead.  I
> suspect that this is pretty easy, but I haven't found an example.
> Here is the code snippet which draws a simple line segment:
> 
> sizrec = (int) (sizeof(VG_HdrStruct) + sizeof(LineInfo)) + (4 *
> sizeof(float));
> 
> /*
> * Fill in VG header information.
> */
> 
> el.hdr.delete   = 0;
> el.hdr.vg_type  = LINE_ELM;
> el.hdr.vg_class = CLASS_LINES;
> el.hdr.maj_col  = 1;
> el.hdr.min_col  = 1;
> el.hdr.smooth   = 0;
> el.hdr.version  = 0;
> el.hdr.filled   = 0;
> el.hdr.closed   = 0;
> el.hdr.recsz    = sizrec;
> el.hdr.grptyp   = grpch;
> el.hdr.grpnum   = gpnum;
> el.hdr.range_min_lat = xcent;
> el.hdr.range_min_lon = ycent;
> el.hdr.range_max_lat = xcent;
> el.hdr.range_max_lon = ycent;
> 
> /*
> * Fill in VG element information.
> */
> el.elem.lin.info.numpts = 2;
> el.elem.lin.info.lintyp = 1;
> el.elem.lin.info.lthw  = LTHW;
> el.elem.lin.info.width = LWIDTH;
> el.elem.lin.info.lwhw  = LWHW;
> 
> el.elem.lin.latlon[0] = xcent;
> el.elem.lin.latlon[1] = nearestLat;
> el.elem.lin.latlon[2] = ycent;
> el.elem.lin.latlon[3] = nearestLon;
> 
> cvg_write(&el, start, sizrec, fptr, &ier);
> 
> How do I produce an arrowhead?
> 
> Thanks,
> 
> Mark Hughes
> 
> GWDI
> 
> 


Ticket Details
===================
Ticket ID: VPN-568835
Department: Support GEMPAK
Priority: Normal
Status: Closed