@@TJclRegion
<GROUP Graphics.Regions>
Summary:
  Class to be used as a wrapper for windows regions.
Description:
  This class is a wrapper for Windows regions. It has a lot of overloaded constructors
  to make it easy to create different kinds of regions. It even has a constructor to create
  a region from a bitmap. Regions are a powerful part of the Windows GDI, they are not as known
  as the other objects on the canvas but they can create real beauty. Or maybe you ever dreamed
  of making custom forms, then this is your chance.Note for Delphi 3 users, this class is
  not compatible with Delphi 3.
Donator:
  Wim De Cleen
--------------------------------------------------------------------------------
@@TJclRegion.Create
Summary:
  Creates a wrapper for the region.
Description:
  This function can be used to create a handy wrapper for a region handle aquired by
  a Windows function.
Parameters:
  RegionHandle - The Windows region handle.
Donator:
  Wim De Cleen
--------------------------------------------------------------------------------
@@TJclRegion.CreateElliptic
Summary:
  Create an elliptic region
Description:
  Creates an elliptic region defined by a rectangle.
Parameters:
  ARect - The rectangle surronding the elliptic region.
  Top - X-coordinate of the upper left point.
  Left - Y-coordinate of the upper left point.
  Bottom - X-coordinate of the bottom right point.
  Right - Y-coordinate of the bottom right point.
Donator:
  Wim De Cleen
--------------------------------------------------------------------------------
@@TJclRegion.CreatePoly
Summary:
  Create an polygon region
Description:
  Creates an polygon region defined by an array of points.
Parameters:
  Points - An array containing the TPoint structures which define the vertices of the polygon, in device units. The polygon should be closed.
  Count - The number of points in the Points array.
  FillMode - Specifies the fillmode of polygon, which pixels will be included in the region.
See also:
  TPolyFillMode
Donator:
  Wim De Cleen
--------------------------------------------------------------------------------
@@TJclRegion.CreateRect
Summary:
  Create a rectangle region
Description:
  Creates a rectangele region defined by a rectangle or Top, Left, Bottom, Right.
Parameters:
  ARect - The rectangle describing the region.
  Top - X-coordinate of the upper left point.
  Left - Y-coordinate of the upper left point.
  Bottom - X-coordinate of the bottom right point.
  Right - Y-coordinate of the bottom right point.
Donator:
  Wim De Cleen
--------------------------------------------------------------------------------
@@TJclRegion.CreateRoundRect
Summary:
  Create a rounded rectangle region
Description:
  Creates a rounded rectangle region defined by a rectangle or Top, Left, Bottom, Right.
Parameters:
  ARect - The rectangle describing the region.
  Top - X-coordinate of the upper left point.
  Left - Y-coordinate of the upper left point.
  Bottom - X-coordinate of the bottom right point.
  Right - Y-coordinate of the bottom right point.
  CornerWidth - X-size of the quarter ellipse for the rounded corners.
  CornerHeight - Y-size of the quarter ellipse for the rounded corners.
Donator:
  Wim De Cleen
--------------------------------------------------------------------------------
@@TJclRegion.CreatePolyPolygon
Summary:
  TODO
Description:
  TODO
Parameters:
  Points - An array containing the TPoint structures which define the vertices of the polygon, in device units. The polygon should be closed.
  Vertex - An array containing the number of vertices of each polygon. There is one entry for every polygon in the Points array.
  Count - The number of polygons.
  FillMode - Specifies the fillmode of the polygon, which pixels will be included in the region.
See also:
  TPolyFillMode
Donator:
  Wim De Cleen
--------------------------------------------------------------------------------
@@TJclRegion.CreateBitmap
Summary:
  Creates the region from a bitmap.
Description:
  Creates the region from a bitmap by using a color as mask.
Parameters:
  Bitmap - A bitmap used as input to create the region.
  RegionColor - The color for the mask.
  RegionBitmapMode - This flag specifies if the RegionColor is included or excluded.
See also:
  TJclRegionBitmapMode
Donator:
  Wim De Cleen
--------------------------------------------------------------------------------
@@TJclRegion.CreatePath
Summary:
  Creates the region from a Path.
Description:
  Creates the region from a path currently selected in a canvas.
