\section{Magick::Geometry}
\scriptsize{
\begin{verbatim}

Geometry provides a convenient means to specify a geometry argument. The
object may be initialized from a C string or C++ string containing a
geometry specification.  It may also be initialized by more efficient
parameterized constructors.

X11 Geometry Specifications

X11 geometry specifications are in the form
"<width>x<height>{+-}<xoffset>{+-}<yoffset>" (where width, height, xoffset,
and yoffset are numbers) for specifying the size and placement location for
an object.

The width and height parts of the geometry specification are measured in
pixels. The xoffset and yoffset parts are also measured in pixels and are
used to specify the distance of the placement coordinate from the left and
top edges of the image, respectively.

 +xoffset The left edge of the object is to be placed xoffset pixels in
          from the left edge of the image.

 -xoffset The left edge of the object is to be placed outside the image,
          xoffset pixels from the left edge of the image.

The Y offset has similar meanings:

 +yoffset The top edge of the object is to be yoffset pixels below the top
          edge of the image.

 -yoffset The top edge of the object is to be outside the image, yoffset
          pixels above the top edge of the image.

Offsets must be given as pairs; in other words, in order to specify either
xoffset or yoffset both must be present.

ImageMagick Extensions To X11 Geometry Specifications

ImageMagick has added a number of qualifiers to the standard geometry string
for use when resizing images. The form of an extended geometry string is
"<width>x<height>{+-}<xoffset>{+-}<yoffset>{%}{!}{<}{>}". Extended geometry
strings should only be used when resizing an image. Using an extended
geometry string for other applications may cause the API call to fail. The
available qualifiers are shown in the following table:


                       ImageMagick Geometry Qualifiers

 Qualifier Description

 %         Interpret width and height as a percentage of the current size.


 !         Resize to width and height exactly, loosing original aspect
           ratio.


 <         Resize only if the image is smaller than the geometry
           specification.


 >         Resize only if the image is greater than the geometry
           specification.


Postscript Page Size Extension To Geometry Specifications

Any geometry string specification supplied to the Geometry contructor is
considered to be a Postscript page size nickname if the first character is
not numeric. The Geometry constructor converts these page size
specifications into the equivalent numeric geometry string specification
(preserving any offset component) prior to conversion to the internal object
format. Postscript page size specifications are short-hand for the pixel
geometry required to fill a page of that size. Since the 11x17 inch page
size used in the US starts with a digit, it is not supported as a Postscript
page size nickname. Instead, substitute the geometry specification
"792x1224>" when 11x17 output is desired.

An example of a Postscript page size specification is "letter+43+43>".

                      Postscript Page Size Nicknames

 Postscript Page Size Nickname Equivalent Extended Geometry Specification

 Ledger                        1224x792>

 Legal                         612x1008>

 Letter                        612x792>

 LetterSmall                   612x792>

 ArchE                         2592x3456>

 ArchD                         1728x2592>

 ArchC                         1296x1728>

 ArchB                         864x1296>

 ArchA                         648x864>

 A0                            2380x3368>

 A1                            1684x2380>

 A2                            1190x1684>

 A3                            842x1190>

 A4                            595x842>

 A4Small                       595x842>

 A5                            421x595>

 A6                            297x421>

 A7                            210x297>

 A8                            148x210>

 A9                            105x148>

 A10                           74x105>

 B0                            2836x4008>

 B1                            2004x2836>

 B2                            1418x2004>

 B3                            1002x1418>

 B4                            709x1002>

 B5                            501x709>

 C0                            2600x3677>

 C1                            1837x2600>

 C2                            1298x1837>

 C3                            918x1298>

 C4                            649x918>

 C5                            459x649>

 C6                            323x459>

 Flsa                          612x936>

 Flse                          612x936>

 HalfLetter                    396x612>


Geometry Methods

Geometry provides methods to initialize its value from strings, from a set
of parameters, or via attributes. The methods available for use in Geometry
are shown in the following table:

                              Geometry Methods

 Method       Return Type   Signature(s)            Description

                            unsigned int width_,
                            unsigned int height_,
                            unsigned int xOff_ = 0, Construct X11 geometry
 Geometry                   unsigned int yOff_ = 0, via explicit
                            bool xNegative_ =       parameters.
                            false, bool yNegative_
                            = false


              const string  Construct geometry from
              geometry_     C++ string


              const char *  Construct geometry from
              geometry_     C string

 width        void          unsigned int width_     Width

              unsigned int  void

 height       void          unsigned int height_    Height

              unsigned int  void

 xOff         void          unsigned int xOff_      X offset from origin

              int           void

 yOff         void          unsigned int yOff_      Y offset from origin

              int           void

                                                    Sign of X offset
 xNegative    void          bool xNegative_         negative? (X origin at
                                                    right)

              bool          void

                                                    Sign of Y offset
 yNegative    void          bool yNegative_         negative? (Y origin at
                                                    bottom)

              bool          void

                                                    Width and height are
 percent      void          bool percent_           expressed as
                                                    percentages

              bool          void

                                                    Resize without
 aspect       void          bool aspect_            preserving aspect ratio
                                                    (!)

              bool          void


 greater      void          bool greater_           Resize if image is
                                                    greater than size (>)

              bool          void


 less         void          bool less_              Resize if image is less
                                                    than size (<)

              bool          void


 isValid      void          bool isValid_           Does object contain
                                                    valid geometry?

              bool          void


 operator =   const         const string geometry_  Set geometry via C++
              Geometry&                             string


 operator =   const         const char * geometry_  Set geometry via C
              Geometry&                             string


 operator                                           Obtain C++ string
 string       string        Geometry&               representation of
                                                    geometry


 operator<<   ostream&      ostream& stream_, const Stream onto ostream
                            Geometry& geometry_

\end{verbatim}
}
