pramodmm@milton.u.washington.edu (Pramod Mahadev) (05/09/91)
Hello GKS experts! this is a total novice posting a simple problem. the problem is as follows I would like to draw lines using GKS and I am using the subroutine in FORTRAN-77 called GPL. I have to draw lines of different linewidths on the same workstation viewport. I tried setting the aspect source flag to bundled so that whenever I call the routine ,the line will have a linewidth specified by the routine set line width space factor.But I still get the same line widths for all lines. It would be nice of you ,if you could tell me how to acheive this and what should be the coordinate system to indicate the line-width spacing Thanks in advance. Pramod M.Mahadev pramodmm@milton.u.washington.edu
mark@wimsey.bc.ca (Mark Sun) (05/10/91)
In article <1991May9.002543.1681@milton.u.washington.edu> pramodmm@milton.u.washington.edu (Pramod Mahadev) writes: >Hello GKS experts! >this is a total novice posting a simple problem. >the problem is as follows >I would like to draw lines using GKS and I am using >the subroutine in FORTRAN-77 called GPL. I have to draw >lines of different linewidths on the same workstation >viewport. I tried setting the aspect source flag to >bundled so that whenever I call the routine ,the line >will have a linewidth specified by the routine set line width >space factor.But I still get the same line widths for all >lines. >It would be nice of you ,if you could tell me how to acheive >this and what should be the coordinate system to indicate the >line-width spacing >Thanks in advance. >Pramod M.Mahadev >pramodmm@milton.u.washington.edu > Pramod: If you simply would like to draw lines of different widths, you should precede the POLYLINE call (GPL) with a call to the SET_PLINE_LINEWIDTH function which is GSLWSC in the FORTRAN binding. Your workstation will then try to draw a line in the width specified in the GSLWSC call. i.e. CALL GSLWSC( XLineWidth) CALL GPL( NPoints, Px, Py) The line width is a real value with 1.0 usually representing the thinnest line the workstation can display. Setting the value to 2.0 will display twice this width IF the workstation is able. The above approach sets the INDIVIDUAL attribute of a polyline. BUNDLED attributes are primarily used when you wish to change an attribute (colour, width, line_type) dynamically when the line is stored as a segment. If this is what you would like to do, e-mail me. Hope this helps you! Mark Sun mark@wimsey.bc.ca Genetek Earth Research Corporation (604) 921-6807 P.O. Box 517 Lions Bay (Vancouver), B.C., CANADA V0N 2E0
pramodmm@milton.u.washington.edu (Pramod Mahadev) (06/29/91)
Hello GKS Xperts I have a small problem with the coordinate systems . When my program reads the locator position instead of the position i.e x and y coordinates being in world coordinates ; they are in device coordinates. Please enlighten me as to how to get the program output world coordinates instead of either DC or NDC coordinates I am using the subroutine GRQLC(wkid,lcdnr,stat,tnr,px,py) where px and py are supposed to be in world coordinates but my program returns device coordinates. Thanks in advance Have Fun Pramod M.Mahadev pramodmm@milton.u.washington.edu
steve@groucho.ucar.edu (Steve Emmerson) (06/29/91)
In <1991Jun28.223326.28405@milton.u.washington.edu> pramodmm@milton.u.washington.edu (Pramod Mahadev) writes: >Hello GKS Xperts >I have a small problem with the coordinate systems . >When my program reads the locator position instead >of the position i.e x and y coordinates being in >world coordinates ; they are in device coordinates. >Please enlighten me as to how to get the program output >world coordinates instead of either DC or NDC coordinates >I am using the subroutine GRQLC(wkid,lcdnr,stat,tnr,px,py) >where px and py are supposed to be in world coordinates but >my program returns device coordinates. If GRQLC() is returning OK rather than NONE, then the response should be in world co-ordinates, and not normalized device co-ordinates. I believe anything else indicates a bug in your GKS implementation. Credentials: I maintain XGKS. (That and 35 cents gets me a cup of coffee. ;-) Steve Emmerson steve@unidata.ucar.edu ...!ncar!unidata!steve