From fa080de7afc95aa1c19a6e6fc0e0708ced2eadc4 Mon Sep 17 00:00:00 2001 From: Joseph Hunkeler Date: Wed, 8 Jul 2015 20:46:52 -0400 Subject: Initial commit --- noao/digiphot/apphot/aplib/apmark2.x | 46 ++++++++++++++++++++++++++++++++++++ 1 file changed, 46 insertions(+) create mode 100644 noao/digiphot/apphot/aplib/apmark2.x (limited to 'noao/digiphot/apphot/aplib/apmark2.x') 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 +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 -- cgit