------------------------------------------------------------------------------
--                                                                          --
--                An Ada2005 binding to the Qt C++ framework                --
--                                                                          --
------------------------------------------------------------------------------
--                                                                          --
-- Copyright © 2007-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.     --
------------------------------------------------------------------------------
private with Ada.Finalization;
with Qt4.Line_Fs;
with Qt4.Lines;
with Qt4.Matrices;
--  with Qt4.Painter_Paths;
with Qt4.Point_Fs;
with Qt4.Points;
with Qt4.Polygon_Fs;
with Qt4.Polygons;
with Qt4.Rect_Fs;
with Qt4.Rects;
with Qt4.Regions;
private with Qt_Ada.Internals.Value_Class_Sizes;
with System;

package Qt4.Transforms is

   type Q_Transform is tagged private;

   function Create
    (H_11 : Qt4.Q_Real;
     H_12 : Qt4.Q_Real;
     H_13 : Qt4.Q_Real;
     H_21 : Qt4.Q_Real;
     H_22 : Qt4.Q_Real;
     H_23 : Qt4.Q_Real;
     H_31 : Qt4.Q_Real;
     H_32 : Qt4.Q_Real;
     H_33 : Qt4.Q_Real)
       return Q_Transform;

   function Create
    (H_11 : Qt4.Q_Real;
     H_12 : Qt4.Q_Real;
     H_21 : Qt4.Q_Real;
     H_22 : Qt4.Q_Real;
     Dx : Qt4.Q_Real;
     Dy : Qt4.Q_Real)
       return Q_Transform;

   function Create
    (Tx : Qt4.Matrices.Q_Matrix'Class)
       return Q_Transform;

   function M_11
    (Self : Q_Transform'Class)
       return Qt4.Q_Real;

   function M_12
    (Self : Q_Transform'Class)
       return Qt4.Q_Real;

   function M_13
    (Self : Q_Transform'Class)
       return Qt4.Q_Real;

   function M_21
    (Self : Q_Transform'Class)
       return Qt4.Q_Real;

   function M_22
    (Self : Q_Transform'Class)
       return Qt4.Q_Real;

   function M_23
    (Self : Q_Transform'Class)
       return Qt4.Q_Real;

   function M_31
    (Self : Q_Transform'Class)
       return Qt4.Q_Real;

   function M_32
    (Self : Q_Transform'Class)
       return Qt4.Q_Real;

   function M_33
    (Self : Q_Transform'Class)
       return Qt4.Q_Real;

   function Adjoint
    (Self : Q_Transform'Class)
       return Q_Transform;

   function Det
    (Self : Q_Transform'Class)
       return Qt4.Q_Real;

   function Determinant
    (Self : Q_Transform'Class)
       return Qt4.Q_Real;

   function Dx
    (Self : Q_Transform'Class)
       return Qt4.Q_Real;

   function Dy
    (Self : Q_Transform'Class)
       return Qt4.Q_Real;

   function Inverted
    (Self : Q_Transform'Class)
       return Q_Transform;

   function Is_Affine
    (Self : Q_Transform'Class)
       return Boolean;

   function Is_Identity
    (Self : Q_Transform'Class)
       return Boolean;

   function Is_Invertible
    (Self : Q_Transform'Class)
       return Boolean;

   function Is_Rotating
    (Self : Q_Transform'Class)
       return Boolean;

   function Is_Scaling
    (Self : Q_Transform'Class)
       return Boolean;

   function Is_Translating
    (Self : Q_Transform'Class)
       return Boolean;

   procedure Map
    (Self : Q_Transform'Class;
     X : Qt4.Q_Real;
     Y : Qt4.Q_Real;
     Tx : out Qt4.Q_Real;
     Ty : out Qt4.Q_Real);

   procedure Map
    (Self : Q_Transform'Class;
     X : Qt4.Q_Integer;
     Y : Qt4.Q_Integer;
     Tx : out Qt4.Q_Integer;
     Ty : out Qt4.Q_Integer);

   function Map
    (Self : Q_Transform'Class;
     P : Qt4.Points.Q_Point'Class)
       return Qt4.Points.Q_Point;

   function Map
    (Self : Q_Transform'Class;
     P : Qt4.Point_Fs.Q_Point_F'Class)
       return Qt4.Point_Fs.Q_Point_F;

   function Map
    (Self : Q_Transform'Class;
     P : Qt4.Lines.Q_Line'Class)
       return Qt4.Lines.Q_Line;

   function Map
    (Self : Q_Transform'Class;
     P : Qt4.Line_Fs.Q_Line_F'Class)
       return Qt4.Line_Fs.Q_Line_F;

   function Map
    (Self : Q_Transform'Class;
     P : Qt4.Polygons.Q_Polygon'Class)
       return Qt4.Polygons.Q_Polygon;

   function Map
    (Self : Q_Transform'Class;
     P : Qt4.Polygon_Fs.Q_Polygon_F'Class)
       return Qt4.Polygon_Fs.Q_Polygon_F;

   function Map
    (Self : Q_Transform'Class;
     P : Qt4.Regions.Q_Region'Class)
       return Qt4.Regions.Q_Region;

--   function Map
--    (Self : Q_Transform'Class;
--     P : Qt4.Painter_Paths.Q_Painter_Path'Class)
--       return Qt4.Painter_Paths.Q_Painter_Path;

   function Map_Rect
    (Self : Q_Transform'Class;
     P : Qt4.Rects.Q_Rect'Class)
       return Qt4.Rects.Q_Rect;

   function Map_Rect
    (Self : Q_Transform'Class;
     P : Qt4.Rect_Fs.Q_Rect_F'Class)
       return Qt4.Rect_Fs.Q_Rect_F;

   function Map_To_Polygon
    (Self : Q_Transform'Class;
     P : Qt4.Rects.Q_Rect'Class)
       return Qt4.Polygons.Q_Polygon;

   procedure Reset
    (Self : in out Q_Transform'Class);

   procedure Rotate
    (Self : in out Q_Transform'Class;
     A : Qt4.Q_Real;
     Axis : Qt4.Axis
       := Z_Axis);

   procedure Rotate_Radians
    (Self : in out Q_Transform'Class;
     A : Qt4.Q_Real;
     Axis : Qt4.Axis
       := Z_Axis);

   procedure Scale
    (Self : in out Q_Transform'Class;
     Sx : Qt4.Q_Real;
     Sy : Qt4.Q_Real);

   procedure Set_Matrix
    (Self : in out Q_Transform'Class;
     M_11 : Qt4.Q_Real;
     M_12 : Qt4.Q_Real;
     M_13 : Qt4.Q_Real;
     M_21 : Qt4.Q_Real;
     M_22 : Qt4.Q_Real;
     M_23 : Qt4.Q_Real;
     M_31 : Qt4.Q_Real;
     M_32 : Qt4.Q_Real;
     M_33 : Qt4.Q_Real);

   procedure Shear
    (Self : in out Q_Transform'Class;
     Sh : Qt4.Q_Real;
     Sv : Qt4.Q_Real);

   function To_Affine
    (Self : Q_Transform'Class)
       return Qt4.Matrices.Q_Matrix;

   procedure Translate
    (Self : in out Q_Transform'Class;
     Dx : Qt4.Q_Real;
     Dy : Qt4.Q_Real);

   function Transposed
    (Self : Q_Transform'Class)
       return Q_Transform;

   function "="
    (Self : Q_Transform;
     Matrix : Q_Transform)
       return Boolean;

   function "*"
    (Self : Q_Transform;
     O : Q_Transform)
       return Q_Transform;

   function "*"
    (P : Qt4.Points.Q_Point'Class;
     M : Q_Transform)
       return Qt4.Points.Q_Point;

   function "*"
    (P : Qt4.Point_Fs.Q_Point_F'Class;
     M : Q_Transform)
       return Qt4.Point_Fs.Q_Point_F;

   function "*"
    (P : Qt4.Lines.Q_Line'Class;
     M : Q_Transform)
       return Qt4.Lines.Q_Line;

   function "*"
    (P : Qt4.Line_Fs.Q_Line_F'Class;
     M : Q_Transform)
       return Qt4.Line_Fs.Q_Line_F;

   function "*"
    (P : Qt4.Polygons.Q_Polygon'Class;
     M : Q_Transform)
       return Qt4.Polygons.Q_Polygon;

   function "*"
    (P : Qt4.Polygon_Fs.Q_Polygon_F'Class;
     M : Q_Transform)
       return Qt4.Polygon_Fs.Q_Polygon_F;

   function "*"
    (P : Qt4.Regions.Q_Region'Class;
     M : Q_Transform)
       return Qt4.Regions.Q_Region;

--   function "*"
--    (P : Qt4.Painter_Paths.Q_Painter_Path'Class;
--     M : Q_Transform)
--       return Qt4.Painter_Paths.Q_Painter_Path;

   function "*"
    (A : Q_Transform;
     N : Qt4.Q_Real)
       return Q_Transform;

   function "/"
    (A : Q_Transform;
     N : Qt4.Q_Real)
       return Q_Transform;

   function "+"
    (A : Q_Transform;
     N : Qt4.Q_Real)
       return Q_Transform;

   function "-"
    (A : Q_Transform;
     N : Qt4.Q_Real)
       return Q_Transform;

   package Internals is

      type QTransform is private;

      type QTransform_Access is access all QTransform;
      pragma Convention (C, QTransform_Access);

      function QTransform_View
       (Item : Q_Transform'Class)
          return QTransform_Access;
      pragma Inline (QTransform_View);

      function To_Pointer
       (Address : System.Address)
          return QTransform_Access;
      pragma Inline (To_Pointer);

      function To_Address
       (Pointer : QTransform_Access)
          return System.Address;
      pragma Inline (To_Address);

      function Create_Wrapper
       (Item : Internals.QTransform_Access)
          return Q_Transform;

   private

      type QTransform is record
         Placeholder : Interfaces.C.char_array (1 .. Qt_Ada.Internals.Value_Class_Sizes.QTransform_C_Size_Of);
      end record;
      pragma Convention (C, QTransform);

   end Internals;

private

   type Q_Transform is new Ada.Finalization.Controlled with record
      Storage : aliased Internals.QTransform;
      Object  : Internals.QTransform_Access := null;
      Wrapper : Boolean := False;
   end record;

   overriding
   procedure Adjust (Self : in out Q_Transform);

   overriding
   procedure Finalize (Self : in out Q_Transform);

   overriding
   procedure Initialize (Self : in out Q_Transform);

end Qt4.Transforms;