Parameters:
  Canvas - A canvas that contains a path.
Donator:
  Wim De Cleen
--------------------------------------------------------------------------------
@@TJclRegion.CreateRegionInfo
Summary:
  Creates the region from a RegionInfo class.
Description:
  Creates the region from a RegionInfo class, this function is included so you can make regions
  persistent.
Parameters:
  RegionInfo - A regioninfo class.
See also:
  TJclRegionInfo
Donator:
  Wim De Cleen
--------------------------------------------------------------------------------
@@TJclRegion.Destroy
Summary:
  Destroys the region class.
Description:
  Destroys the region class, this will also delete the region handle.
Parameters:
  RegionInfo - A regioninfo class.
Donator:
  Wim De Cleen
--------------------------------------------------------------------------------
@@TJclRegion.Clip
Summary:
  Selects the region as the current clipping region on a canvas.
Description:
  Selects the region as the current clipping region on a canvas.
Parameters:
  Canvas - A canvas where the region should be used as a clipping area.
Donator:
  Wim De Cleen
--------------------------------------------------------------------------------
@@TJclRegion.Combine
Summary:
  Combines two regions.
Description:
  Combines two regions using or, and, xor or difference operator. If the destination region
  is not specified then the region class is the result.
Parameters:
  DestRegion - The destination region class, this should be a valid region class.
  SrcRegion - The region class with which this region will be combined.
  CombineOp - The operator for the combination instruction.
See also:
  TJclRegionCombineOperator
Donator:
  Wim De Cleen
--------------------------------------------------------------------------------
@@TJclRegion.Copy
Summary:
  Copies the current region into another region class.
Description:
  Copies the current region into another region class, the class is created for you and you should
  destroy it if you don't need it anymore.
Result:
  The copy of the region.
Donator:
  Wim De Cleen
--------------------------------------------------------------------------------
@@TJclRegion.Equals
Summary:
  Checks if two regions are completely equal.
Description:
  Checks if the current region is completely equal with the CompareRegion.
Parameters:
  CompareRegion - The region which will be compared.
Result:
  Are the regions equal.
Donator:
  Wim De Cleen
--------------------------------------------------------------------------------
@@TJclRegion.Fill
Summary:
  Fills the area defined by the region with the current brush.
Description:
  Fills the area defined by the region with the current brush.
Parameters:
  Canvas - The canvas on which the region will be filled.
Donator:
  Wim De Cleen
--------------------------------------------------------------------------------
@@TJclRegion.FillGradient
Summary:
  Fills the area defined by the region with a gradient pattern.
Description:
  Fills the area defined by the region with a gradient pattern.
Parameters:
  Canvas - The canvas on which the region will be filled.
  ColorCount - The number of gradiations between the StartColor and the EndColor, this should be a least 1. The higher the number, the smoother the gradient fill.
  StartColor - The starting color.
  EndColor - The ending color.
  ADirection - The direction of the gradient, horizontial or vertical.
See also:
  TGradientDirection
Donator:
  Wim De Cleen
--------------------------------------------------------------------------------
@@TJclRegion.Frame
Summary:
  Draws a frame around the region.
Description:
  Draws a frame around the region with the current brush.
Parameters:
  Canvas - The canvas on which the border will be drawn.
  FrameWidth - The width of horizontial brush strokes.
  FrameHeight - The height of vertical brush strokes.
Donator:
  Wim De Cleen
--------------------------------------------------------------------------------
@@TJclRegion.Invert
Summary:
  Inverts the area defined by the region on the canvas.
Description:
  Inverts the area defined by the region on the canvas.
Parameters:
  Canvas - The canvas on which the region will be inverted.
Donator:
  Wim De Cleen
--------------------------------------------------------------------------------
@@TJclRegion.Offset
Summary:
  Offsets the region.
Description:
  Moves the region a certain number of logical units.
Parameters:
  X - Specifies the number of logical units to move left or right, this value can be negative to move left.
  Y - Specifies the number of logical units to move up or down, this value can be negative to move up.
Donator:
  Wim De Cleen
--------------------------------------------------------------------------------
@@TJclRegion.Paint
Summary:
  Paints the region on the canvas.
Description:
  Paints the region on the canvas using the current brush.
