Index: /trunk/doc/pslib/ChangeLogSDRS.tex
===================================================================
--- /trunk/doc/pslib/ChangeLogSDRS.tex	(revision 4252)
+++ /trunk/doc/pslib/ChangeLogSDRS.tex	(revision 4253)
@@ -1,3 +1,3 @@
-%%% $Id: ChangeLogSDRS.tex,v 1.139 2005-06-14 20:28:53 price Exp $
+%%% $Id: ChangeLogSDRS.tex,v 1.140 2005-06-15 00:30:28 eugene Exp $
 
 \subsection{Changes from version 00 to version 01}
@@ -710,3 +710,6 @@
   appropriate.  Noted that metadata functions must copy strings in to
   a \code{psMetadataItem}.
-\end{itemize}
+\item added psRegionForSquare
+\item added psImageMaskRegion, psImageKeepRegion
+\item added psImageMaskCircle, psImageKeepCircle
+\end{itemize}
Index: /trunk/doc/pslib/psLibSDRS.tex
===================================================================
--- /trunk/doc/pslib/psLibSDRS.tex	(revision 4252)
+++ /trunk/doc/pslib/psLibSDRS.tex	(revision 4253)
@@ -1,3 +1,3 @@
-%%% $Id: psLibSDRS.tex,v 1.281 2005-06-14 20:28:53 price Exp $
+%%% $Id: psLibSDRS.tex,v 1.282 2005-06-15 00:30:28 eugene Exp $
 \documentclass[panstarrs,spec]{panstarrs}
 
@@ -3212,5 +3212,23 @@
 for the bounds of a specific image with \code{psRegionForImage}.  The
 output of this function is a region with negative upper limits
-replaced by their corrected value appropriate to the given image.
+replaced by their corrected value appropriate to the given image.  In
+addition, the lower and upper limits are forced to lie within the
+bounds of the image.  If the lower-limit coordinates are less than the
+lower bound of the image, they are limited to the lower bound of the
+image.  Conversely, if the upper-limit coordinates are greater than
+the upper bound of the image, they are truncated to define only valid
+pixels.  If the lower-limit coordinates are greater than the upper
+bounds of the image, or the upper-limit coorindates are less than the
+lower bounds of the image, the coordinates should saturate on those
+limits.  The output of this function is always a valid region, though
+it may define an area of 0 pixels.
+
+
+\begin{prototype}
+psRegion psRegionForSquare(double x, double y, double radius);
+\end{prototype}
+This utility function defines a \code{psRegion} corresponding to the
+square with center at coordinate \code{x,y} and with code{radius}.
+The width of the square is thus \code{2radius + 1}.
 
 \pagebreak 
@@ -4941,4 +4959,34 @@
 \code{NULL}.
 
+\begin{prototype}
+void psImageMaskRegion (psImage *image, psRegion region, bool logical_and, int maskValue);
+void psImageKeepRegion (psImage *image, psRegion region, bool logical_and, int maskValue);
+\end{prototype
+
+These two complementary functions set bit specified bits
+(\code{maskValue}) in the mask \code{image} interior to or exterior to
+the specified \code{region}.  The first function,
+\code{psImageMaskRegion}, sets the bits inside the region, ignoring
+pixels outside.  The second, \code{psImageKeepRegion}, sets the bits
+outside the region, ignoring pixels inside.  The pixel values are set
+by combining the existing pixel value and the given \code{maskValue}
+with a logical \code{and} if \code{logical_and} is set, otherwise it
+uses a logical \code{or}.
+
+\begin{prototype}
+void psImageMaskCircle (psImage *image, double x, double y, double radius, bool logical_and, int maskValue);
+void psImageKeepCircle (psImage *image, double x, double y, double radius, bool logical_and, int maskValue);
+\end{prototype}
+
+These two complementary functions set bit specified bits
+(\code{maskValue}) in the mask \code{image} interior to or exterior to
+the specified circle, defined by the center coordinates \code{x,y} and
+a \code{radius}.  The first function, \code{psImageMaskCircle}, sets
+the bits inside the circle, ignoring pixels outside.  The second,
+\code{psImageKeepCircle}, sets the bits outside the circle, ignoring
+pixels inside.  The pixel values are set by combining the existing
+pixel value and the given \code{maskValue} with a logical \code{and}
+if \code{logical_and} is set, otherwise it uses a logical \code{or}.
+
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 
