diff options
author | Joe Hunkeler <jhunkeler@gmail.com> | 2015-08-11 16:51:37 -0400 |
---|---|---|
committer | Joe Hunkeler <jhunkeler@gmail.com> | 2015-08-11 16:51:37 -0400 |
commit | 40e5a5811c6ffce9b0974e93cdd927cbcf60c157 (patch) | |
tree | 4464880c571602d54f6ae114729bf62a89518057 /noao/digiphot/apphot/aplib/apmark2.x | |
download | iraf-osx-40e5a5811c6ffce9b0974e93cdd927cbcf60c157.tar.gz |
Repatch (from linux) of OSX IRAF
Diffstat (limited to 'noao/digiphot/apphot/aplib/apmark2.x')
-rw-r--r-- | noao/digiphot/apphot/aplib/apmark2.x | 46 |
1 files changed, 46 insertions, 0 deletions
diff --git a/noao/digiphot/apphot/aplib/apmark2.x b/noao/digiphot/apphot/aplib/apmark2.x new file mode 100644 index 00000000..96896e56 --- /dev/null +++ b/noao/digiphot/apphot/aplib/apmark2.x @@ -0,0 +1,46 @@ +include <gset.h> +include "../lib/apphot.h" +include "../lib/fitpsf.h" + + +# AP_PFMARK -- Procedure to mark the psf fitting box on the display. + +procedure appfmark (ap, id, mkbox) + +pointer ap # pointer to the apphot procedure +pointer id # pointer to the display stream +int mkbox # mark the psf fitting box + +int marktype +real radius, xc, yc +int gstati() +real apstatr() +errchk greactivate, gdeactivate, gamove, gadraw + +begin + if (id == NULL) + return + if (mkbox == NO) + return + + iferr (call greactivate (id, 0)) + return + + marktype = gstati (id,G_PMLTYPE) + iferr { + call gseti (id, G_PMLTYPE, GL_DASHED) + xc = apstatr (ap, PFXCUR) + yc = apstatr (ap, PFYCUR) + radius = apstatr (ap, SCALE) * apstatr (ap, PSFAPERT) + call gamove (id, xc - radius, yc - radius) + call gadraw (id, xc + radius, yc - radius) + call gadraw (id, xc + radius, yc + radius) + call gadraw (id, xc - radius, yc + radius) + call gadraw (id, xc - radius, yc - radius) + } then + ; + call gseti (id, G_PMLTYPE, marktype) + + iferr (call gdeactivate (id, 0)) + return +end |