Parameters:
  Canvas - The canvas where the region will be painted.
Donator:
  Wim De Cleen
--------------------------------------------------------------------------------
@@TJclRegion.PointIn
Summary:
  Check if a point is in the region.
Description:
  Check if a point is in the region.
Parameters:
  X - X-coordinate of the point.
  Y - Y-coordinate of the point.
  Point - The point to check.
Result:
  Is the point in the region.
Donator:
  Wim De Cleen
--------------------------------------------------------------------------------
@@TJclRegion.RectIn
Summary:
  Check if a rectangle is in the region.
Description:
  Check if a rectangle is in the region. The rectangle needs to be completely in
  the region.
Parameters:
  ARect - The rectangle describing the region.
  Top - X-coordinate of the upper left point.
  Left - Y-coordinate of the upper left point.
  Bottom - X-coordinate of the bottom right point.
  Right - Y-coordinate of the bottom right point.
Result:
  Is the rectangle in the region.
Donator:
  Wim De Cleen
--------------------------------------------------------------------------------
@@TJclRegion.SetWindow
Summary:
  Specifies the region of a window that will be drawn.
Description:
  Specifies the region of a window that will be drawn. Outside this region the window
  doesn't get any events. This function can be used to create custom windows in
  combination with the TJclRegion.CreateBitmap constructor.
Parameters:
  Window - The handle of the window.
  Redraw - Should there be a repaint of the window.
See also:
  CreateBitmap
Donator:
  Wim De Cleen
--------------------------------------------------------------------------------
@@TJclRegion.GetRegionInfo
Summary:
  Returns a TJclRegionInfo class that describes the region.
Description:
  Returns a TJclRegionInfo class that describes the region. When no longer needed
  the class should be destroyed. The TJclRegionInfo is a snapshot of the region, when
  the region changes after this function call the changes are not reflected in the
  TJclRegionInfo class.
Result:
  The TJclRegionInfo class.
See also:
  TJclRegionInfo
Donator:
  Wim De Cleen
--------------------------------------------------------------------------------
@@TJclRegion.Box
Summary:
  Returns the current bounding rectangle of the region.
Description:
  Returns the current bounding rectangle of the region.
Donator:
  Wim De Cleen
--------------------------------------------------------------------------------
@@TJclRegion.Handle
Summary:
  Returns the Windows handle of the region.
Description:
  Returns the Windows handle of the region. Keep in mind that when you destroy the
  TJclRegion class this handle gets also destroyed.
Donator:
  Wim De Cleen
--------------------------------------------------------------------------------
@@TJclRegion.RegionType
Summary:
  Returns the complexity of the region.
Description:
  Returns the complexity of the region.
See also:
  TJclRegionType
Donator:
  Wim De Cleen
--------------------------------------------------------------------------------
@@TJclRegionInfo
<GROUP Graphics.Regions>
Summary:
  Class that contains a description of the region.
Description:
  Class that contains a description of the region, the class exposes the info of the
  region by a collection of rectangles. The class is normally created by a TJclRegion
  method call.
See also:
  TJclRegion
Donator:
  Wim De Cleen
--------------------------------------------------------------------------------
@@TJclRegionInfo.Box
Summary:
  Returns the current bounding rectangle of the region.
Description:
  Returns the current bounding rectangle of the region.
Donator:
  Wim De Cleen
--------------------------------------------------------------------------------
@@TJclRegionInfo.Rectangles
Summary:
  Returns the rectangle at the current index.
Description:
  Returns the rectangle at the current index. The index starts at 0 and ends at
  Count - 1.
See also:
  Count
Donator:
  Wim De Cleen
--------------------------------------------------------------------------------
@@TJclRegionInfo.Count
Summary:
  Returns the number of rectangles that describe the region.
Description:
  Returns the number of rectangles that describe the region.
See also:
  Rectangles
Donator:
  Wim De Cleen
--------------------------------------------------------------------------------
@@TJclRegionInfo.Create
Summary:
  Creates a TJclRegionInfo class for a specified TJclRegion.
Description:
  Creates a TJclRegionInfo class for a specified TJclRegion. This is a snapshot of the
  region. The class can be created through the GetRegionInfo method of TJclRegion.
