with GNATCOM.IInterface;

with GNATCOM.Errors;

package body MSHTML.ISVGLocatable_Interface is

   procedure Initialize (This : in out ISVGLocatable_Type) is
   begin
      Set_IID (This, IID_ISVGLocatable);
   end Initialize;

   function Pointer (This : ISVGLocatable_Type)
     return Pointer_To_ISVGLocatable
   is
   begin
      return To_Pointer_To_ISVGLocatable (Address (This));
   end Pointer;

   procedure Attach (This    : in out ISVGLocatable_Type;
                     Pointer : in     Pointer_To_ISVGLocatable)
   is
   begin
      Attach (This, GNATCOM.IInterface.To_Pointer_To_IUnknown
              (Pointer.all'Address));
   end Attach;

   function Get_nearestViewportElement
     (This : ISVGLocatable_Type)
     return Pointer_To_ISVGElement
   is
       RetVal : aliased Pointer_To_ISVGElement;
   begin
      GNATCOM.Errors.Error_Check
        (Pointer (This).Vtbl.Get_nearestViewportElement
         (Pointer (This),
          RetVal'Unchecked_Access));

      return RetVal;
   end Get_nearestViewportElement;

   function Get_farthestViewportElement
     (This : ISVGLocatable_Type)
     return Pointer_To_ISVGElement
   is
       RetVal : aliased Pointer_To_ISVGElement;
   begin
      GNATCOM.Errors.Error_Check
        (Pointer (This).Vtbl.Get_farthestViewportElement
         (Pointer (This),
          RetVal'Unchecked_Access));

      return RetVal;
   end Get_farthestViewportElement;

   function getBBox
     (This     : ISVGLocatable_Type)
     return Pointer_To_ISVGRect
   is
       RetVal : aliased Pointer_To_ISVGRect;
   begin
      GNATCOM.Errors.Error_Check
        (Pointer (This).Vtbl.getBBox
         (Pointer (This),
          RetVal'Unchecked_Access));

      return RetVal;
   end getBBox;

   function getCTM
     (This     : ISVGLocatable_Type)
     return Pointer_To_ISVGMatrix
   is
       RetVal : aliased Pointer_To_ISVGMatrix;
   begin
      GNATCOM.Errors.Error_Check
        (Pointer (This).Vtbl.getCTM
         (Pointer (This),
          RetVal'Unchecked_Access));

      return RetVal;
   end getCTM;

   function getScreenCTM
     (This     : ISVGLocatable_Type)
     return Pointer_To_ISVGMatrix
   is
       RetVal : aliased Pointer_To_ISVGMatrix;
   begin
      GNATCOM.Errors.Error_Check
        (Pointer (This).Vtbl.getScreenCTM
         (Pointer (This),
          RetVal'Unchecked_Access));

      return RetVal;
   end getScreenCTM;

   function getTransformToElement
     (This     : ISVGLocatable_Type;
      pElement : Pointer_To_ISVGElement)
     return Pointer_To_ISVGMatrix
   is
       RetVal : aliased Pointer_To_ISVGMatrix;
   begin
      GNATCOM.Errors.Error_Check
        (Pointer (This).Vtbl.getTransformToElement
         (Pointer (This),
          pElement,
          RetVal'Unchecked_Access));

      return RetVal;
   end getTransformToElement;

end MSHTML.ISVGLocatable_Interface;

