------------------------------------------------------------------------------
--                                                                          --
--                An Ada2005 binding to the Qt C++ framework                --
--                                                                          --
------------------------------------------------------------------------------
--                                                                          --
-- Copyright © 2009-2010 Vadim Godunko <vgodunko@gmail.com>                 --
--                                                                          --
-- QtAda is free software;  you can  redistribute it and/or modify it under --
-- terms of the  GNU General Public License as published  by the Free Soft- --
-- ware  Foundation;  either version 2,  or (at your option) any later ver- --
-- sion. QtAda is distributed in the hope that it will be useful, but WITH- --
-- OUT ANY WARRANTY;  without even the  implied warranty of MERCHANTABILITY --
-- or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License --
-- for  more details.  You should have  received  a copy of the GNU General --
-- Public License distributed with QtAda;  see file COPYING.  If not, write --
-- to  the  Free Software Foundation,  51  Franklin  Street,  Fifth  Floor, --
-- Boston, MA 02110-1301, USA.                                              --
--                                                                          --
-- As a special exception,  if other files  instantiate  generics from this --
-- unit, or you link  this unit with other files  to produce an executable, --
-- this  unit  does not  by itself cause  the resulting  executable  to  be --
-- covered  by the  GNU  General  Public  License.  This exception does not --
-- however invalidate  any other reasons why  the executable file  might be --
-- covered by the  GNU Public License.                                      --
--                                                                          --
------------------------------------------------------------------------------
--    This file has been generated automatically. Please don't edit it.     --
------------------------------------------------------------------------------
with Qt4.Fonts;
with Qt4.Regions;
with Qt4.Strings;
with Qt4.Transforms;
with System;
with System.Address_To_Access_Conversions;