Parameters:
  Region - The region from which you want the info.
See also:
  TJclRegion
Donator:
  Wim De Cleen
--------------------------------------------------------------------------------
@@TJclRegionInfo.Destroy
Summary:
  Destroys the class.
Description:
  Destroys the class.
Donator:
  Wim De Cleen
--------------------------------------------------------------------------------
@@FillGradient
<GROUP Graphics>
Summary:
  Fills a rectangle with a gradient pattern.
Description:
  Fills a rectangle with a gradient pattern. You can specify the smoothness of the gradient
  and the direction.
Parameters:
  DC - The handle of the device context where the rectangle will be drawn.
  ARect - The rectangle that defines the area that will be filled.
  ColorCount - The number of gradiations between the StartColor and the EndColor, this should be a least 1. The higher the number, the smoother the gradient fill.
  StartColor - The starting color.
  EndColor - The ending color.
  ADirection - The direction of the gradient, horizontial or vertical.
See also:
  TGradientDirection
Donator:
  Petr Vones
--------------------------------------------------------------------------------
@@CreateRegionFromBitmap
<GROUP Graphics.Bitmaps, $Graphics.Regions>
Summary:
  Creates the region from the specified bitmap.
Description:
  This function creates the region from a bitmap by specifing a color. You can use
  this function to make custom forms of bitmaps, or hotspots on your bitmap, like
  a map of europe for instance with every country in a different color. Create the
  regions for every color. The RegionBitmapMode can be rmInclude or rmExclude, with
  rmInclude all pixels of RegionColor will be in the region, with rmExclude all
  pixels except those of RegionColor will be in the region.
Parameters:
  Bitmap - A bitmap used as input to create the region.
  RegionColor - The color for the mask.
  RegionBitmapMode - This flag specifies if the RegionColor is included or excluded.
Result:
  The region handle.
See also:
  TJclRegionBitmapMode
  CreateBitmap
Donator:
  Wim De Cleen
--------------------------------------------------------------------------------
@@TGradientDirection
<GROUP Graphics.Types>
Summary:
  Specifies the direction of the gradient.
Description:
  Specifies the direction of the gradient. This can be gdVertical and gdHorizontial.
See also:
  FillGradient
Donator:
  Petr Vones
--------------------------------------------------------------------------------
@@TJclRegionBitmapMode
Summary:
  Specifies the operation on the color.
Description:
  Specifies the operation on the color when creating the region
  from a bitmap.
See also:
  CreateRegionFromBitmap
  CreateBitmap
Donator:
  Wim De Cleen
--------------------------------------------------------------------------------
@@TPolyFillMode
<GROUP Graphics.Types>
Summary:
  Specifies the fillmode of a poly region.
Description:
  Specifies the fillmode of a poly region. If this parameter is set to fmAlternate then
  the region is filled between odd-numbered and even-numbered sides of the polygon. Specifing
  fmWinding will fill any part of the poly region with a non-zero winding value.
See also:
  CreatePoly
  CreatePolyPolygon
Donator:
  Wim De Cleen
--------------------------------------------------------------------------------
@@TJclRegionCombineOperator
<GROUP Graphics.Types, $Graphics.Regions>
Summary:
  Specifies the combination operator.
Description:
  Specifies the operator when combining two regions.
  The following values can be specified:
<TABLE>
Value   Description
------  -----------------------------------------------------------------------------
coAnd   The resulting region is the intersection of the two regions
coDiff  The resulting region is any area of region one that is not in region two
coOr    The resulting region is the union of the regions
coXor   The resulting region is the union of the regions except any overlapping areas
</TABLE>
See also:
  Combine
Donator:
  Wim De Cleen
--------------------------------------------------------------------------------
@@TJclRegionType
<GROUP Graphics.Types>
Summary:
  Specifies the complexity of the region.
Description:
  Specifies the complexity of the region.
  The following values can be specified:
<TABLE>
Value      Description
---------  -------------------------------------------------------------------------
rtNull     The region is empty
rtSimple   The region is a rectangle region
rtComplex  The region consists of more than one rectangle
rtError    The region is in error state, the last function that was executed failed.
</TABLE>
See also:
  TJclRegion
Donator:
  Wim De Cleen
