From fa080de7afc95aa1c19a6e6fc0e0708ced2eadc4 Mon Sep 17 00:00:00 2001 From: Joseph Hunkeler Date: Wed, 8 Jul 2015 20:46:52 -0400 Subject: Initial commit --- sys/gio/gim/gimsetpix.x | 41 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 41 insertions(+) create mode 100644 sys/gio/gim/gimsetpix.x (limited to 'sys/gio/gim/gimsetpix.x') diff --git a/sys/gio/gim/gimsetpix.x b/sys/gio/gim/gimsetpix.x new file mode 100644 index 00000000..09250221 --- /dev/null +++ b/sys/gio/gim/gimsetpix.x @@ -0,0 +1,41 @@ +# Copyright(c) 1986 Association of Universities for Research in Astronomy Inc. + +include +include +include + +# GIM_SETPIX -- Set the pixels in a region of a raster to a solid color. +# If width=height=0 the entire raster will be written. + +procedure gim_setpix (gp, raster, ct, x1, y1, width, height, color, rop) + +pointer gp #I graphics descriptor +int raster #I raster number (0 is display window) +int ct #I coordinate type +real x1, y1 #I region to be refreshed +real width, height #I region to be refreshed +int color #I pixel value +int rop #I rasterop + +short gim[GIM_SETPIXELS_LEN] + +begin + gim[GIM_SETPIXELS_RN] = raster + gim[GIM_SETPIXELS_CT] = ct + gim[GIM_SETPIXELS_CO] = color + gim[GIM_SETPIXELS_OP] = rop + + if (ct == CT_PIXEL) { + gim[GIM_SETPIXELS_X1] = x1 + gim[GIM_SETPIXELS_Y1] = y1 + gim[GIM_SETPIXELS_NX] = width + gim[GIM_SETPIXELS_NY] = height + } else { + gim[GIM_SETPIXELS_X1] = x1 * GKI_MAXNDC + gim[GIM_SETPIXELS_Y1] = y1 * GKI_MAXNDC + gim[GIM_SETPIXELS_NX] = nint (width * GKI_MAXNDC) + gim[GIM_SETPIXELS_NY] = nint (height * GKI_MAXNDC) + } + + call gescape (gp, GIM_SETPIXELS, gim, GIM_SETPIXELS_LEN) +end -- cgit