package body Qt4.Painter_Paths is

   function initialize_QPainterPath
    (Storage : System.Address)
      return Internals.QPainterPath_Access;
   pragma Import (C, initialize_QPainterPath, "__QtAda_inititialize_QPainterPath");

   function initialize_QPainterPath_QPointFCR
    (Storage : System.Address;
     Start_Point : Qt4.Point_Fs.Internals.QPointF_Access)
      return Internals.QPainterPath_Access;
   pragma Import (C, initialize_QPainterPath_QPointFCR, "__QtAda_inititialize_QPainterPath_QPointFCR");

   function adjust_QPainterPath
    (Storage : System.Address;
     From    : Internals.QPainterPath_Access)
       return Internals.QPainterPath_Access;
   pragma Import (C, adjust_QPainterPath, "__QtAda_adjust_QPainterPath");

   procedure finalize_QPainterPath (Object : Internals.QPainterPath_Access);
   pragma Import (C, finalize_QPainterPath, "__QtAda_finalize_QPainterPath");

   procedure QPainterPath_addEllipse_QRectFCR
    (Self : Internals.QPainterPath_Access;
     Rect : Qt4.Rect_Fs.Internals.QRectF_Access);
   pragma Import (C, QPainterPath_addEllipse_QRectFCR, "__QtAda_QPainterPath_addEllipse_QRectFCR");

   procedure QPainterPath_addEllipse_qreal_qreal_qreal_qreal
    (Self : Internals.QPainterPath_Access;
     X : Qt4.Q_Real;
     Y : Qt4.Q_Real;
     W : Qt4.Q_Real;
     H : Qt4.Q_Real);
   pragma Import (C, QPainterPath_addEllipse_qreal_qreal_qreal_qreal, "__QtAda_QPainterPath_addEllipse_qreal_qreal_qreal_qreal");

   procedure QPainterPath_addEllipse_QPointFCR_qreal_qreal
    (Self : Internals.QPainterPath_Access;
     Center : Qt4.Point_Fs.Internals.QPointF_Access;
     Rx : Qt4.Q_Real;
     Ry : Qt4.Q_Real);
   pragma Import (C, QPainterPath_addEllipse_QPointFCR_qreal_qreal, "__QtAda_QPainterPath_addEllipse_QPointFCR_qreal_qreal");

   procedure QPainterPath_addPath_QPainterPathCR
    (Self : Internals.QPainterPath_Access;
     Path : Internals.QPainterPath_Access);
   pragma Import (C, QPainterPath_addPath_QPainterPathCR, "__QtAda_QPainterPath_addPath_QPainterPathCR");

   procedure QPainterPath_addPolygon_QPolygonFCR
    (Self : Internals.QPainterPath_Access;
     Polygon : Qt4.Polygon_Fs.Internals.QPolygonF_Access);
   pragma Import (C, QPainterPath_addPolygon_QPolygonFCR, "__QtAda_QPainterPath_addPolygon_QPolygonFCR");

   procedure QPainterPath_addRect_QRectFCR
    (Self : Internals.QPainterPath_Access;
     Rect : Qt4.Rect_Fs.Internals.QRectF_Access);
   pragma Import (C, QPainterPath_addRect_QRectFCR, "__QtAda_QPainterPath_addRect_QRectFCR");

   procedure QPainterPath_addRect_qreal_qreal_qreal_qreal
    (Self : Internals.QPainterPath_Access;
     X : Qt4.Q_Real;
     Y : Qt4.Q_Real;
     W : Qt4.Q_Real;
     H : Qt4.Q_Real);
   pragma Import (C, QPainterPath_addRect_qreal_qreal_qreal_qreal, "__QtAda_QPainterPath_addRect_qreal_qreal_qreal_qreal");

   procedure QPainterPath_addRegion_QRegionCR
    (Self : Internals.QPainterPath_Access;
     Region : Qt4.Regions.Internals.QRegion_Access);
   pragma Import (C, QPainterPath_addRegion_QRegionCR, "__QtAda_QPainterPath_addRegion_QRegionCR");

   procedure QPainterPath_addRoundedRect_QRectFCR_qreal_qreal_SizeMode
    (Self : Internals.QPainterPath_Access;
     Rect : Qt4.Rect_Fs.Internals.QRectF_Access;
     X_Radius : Qt4.Q_Real;
     Y_Radius : Qt4.Q_Real;
     Mode : Qt4.Size_Mode);
   pragma Import (C, QPainterPath_addRoundedRect_QRectFCR_qreal_qreal_SizeMode, "__QtAda_QPainterPath_addRoundedRect_QRectFCR_qreal_qreal_SizeMode");

   procedure QPainterPath_addRoundedRect_qreal_qreal_qreal_qreal_qreal_qreal_SizeMode
    (Self : Internals.QPainterPath_Access;
     X : Qt4.Q_Real;
     Y : Qt4.Q_Real;
     W : Qt4.Q_Real;
     H : Qt4.Q_Real;
     X_Radius : Qt4.Q_Real;
     Y_Radius : Qt4.Q_Real;
     Mode : Qt4.Size_Mode);
   pragma Import (C, QPainterPath_addRoundedRect_qreal_qreal_qreal_qreal_qreal_qreal_SizeMode, "__QtAda_QPainterPath_addRoundedRect_qreal_qreal_qreal_qreal_qreal_qreal_SizeMode");

   procedure QPainterPath_addText_QPointFCR_QFontCR_QStringCR
    (Self : Internals.QPainterPath_Access;
     Point : Qt4.Point_Fs.Internals.QPointF_Access;
     Font : Qt4.Fonts.Internals.QFont_Access;
     Text : Qt4.Strings.Internals.QString_Access);
   pragma Import (C, QPainterPath_addText_QPointFCR_QFontCR_QStringCR, "__QtAda_QPainterPath_addText_QPointFCR_QFontCR_QStringCR");

   procedure QPainterPath_addText_qreal_qreal_QFontCR_QStringCR
    (Self : Internals.QPainterPath_Access;
     X : Qt4.Q_Real;
     Y : Qt4.Q_Real;
     Font : Qt4.Fonts.Internals.QFont_Access;
     Text : Qt4.Strings.Internals.QString_Access);
   pragma Import (C, QPainterPath_addText_qreal_qreal_QFontCR_QStringCR, "__QtAda_QPainterPath_addText_qreal_qreal_QFontCR_QStringCR");

   function QPainterPath_angleAtPercent_qreal
    (Self : Internals.QPainterPath_Access;
     T : Qt4.Q_Real)
       return Qt4.Q_Real;
   pragma Import (C, QPainterPath_angleAtPercent_qreal, "__QtAda_QPainterPath_angleAtPercent_qreal_Q");

   procedure QPainterPath_arcMoveTo_QRectFCR_qreal
    (Self : Internals.QPainterPath_Access;
     Rectangle : Qt4.Rect_Fs.Internals.QRectF_Access;
     Angle : Qt4.Q_Real);
   pragma Import (C, QPainterPath_arcMoveTo_QRectFCR_qreal, "__QtAda_QPainterPath_arcMoveTo_QRectFCR_qreal");

   procedure QPainterPath_arcMoveTo_qreal_qreal_qreal_qreal_qreal
    (Self : Internals.QPainterPath_Access;
     X : Qt4.Q_Real;
     Y : Qt4.Q_Real;
     Width : Qt4.Q_Real;
     Height : Qt4.Q_Real;
     Angle : Qt4.Q_Real);
   pragma Import (C, QPainterPath_arcMoveTo_qreal_qreal_qreal_qreal_qreal, "__QtAda_QPainterPath_arcMoveTo_qreal_qreal_qreal_qreal_qreal");

   procedure QPainterPath_arcTo_QRectFCR_qreal_qreal
    (Self : Internals.QPainterPath_Access;
     Rectangle : Qt4.Rect_Fs.Internals.QRectF_Access;
     Start_Angle : Qt4.Q_Real;
     Sweep_Length : Qt4.Q_Real);
   pragma Import (C, QPainterPath_arcTo_QRectFCR_qreal_qreal, "__QtAda_QPainterPath_arcTo_QRectFCR_qreal_qreal");

   procedure QPainterPath_arcTo_qreal_qreal_qreal_qreal_qreal_qreal
    (Self : Internals.QPainterPath_Access;
     X : Qt4.Q_Real;
     Y : Qt4.Q_Real;
     Width : Qt4.Q_Real;
     Height : Qt4.Q_Real;
     Start_Angle : Qt4.Q_Real;
     Sweep_Length : Qt4.Q_Real);
   pragma Import (C, QPainterPath_arcTo_qreal_qreal_qreal_qreal_qreal_qreal, "__QtAda_QPainterPath_arcTo_qreal_qreal_qreal_qreal_qreal_qreal");

   procedure QPainterPath_boundingRect
    (Returns : Qt4.Rect_Fs.Internals.QRectF_Access;
     Self : Internals.QPainterPath_Access);
   pragma Import (C, QPainterPath_boundingRect, "__QtAda_QPainterPath_boundingRect_Q");

   procedure QPainterPath_closeSubpath
    (Self : Internals.QPainterPath_Access);
   pragma Import (C, QPainterPath_closeSubpath, "__QtAda_QPainterPath_closeSubpath");

   procedure QPainterPath_connectPath_QPainterPathCR
    (Self : Internals.QPainterPath_Access;
     Path : Internals.QPainterPath_Access);
   pragma Import (C, QPainterPath_connectPath_QPainterPathCR, "__QtAda_QPainterPath_connectPath_QPainterPathCR");

   function QPainterPath_contains_QPointFCR
    (Self : Internals.QPainterPath_Access;
     Point : Qt4.Point_Fs.Internals.QPointF_Access)
       return Interfaces.C.unsigned;
   pragma Import (C, QPainterPath_contains_QPointFCR, "__QtAda_QPainterPath_contains_QPointFCR_Q");

   function QPainterPath_contains_QRectFCR
    (Self : Internals.QPainterPath_Access;
     Rectangle : Qt4.Rect_Fs.Internals.QRectF_Access)
       return Interfaces.C.unsigned;
   pragma Import (C, QPainterPath_contains_QRectFCR, "__QtAda_QPainterPath_contains_QRectFCR_Q");

   function QPainterPath_contains_QPainterPathCR
    (Self : Internals.QPainterPath_Access;
     Path : Internals.QPainterPath_Access)
       return Interfaces.C.unsigned;
   pragma Import (C, QPainterPath_contains_QPainterPathCR, "__QtAda_QPainterPath_contains_QPainterPathCR_Q");

   procedure QPainterPath_controlPointRect
    (Returns : Qt4.Rect_Fs.Internals.QRectF_Access;
     Self : Internals.QPainterPath_Access);
   pragma Import (C, QPainterPath_controlPointRect, "__QtAda_QPainterPath_controlPointRect_Q");

   procedure QPainterPath_cubicTo_QPointFCR_QPointFCR_QPointFCR
    (Self : Internals.QPainterPath_Access;
     C_1 : Qt4.Point_Fs.Internals.QPointF_Access;
     C_2 : Qt4.Point_Fs.Internals.QPointF_Access;
     End_Point : Qt4.Point_Fs.Internals.QPointF_Access);
   pragma Import (C, QPainterPath_cubicTo_QPointFCR_QPointFCR_QPointFCR, "__QtAda_QPainterPath_cubicTo_QPointFCR_QPointFCR_QPointFCR");

   procedure QPainterPath_cubicTo_qreal_qreal_qreal_qreal_qreal_qreal
    (Self : Internals.QPainterPath_Access;
     C_1_X : Qt4.Q_Real;
     C_1_Y : Qt4.Q_Real;
     C_2_X : Qt4.Q_Real;
     C_2_Y : Qt4.Q_Real;
     End_Point_X : Qt4.Q_Real;
     End_Point_Y : Qt4.Q_Real);
   pragma Import (C, QPainterPath_cubicTo_qreal_qreal_qreal_qreal_qreal_qreal, "__QtAda_QPainterPath_cubicTo_qreal_qreal_qreal_qreal_qreal_qreal");

   procedure QPainterPath_currentPosition
    (Returns : Qt4.Point_Fs.Internals.QPointF_Access;
     Self : Internals.QPainterPath_Access);
   pragma Import (C, QPainterPath_currentPosition, "__QtAda_QPainterPath_currentPosition_Q");

   function QPainterPath_elementCount
    (Self : Internals.QPainterPath_Access)
       return Qt4.Q_Integer;
   pragma Import (C, QPainterPath_elementCount, "__QtAda_QPainterPath_elementCount_Q");

   function QPainterPath_fillRule
    (Self : Internals.QPainterPath_Access)
       return Qt4.Fill_Rule;
   pragma Import (C, QPainterPath_fillRule, "__QtAda_QPainterPath_fillRule_Q");

   procedure QPainterPath_intersected_QPainterPathCR
    (Returns : Internals.QPainterPath_Access;
     Self : Internals.QPainterPath_Access;
     Path : Internals.QPainterPath_Access);
   pragma Import (C, QPainterPath_intersected_QPainterPathCR, "__QtAda_QPainterPath_intersected_QPainterPathCR_Q");

   function QPainterPath_intersects_QRectFCR
    (Self : Internals.QPainterPath_Access;
     Rectangle : Qt4.Rect_Fs.Internals.QRectF_Access)
       return Interfaces.C.unsigned;
   pragma Import (C, QPainterPath_intersects_QRectFCR, "__QtAda_QPainterPath_intersects_QRectFCR_Q");

   function QPainterPath_intersects_QPainterPathCR
    (Self : Internals.QPainterPath_Access;
     Path : Internals.QPainterPath_Access)
       return Interfaces.C.unsigned;
   pragma Import (C, QPainterPath_intersects_QPainterPathCR, "__QtAda_QPainterPath_intersects_QPainterPathCR_Q");

   function QPainterPath_isEmpty
    (Self : Internals.QPainterPath_Access)
       return Interfaces.C.unsigned;
   pragma Import (C, QPainterPath_isEmpty, "__QtAda_QPainterPath_isEmpty_Q");

   function QPainterPath_length
    (Self : Internals.QPainterPath_Access)
       return Qt4.Q_Real;
   pragma Import (C, QPainterPath_length, "__QtAda_QPainterPath_length_Q");

   procedure QPainterPath_lineTo_QPointFCR
    (Self : Internals.QPainterPath_Access;
     End_Point : Qt4.Point_Fs.Internals.QPointF_Access);
   pragma Import (C, QPainterPath_lineTo_QPointFCR, "__QtAda_QPainterPath_lineTo_QPointFCR");

   procedure QPainterPath_lineTo_qreal_qreal
    (Self : Internals.QPainterPath_Access;
     X : Qt4.Q_Real;
     Y : Qt4.Q_Real);
   pragma Import (C, QPainterPath_lineTo_qreal_qreal, "__QtAda_QPainterPath_lineTo_qreal_qreal");

   procedure QPainterPath_moveTo_QPointFCR
    (Self : Internals.QPainterPath_Access;
     End_Point : Qt4.Point_Fs.Internals.QPointF_Access);
   pragma Import (C, QPainterPath_moveTo_QPointFCR, "__QtAda_QPainterPath_moveTo_QPointFCR");

   procedure QPainterPath_moveTo_qreal_qreal
    (Self : Internals.QPainterPath_Access;
     X : Qt4.Q_Real;
     Y : Qt4.Q_Real);
   pragma Import (C, QPainterPath_moveTo_qreal_qreal, "__QtAda_QPainterPath_moveTo_qreal_qreal");

   function QPainterPath_percentAtLength_qreal
    (Self : Internals.QPainterPath_Access;
     T : Qt4.Q_Real)
       return Qt4.Q_Real;
   pragma Import (C, QPainterPath_percentAtLength_qreal, "__QtAda_QPainterPath_percentAtLength_qreal_Q");

   procedure QPainterPath_pointAtPercent_qreal
    (Returns : Qt4.Point_Fs.Internals.QPointF_Access;
     Self : Internals.QPainterPath_Access;
     T : Qt4.Q_Real);
   pragma Import (C, QPainterPath_pointAtPercent_qreal, "__QtAda_QPainterPath_pointAtPercent_qreal_Q");

   procedure QPainterPath_quadTo_QPointFCR_QPointFCR
    (Self : Internals.QPainterPath_Access;
     C : Qt4.Point_Fs.Internals.QPointF_Access;
     End_Point : Qt4.Point_Fs.Internals.QPointF_Access);
   pragma Import (C, QPainterPath_quadTo_QPointFCR_QPointFCR, "__QtAda_QPainterPath_quadTo_QPointFCR_QPointFCR");

   procedure QPainterPath_quadTo_qreal_qreal_qreal_qreal
    (Self : Internals.QPainterPath_Access;
     Cx : Qt4.Q_Real;
     Cy : Qt4.Q_Real;
     End_Point_X : Qt4.Q_Real;
     End_Point_Y : Qt4.Q_Real);
   pragma Import (C, QPainterPath_quadTo_qreal_qreal_qreal_qreal, "__QtAda_QPainterPath_quadTo_qreal_qreal_qreal_qreal");

   procedure QPainterPath_setElementPositionAt_int_qreal_qreal
    (Self : Internals.QPainterPath_Access;
     Index : Qt4.Q_Integer;
     X : Qt4.Q_Real;
     Y : Qt4.Q_Real);
   pragma Import (C, QPainterPath_setElementPositionAt_int_qreal_qreal, "__QtAda_QPainterPath_setElementPositionAt_int_qreal_qreal");

   procedure QPainterPath_setFillRule_FillRule
    (Self : Internals.QPainterPath_Access;
     Fill_Rule : Qt4.Fill_Rule);
   pragma Import (C, QPainterPath_setFillRule_FillRule, "__QtAda_QPainterPath_setFillRule_FillRule");

   procedure QPainterPath_simplified
    (Returns : Internals.QPainterPath_Access;
     Self : Internals.QPainterPath_Access);
   pragma Import (C, QPainterPath_simplified, "__QtAda_QPainterPath_simplified_Q");

   function QPainterPath_slopeAtPercent_qreal
    (Self : Internals.QPainterPath_Access;
     T : Qt4.Q_Real)
       return Qt4.Q_Real;
   pragma Import (C, QPainterPath_slopeAtPercent_qreal, "__QtAda_QPainterPath_slopeAtPercent_qreal_Q");

   procedure QPainterPath_subtracted_QPainterPathCR
    (Returns : Internals.QPainterPath_Access;
     Self : Internals.QPainterPath_Access;
     Path : Internals.QPainterPath_Access);
   pragma Import (C, QPainterPath_subtracted_QPainterPathCR, "__QtAda_QPainterPath_subtracted_QPainterPathCR_Q");

   procedure QPainterPath_toFillPolygon_QTransformCR
    (Returns : Qt4.Polygon_Fs.Internals.QPolygonF_Access;
     Self : Internals.QPainterPath_Access;
     Matrix : Qt4.Transforms.Internals.QTransform_Access);
   pragma Import (C, QPainterPath_toFillPolygon_QTransformCR, "__QtAda_QPainterPath_toFillPolygon_QTransformCR_Q");

   procedure QPainterPath_toFillPolygon_QMatrixCR
    (Returns : Qt4.Polygon_Fs.Internals.QPolygonF_Access;
     Self : Internals.QPainterPath_Access;
     Matrix : Qt4.Matrices.Internals.QMatrix_Access);
   pragma Import (C, QPainterPath_toFillPolygon_QMatrixCR, "__QtAda_QPainterPath_toFillPolygon_QMatrixCR_Q");

   procedure QPainterPath_toReversed
    (Returns : Internals.QPainterPath_Access;
     Self : Internals.QPainterPath_Access);
   pragma Import (C, QPainterPath_toReversed, "__QtAda_QPainterPath_toReversed_Q");

   procedure QPainterPath_united_QPainterPathCR
    (Returns : Internals.QPainterPath_Access;
     Self : Internals.QPainterPath_Access;
     Path : Internals.QPainterPath_Access);
   pragma Import (C, QPainterPath_united_QPainterPathCR, "__QtAda_QPainterPath_united_QPainterPathCR_Q");

   function eq_QPainterPathCR
    (Self : Internals.QPainterPath_Access;
     Path : Internals.QPainterPath_Access)
       return Interfaces.C.unsigned;
   pragma Import (C, eq_QPainterPathCR, "__QtAda_QPainterPath_eq_QPainterPathCR_Q");

   ------------
   -- Adjust --
   ------------

   overriding
   procedure Adjust (Self : in out Q_Painter_Path) is
   begin
      Self.Object := adjust_QPainterPath (Self.Storage'Address, Self.Object);
      Self.Wrapper := False;
   end Adjust;

   --------------
   -- Finalize --
   --------------

   overriding
   procedure Finalize (Self : in out Q_Painter_Path) is
   begin
      if not Self.Wrapper then
         finalize_QPainterPath (Self.Object);
      end if;
   end Finalize;

   ----------------
   -- Initialize --
   ----------------

   overriding
   procedure Initialize (Self : in out Q_Painter_Path) is
      use type Internals.QPainterPath_Access;

   begin
      if Self.Object = null then
         Self.Object := initialize_QPainterPath (Self.Storage'Address);
      end if;
   end Initialize;

   ------------
   -- Create --
   ------------

   function Create
    (Start_Point : Qt4.Point_Fs.Q_Point_F'Class)
       return Q_Painter_Path
   is
   begin
      return Self : Q_Painter_Path
        := (Ada.Finalization.Controlled with others => <>)
      do
         Self.Object := initialize_QPainterPath_QPointFCR (Self.Storage'Address, Qt4.Point_Fs.Internals.QPointF_View (Start_Point));
      end return;
   end Create;

   -----------------
   -- Add_Ellipse --
   -----------------

   procedure Add_Ellipse
    (Self : in out Q_Painter_Path'Class;
     Rect : Qt4.Rect_Fs.Q_Rect_F'Class)
   is
   begin
      QPainterPath_addEllipse_QRectFCR (Self.Object, Qt4.Rect_Fs.Internals.QRectF_View (Rect));
   end Add_Ellipse;

   -----------------
   -- Add_Ellipse --
   -----------------

   procedure Add_Ellipse
    (Self : in out Q_Painter_Path'Class;
     X : Qt4.Q_Real;
     Y : Qt4.Q_Real;
     W : Qt4.Q_Real;
     H : Qt4.Q_Real)
   is
   begin
      QPainterPath_addEllipse_qreal_qreal_qreal_qreal (Self.Object, X, Y, W, H);
   end Add_Ellipse;

   -----------------
   -- Add_Ellipse --
   -----------------

   procedure Add_Ellipse
    (Self : in out Q_Painter_Path'Class;
     Center : Qt4.Point_Fs.Q_Point_F'Class;
     Rx : Qt4.Q_Real;
     Ry : Qt4.Q_Real)
   is
   begin
      QPainterPath_addEllipse_QPointFCR_qreal_qreal (Self.Object, Qt4.Point_Fs.Internals.QPointF_View (Center), Rx, Ry);
   end Add_Ellipse;

   --------------
   -- Add_Path --
   --------------

   procedure Add_Path
    (Self : in out Q_Painter_Path'Class;
     Path : Q_Painter_Path'Class)
   is
   begin
      QPainterPath_addPath_QPainterPathCR (Self.Object, Path.Object);
   end Add_Path;

   -----------------
   -- Add_Polygon --
   -----------------

   procedure Add_Polygon
    (Self : in out Q_Painter_Path'Class;
     Polygon : Qt4.Polygon_Fs.Q_Polygon_F'Class)
   is
   begin
      QPainterPath_addPolygon_QPolygonFCR (Self.Object, Qt4.Polygon_Fs.Internals.QPolygonF_View (Polygon));
   end Add_Polygon;

   --------------
   -- Add_Rect --
   --------------

   procedure Add_Rect
    (Self : in out Q_Painter_Path'Class;
     Rect : Qt4.Rect_Fs.Q_Rect_F'Class)
   is
   begin
      QPainterPath_addRect_QRectFCR (Self.Object, Qt4.Rect_Fs.Internals.QRectF_View (Rect));
   end Add_Rect;

   --------------
   -- Add_Rect --
   --------------

   procedure Add_Rect
    (Self : in out Q_Painter_Path'Class;
     X : Qt4.Q_Real;
     Y : Qt4.Q_Real;
     W : Qt4.Q_Real;
     H : Qt4.Q_Real)
   is
   begin
      QPainterPath_addRect_qreal_qreal_qreal_qreal (Self.Object, X, Y, W, H);
   end Add_Rect;

   ----------------
   -- Add_Region --
   ----------------

   procedure Add_Region
    (Self : in out Q_Painter_Path'Class;
     Region : Qt4.Regions.Q_Region'Class)
   is
   begin
      QPainterPath_addRegion_QRegionCR (Self.Object, Qt4.Regions.Internals.QRegion_View (Region));
   end Add_Region;

   ----------------------
   -- Add_Rounded_Rect --
   ----------------------

   procedure Add_Rounded_Rect
    (Self : in out Q_Painter_Path'Class;
     Rect : Qt4.Rect_Fs.Q_Rect_F'Class;
     X_Radius : Qt4.Q_Real;
     Y_Radius : Qt4.Q_Real;
     Mode : Qt4.Size_Mode
       := Absolute_Size)
   is
   begin
      QPainterPath_addRoundedRect_QRectFCR_qreal_qreal_SizeMode (Self.Object, Qt4.Rect_Fs.Internals.QRectF_View (Rect), X_Radius, Y_Radius, Mode);
   end Add_Rounded_Rect;

   ----------------------
   -- Add_Rounded_Rect --
   ----------------------

   procedure Add_Rounded_Rect
    (Self : in out Q_Painter_Path'Class;
     X : Qt4.Q_Real;
     Y : Qt4.Q_Real;
     W : Qt4.Q_Real;
     H : Qt4.Q_Real;
     X_Radius : Qt4.Q_Real;
     Y_Radius : Qt4.Q_Real;
     Mode : Qt4.Size_Mode
       := Absolute_Size)
   is
   begin
      QPainterPath_addRoundedRect_qreal_qreal_qreal_qreal_qreal_qreal_SizeMode (Self.Object, X, Y, W, H, X_Radius, Y_Radius, Mode);
   end Add_Rounded_Rect;

   --------------
   -- Add_Text --
   --------------

   procedure Add_Text
    (Self : in out Q_Painter_Path'Class;
     Point : Qt4.Point_Fs.Q_Point_F'Class;
     Font : Qt4.Fonts.Q_Font'Class;
     Text : Qt4.Strings.Q_String'Class)
   is
   begin
      QPainterPath_addText_QPointFCR_QFontCR_QStringCR (Self.Object, Qt4.Point_Fs.Internals.QPointF_View (Point), Qt4.Fonts.Internals.QFont_View (Font), Qt4.Strings.Internals.QString_View (Text));
   end Add_Text;

   --------------
   -- Add_Text --
   --------------

   procedure Add_Text
    (Self : in out Q_Painter_Path'Class;
     X : Qt4.Q_Real;
     Y : Qt4.Q_Real;
     Font : Qt4.Fonts.Q_Font'Class;
     Text : Qt4.Strings.Q_String'Class)
   is
   begin
      QPainterPath_addText_qreal_qreal_QFontCR_QStringCR (Self.Object, X, Y, Qt4.Fonts.Internals.QFont_View (Font), Qt4.Strings.Internals.QString_View (Text));
   end Add_Text;

   ----------------------
   -- Angle_At_Percent --
   ----------------------

   function Angle_At_Percent
    (Self : Q_Painter_Path'Class;
     T : Qt4.Q_Real)
       return Qt4.Q_Real
   is
   begin
      return QPainterPath_angleAtPercent_qreal (Self.Object, T);
   end Angle_At_Percent;

   -----------------
   -- Arc_Move_To --
   -----------------

   procedure Arc_Move_To
    (Self : in out Q_Painter_Path'Class;
     Rectangle : Qt4.Rect_Fs.Q_Rect_F'Class;
     Angle : Qt4.Q_Real)
   is
   begin
      QPainterPath_arcMoveTo_QRectFCR_qreal (Self.Object, Qt4.Rect_Fs.Internals.QRectF_View (Rectangle), Angle);
   end Arc_Move_To;

   -----------------
   -- Arc_Move_To --
   -----------------

   procedure Arc_Move_To
    (Self : in out Q_Painter_Path'Class;
     X : Qt4.Q_Real;
     Y : Qt4.Q_Real;
     Width : Qt4.Q_Real;
     Height : Qt4.Q_Real;
     Angle : Qt4.Q_Real)
   is
   begin
      QPainterPath_arcMoveTo_qreal_qreal_qreal_qreal_qreal (Self.Object, X, Y, Width, Height, Angle);
   end Arc_Move_To;

   ------------
   -- Arc_To --
   ------------

   procedure Arc_To
    (Self : in out Q_Painter_Path'Class;
     Rectangle : Qt4.Rect_Fs.Q_Rect_F'Class;
     Start_Angle : Qt4.Q_Real;
     Sweep_Length : Qt4.Q_Real)
   is
   begin
      QPainterPath_arcTo_QRectFCR_qreal_qreal (Self.Object, Qt4.Rect_Fs.Internals.QRectF_View (Rectangle), Start_Angle, Sweep_Length);
   end Arc_To;

   ------------
   -- Arc_To --
   ------------

   procedure Arc_To
    (Self : in out Q_Painter_Path'Class;
     X : Qt4.Q_Real;
     Y : Qt4.Q_Real;
     Width : Qt4.Q_Real;
     Height : Qt4.Q_Real;
     Start_Angle : Qt4.Q_Real;
     Sweep_Length : Qt4.Q_Real)
   is
   begin
      QPainterPath_arcTo_qreal_qreal_qreal_qreal_qreal_qreal (Self.Object, X, Y, Width, Height, Start_Angle, Sweep_Length);
   end Arc_To;

   -------------------
   -- Bounding_Rect --
   -------------------

   function Bounding_Rect
    (Self : Q_Painter_Path'Class)
       return Qt4.Rect_Fs.Q_Rect_F
   is
   begin
      return Returns : Qt4.Rect_Fs.Q_Rect_F do
         QPainterPath_boundingRect (Qt4.Rect_Fs.Internals.QRectF_View (Returns), Self.Object);
      end return;
   end Bounding_Rect;

   -------------------
   -- Close_Subpath --
   -------------------

   procedure Close_Subpath
    (Self : in out Q_Painter_Path'Class)
   is
   begin
      QPainterPath_closeSubpath (Self.Object);
   end Close_Subpath;

   ------------------
   -- Connect_Path --
   ------------------

   procedure Connect_Path
    (Self : in out Q_Painter_Path'Class;
     Path : Q_Painter_Path'Class)
   is
   begin
      QPainterPath_connectPath_QPainterPathCR (Self.Object, Path.Object);
   end Connect_Path;

   --------------
   -- Contains --
   --------------

   function Contains
    (Self : Q_Painter_Path'Class;
     Point : Qt4.Point_Fs.Q_Point_F'Class)
       return Boolean
   is
   begin
      return Interfaces.C."/=" (QPainterPath_contains_QPointFCR (Self.Object, Qt4.Point_Fs.Internals.QPointF_View (Point)), 0);
   end Contains;

   --------------
   -- Contains --
   --------------

   function Contains
    (Self : Q_Painter_Path'Class;
     Rectangle : Qt4.Rect_Fs.Q_Rect_F'Class)
       return Boolean
   is
   begin
      return Interfaces.C."/=" (QPainterPath_contains_QRectFCR (Self.Object, Qt4.Rect_Fs.Internals.QRectF_View (Rectangle)), 0);
   end Contains;

   --------------
   -- Contains --
   --------------

   function Contains
    (Self : Q_Painter_Path'Class;
     Path : Q_Painter_Path'Class)
       return Boolean
   is
   begin
      return Interfaces.C."/=" (QPainterPath_contains_QPainterPathCR (Self.Object, Path.Object), 0);
   end Contains;

   ------------------------
   -- Control_Point_Rect --
   ------------------------

   function Control_Point_Rect
    (Self : Q_Painter_Path'Class)
       return Qt4.Rect_Fs.Q_Rect_F
   is
   begin
      return Returns : Qt4.Rect_Fs.Q_Rect_F do
         QPainterPath_controlPointRect (Qt4.Rect_Fs.Internals.QRectF_View (Returns), Self.Object);
      end return;
   end Control_Point_Rect;

   --------------
   -- Cubic_To --
   --------------

   procedure Cubic_To
    (Self : in out Q_Painter_Path'Class;
     C_1 : Qt4.Point_Fs.Q_Point_F'Class;
     C_2 : Qt4.Point_Fs.Q_Point_F'Class;
     End_Point : Qt4.Point_Fs.Q_Point_F'Class)
   is
   begin
      QPainterPath_cubicTo_QPointFCR_QPointFCR_QPointFCR (Self.Object, Qt4.Point_Fs.Internals.QPointF_View (C_1), Qt4.Point_Fs.Internals.QPointF_View (C_2), Qt4.Point_Fs.Internals.QPointF_View (End_Point));
   end Cubic_To;

   --------------
   -- Cubic_To --
   --------------

   procedure Cubic_To
    (Self : in out Q_Painter_Path'Class;
     C_1_X : Qt4.Q_Real;
     C_1_Y : Qt4.Q_Real;
     C_2_X : Qt4.Q_Real;
     C_2_Y : Qt4.Q_Real;
     End_Point_X : Qt4.Q_Real;
     End_Point_Y : Qt4.Q_Real)
   is
   begin
      QPainterPath_cubicTo_qreal_qreal_qreal_qreal_qreal_qreal (Self.Object, C_1_X, C_1_Y, C_2_X, C_2_Y, End_Point_X, End_Point_Y);
   end Cubic_To;

   ----------------------
   -- Current_Position --
   ----------------------

   function Current_Position
    (Self : Q_Painter_Path'Class)
       return Qt4.Point_Fs.Q_Point_F
   is
   begin
      return Returns : Qt4.Point_Fs.Q_Point_F do
         QPainterPath_currentPosition (Qt4.Point_Fs.Internals.QPointF_View (Returns), Self.Object);
      end return;
   end Current_Position;

   -------------------
   -- Element_Count --
   -------------------

   function Element_Count
    (Self : Q_Painter_Path'Class)
       return Qt4.Q_Integer
   is
   begin
      return QPainterPath_elementCount (Self.Object);
   end Element_Count;

   ---------------
   -- Fill_Rule --
   ---------------

   function Fill_Rule
    (Self : Q_Painter_Path'Class)
       return Qt4.Fill_Rule
   is
   begin
      return QPainterPath_fillRule (Self.Object);
   end Fill_Rule;

   -----------------
   -- Intersected --
   -----------------

   function Intersected
    (Self : Q_Painter_Path'Class;
     Path : Q_Painter_Path'Class)
       return Q_Painter_Path
   is
   begin
      return Returns : Q_Painter_Path do
         QPainterPath_intersected_QPainterPathCR (Returns.Object, Self.Object, Path.Object);
      end return;
   end Intersected;

   ----------------
   -- Intersects --
   ----------------

   function Intersects
    (Self : Q_Painter_Path'Class;
     Rectangle : Qt4.Rect_Fs.Q_Rect_F'Class)
       return Boolean
   is
   begin
      return Interfaces.C."/=" (QPainterPath_intersects_QRectFCR (Self.Object, Qt4.Rect_Fs.Internals.QRectF_View (Rectangle)), 0);
   end Intersects;

   ----------------
   -- Intersects --
   ----------------

   function Intersects
    (Self : Q_Painter_Path'Class;
     Path : Q_Painter_Path'Class)
       return Boolean
   is
   begin
      return Interfaces.C."/=" (QPainterPath_intersects_QPainterPathCR (Self.Object, Path.Object), 0);
   end Intersects;

   --------------
   -- Is_Empty --
   --------------

   function Is_Empty
    (Self : Q_Painter_Path'Class)
       return Boolean
   is
   begin
      return Interfaces.C."/=" (QPainterPath_isEmpty (Self.Object), 0);
   end Is_Empty;

   ------------
   -- Length --
   ------------

   function Length
    (Self : Q_Painter_Path'Class)
       return Qt4.Q_Real
   is
   begin
      return QPainterPath_length (Self.Object);
   end Length;

   -------------
   -- Line_To --
   -------------

   procedure Line_To
    (Self : in out Q_Painter_Path'Class;
     End_Point : Qt4.Point_Fs.Q_Point_F'Class)
   is
   begin
      QPainterPath_lineTo_QPointFCR (Self.Object, Qt4.Point_Fs.Internals.QPointF_View (End_Point));
   end Line_To;

   -------------
   -- Line_To --
   -------------

   procedure Line_To
    (Self : in out Q_Painter_Path'Class;
     X : Qt4.Q_Real;
     Y : Qt4.Q_Real)
   is
   begin
      QPainterPath_lineTo_qreal_qreal (Self.Object, X, Y);
   end Line_To;

   -------------
   -- Move_To --
   -------------

   procedure Move_To
    (Self : in out Q_Painter_Path'Class;
     End_Point : Qt4.Point_Fs.Q_Point_F'Class)
   is
   begin
      QPainterPath_moveTo_QPointFCR (Self.Object, Qt4.Point_Fs.Internals.QPointF_View (End_Point));
   end Move_To;

   -------------
   -- Move_To --
   -------------

   procedure Move_To
    (Self : in out Q_Painter_Path'Class;
     X : Qt4.Q_Real;
     Y : Qt4.Q_Real)
   is
   begin
      QPainterPath_moveTo_qreal_qreal (Self.Object, X, Y);
   end Move_To;

   -----------------------
   -- Percent_At_Length --
   -----------------------

   function Percent_At_Length
    (Self : Q_Painter_Path'Class;
     T : Qt4.Q_Real)
       return Qt4.Q_Real
   is
   begin
      return QPainterPath_percentAtLength_qreal (Self.Object, T);
   end Percent_At_Length;

   ----------------------
   -- Point_At_Percent --
   ----------------------

   function Point_At_Percent
    (Self : Q_Painter_Path'Class;
     T : Qt4.Q_Real)
       return Qt4.Point_Fs.Q_Point_F
   is
   begin
      return Returns : Qt4.Point_Fs.Q_Point_F do
         QPainterPath_pointAtPercent_qreal (Qt4.Point_Fs.Internals.QPointF_View (Returns), Self.Object, T);
      end return;
   end Point_At_Percent;

   -------------
   -- Quad_To --
   -------------

   procedure Quad_To
    (Self : in out Q_Painter_Path'Class;
     C : Qt4.Point_Fs.Q_Point_F'Class;
     End_Point : Qt4.Point_Fs.Q_Point_F'Class)
   is
   begin
      QPainterPath_quadTo_QPointFCR_QPointFCR (Self.Object, Qt4.Point_Fs.Internals.QPointF_View (C), Qt4.Point_Fs.Internals.QPointF_View (End_Point));
   end Quad_To;

   -------------
   -- Quad_To --
   -------------

   procedure Quad_To
    (Self : in out Q_Painter_Path'Class;
     Cx : Qt4.Q_Real;
     Cy : Qt4.Q_Real;
     End_Point_X : Qt4.Q_Real;
     End_Point_Y : Qt4.Q_Real)
   is
   begin
      QPainterPath_quadTo_qreal_qreal_qreal_qreal (Self.Object, Cx, Cy, End_Point_X, End_Point_Y);
   end Quad_To;

   -----------------------------
   -- Set_Element_Position_At --
   -----------------------------

   procedure Set_Element_Position_At
    (Self : in out Q_Painter_Path'Class;
     Index : Qt4.Q_Integer;
     X : Qt4.Q_Real;
     Y : Qt4.Q_Real)
   is
   begin
      QPainterPath_setElementPositionAt_int_qreal_qreal (Self.Object, Index, X, Y);
   end Set_Element_Position_At;

   -------------------
   -- Set_Fill_Rule --
   -------------------

   procedure Set_Fill_Rule
    (Self : in out Q_Painter_Path'Class;
     Fill_Rule : Qt4.Fill_Rule)
   is
   begin
      QPainterPath_setFillRule_FillRule (Self.Object, Fill_Rule);
   end Set_Fill_Rule;

   ----------------
   -- Simplified --
   ----------------

   function Simplified
    (Self : Q_Painter_Path'Class)
       return Q_Painter_Path
   is
   begin
      return Returns : Q_Painter_Path do
         QPainterPath_simplified (Returns.Object, Self.Object);
      end return;
   end Simplified;

   ----------------------
   -- Slope_At_Percent --
   ----------------------

   function Slope_At_Percent
    (Self : Q_Painter_Path'Class;
     T : Qt4.Q_Real)
       return Qt4.Q_Real
   is
   begin
      return QPainterPath_slopeAtPercent_qreal (Self.Object, T);
   end Slope_At_Percent;

   ----------------
   -- Subtracted --
   ----------------

   function Subtracted
    (Self : Q_Painter_Path'Class;
     Path : Q_Painter_Path'Class)
       return Q_Painter_Path
   is
   begin
      return Returns : Q_Painter_Path do
         QPainterPath_subtracted_QPainterPathCR (Returns.Object, Self.Object, Path.Object);
      end return;
   end Subtracted;

   ---------------------
   -- To_Fill_Polygon --
   ---------------------

   function To_Fill_Polygon
    (Self : Q_Painter_Path'Class;
     Matrix : Qt4.Transforms.Q_Transform'Class)
       return Qt4.Polygon_Fs.Q_Polygon_F
   is
   begin
      return Returns : Qt4.Polygon_Fs.Q_Polygon_F do
         QPainterPath_toFillPolygon_QTransformCR (Qt4.Polygon_Fs.Internals.QPolygonF_View (Returns), Self.Object, Qt4.Transforms.Internals.QTransform_View (Matrix));
      end return;
   end To_Fill_Polygon;

   ---------------------
   -- To_Fill_Polygon --
   ---------------------

   function To_Fill_Polygon
    (Self : Q_Painter_Path'Class;
     Matrix : Qt4.Matrices.Q_Matrix'Class
       := Qt4.Matrices.Create)
       return Qt4.Polygon_Fs.Q_Polygon_F
   is
   begin
      return Returns : Qt4.Polygon_Fs.Q_Polygon_F do
         QPainterPath_toFillPolygon_QMatrixCR (Qt4.Polygon_Fs.Internals.QPolygonF_View (Returns), Self.Object, Qt4.Matrices.Internals.QMatrix_View (Matrix));
      end return;
   end To_Fill_Polygon;

   -----------------
   -- To_Reversed --
   -----------------

   function To_Reversed
    (Self : Q_Painter_Path'Class)
       return Q_Painter_Path
   is
   begin
      return Returns : Q_Painter_Path do
         QPainterPath_toReversed (Returns.Object, Self.Object);
      end return;
   end To_Reversed;

   ------------
   -- United --
   ------------

   function United
    (Self : Q_Painter_Path'Class;
     Path : Q_Painter_Path'Class)
       return Q_Painter_Path
   is
   begin
      return Returns : Q_Painter_Path do
         QPainterPath_united_QPainterPathCR (Returns.Object, Self.Object, Path.Object);
      end return;
   end United;

   ---------
   -- "=" --
   ---------

   overriding function "="
    (Self : Q_Painter_Path;
     Path : Q_Painter_Path)
       return Boolean
   is
   begin
      return Interfaces.C."/=" (eq_QPainterPathCR (Self.Object, Path.Object), 0);
   end "=";

   ---------------
   -- Internals --
   ---------------

   package body Internals is

   -----------------------
   -- QPainterPath_View --
   -----------------------

      function QPainterPath_View
       (Item : Q_Painter_Path'Class)
          return QPainterPath_Access
      is
      begin
         return Item.Object;
      end QPainterPath_View;

      package QPainterPath_Conversions is
        new System.Address_To_Access_Conversions
             (QPainterPath);

   ----------------------------
   -- QPainterPathTo_Pointer --
   ----------------------------

      function To_Pointer
       (Address : System.Address)
          return QPainterPath_Access
      is
      begin
         return
           QPainterPath_Access
            (QPainterPath_Conversions.To_Pointer
            (Address));
      end To_Pointer;

   ----------------------------
   -- QPainterPathTo_Address --
   ----------------------------

      function To_Address
       (Pointer : QPainterPath_Access)
          return System.Address
      is
      begin
         return
           QPainterPath_Conversions.To_Address
            (QPainterPath_Conversions.Object_Pointer
              (Pointer));
      end To_Address;

   --------------------
   -- Create_Wrapper --
   --------------------

      function Create_Wrapper
       (Item : Internals.QPainterPath_Access)
          return Q_Painter_Path
      is
      begin
         return Q_Painter_Path'
          (Ada.Finalization.Controlled with
             Object  => Item,
             Wrapper => True,
             others  => <>);
      end Create_Wrapper;

   end Internals;

end Qt4.Painter_Paths;
