with GNATCOM.Dispinterface;

package MSHTML.ICanvasRenderingContext2D_Interface is

   type ICanvasRenderingContext2D_Type is
     new GNATCOM.Dispinterface.Dispinterface_Type with null record;

   procedure Initialize (This : in out ICanvasRenderingContext2D_Type);

   function Pointer (This : ICanvasRenderingContext2D_Type)
     return Pointer_To_ICanvasRenderingContext2D;

   procedure Attach (This    : in out ICanvasRenderingContext2D_Type;
                     Pointer : in     Pointer_To_ICanvasRenderingContext2D);

   function Get_canvas
     (This : ICanvasRenderingContext2D_Type)
     return Pointer_To_IHTMLCanvasElement;

   procedure restore
     (This : ICanvasRenderingContext2D_Type);

   procedure save
     (This : ICanvasRenderingContext2D_Type);

   procedure rotate
     (This  : ICanvasRenderingContext2D_Type;
      angle : Interfaces.C.C_float);

   procedure scale
     (This : ICanvasRenderingContext2D_Type;
      x    : Interfaces.C.C_float;
      y    : Interfaces.C.C_float);

   procedure setTransform
     (This : ICanvasRenderingContext2D_Type;
      m11  : Interfaces.C.C_float;
      m12  : Interfaces.C.C_float;
      m21  : Interfaces.C.C_float;
      m22  : Interfaces.C.C_float;
      dx   : Interfaces.C.C_float;
      dy   : Interfaces.C.C_float);

   procedure transform
     (This : ICanvasRenderingContext2D_Type;
      m11  : Interfaces.C.C_float;
      m12  : Interfaces.C.C_float;
      m21  : Interfaces.C.C_float;
      m22  : Interfaces.C.C_float;
      dx   : Interfaces.C.C_float;
      dy   : Interfaces.C.C_float);

   procedure translate
     (This : ICanvasRenderingContext2D_Type;
      x    : Interfaces.C.C_float;
      y    : Interfaces.C.C_float);

   procedure Put_globalAlpha
     (This : ICanvasRenderingContext2D_Type;
      p    : Interfaces.C.C_float);

   function Get_globalAlpha
     (This : ICanvasRenderingContext2D_Type)
     return Interfaces.C.C_float;

   procedure Put_globalCompositeOperation
     (This : ICanvasRenderingContext2D_Type;
      p    : GNATCOM.Types.BSTR;
      Free : Boolean := True);

   function Get_globalCompositeOperation
     (This : ICanvasRenderingContext2D_Type)
     return GNATCOM.Types.BSTR;

   procedure Put_fillStyle
     (This : ICanvasRenderingContext2D_Type;
      p    : GNATCOM.Types.VARIANT;
      Free : Boolean := True);

   function Get_fillStyle
     (This : ICanvasRenderingContext2D_Type)
     return GNATCOM.Types.VARIANT;

   procedure Put_strokeStyle
     (This : ICanvasRenderingContext2D_Type;
      p    : GNATCOM.Types.VARIANT;
      Free : Boolean := True);

   function Get_strokeStyle
     (This : ICanvasRenderingContext2D_Type)
     return GNATCOM.Types.VARIANT;

   function createLinearGradient
     (This             : ICanvasRenderingContext2D_Type;
      x0               : Interfaces.C.C_float;
      y0               : Interfaces.C.C_float;
      x1               : Interfaces.C.C_float;
      y1               : Interfaces.C.C_float)
     return Pointer_To_ICanvasGradient;

   function createRadialGradient
     (This             : ICanvasRenderingContext2D_Type;
      x0               : Interfaces.C.C_float;
      y0               : Interfaces.C.C_float;
      r0               : Interfaces.C.C_float;
      x1               : Interfaces.C.C_float;
      y1               : Interfaces.C.C_float;
      r1               : Interfaces.C.C_float)
     return Pointer_To_ICanvasGradient;

   function createPattern
     (This            : ICanvasRenderingContext2D_Type;
      Image           : GNATCOM.Types.Pointer_To_IDispatch;
      repetition      : GNATCOM.Types.VARIANT;
      Free            : Boolean := True)
     return Pointer_To_ICanvasPattern;

   procedure Put_lineCap
     (This : ICanvasRenderingContext2D_Type;
      p    : GNATCOM.Types.BSTR;
      Free : Boolean := True);

   function Get_lineCap
     (This : ICanvasRenderingContext2D_Type)
     return GNATCOM.Types.BSTR;

   procedure Put_lineJoin
     (This : ICanvasRenderingContext2D_Type;
      p    : GNATCOM.Types.BSTR;
      Free : Boolean := True);

   function Get_lineJoin
     (This : ICanvasRenderingContext2D_Type)
     return GNATCOM.Types.BSTR;

   procedure Put_lineWidth
     (This : ICanvasRenderingContext2D_Type;
      p    : Interfaces.C.C_float);

   function Get_lineWidth
     (This : ICanvasRenderingContext2D_Type)
     return Interfaces.C.C_float;

   procedure Put_miterLimit
     (This : ICanvasRenderingContext2D_Type;
      p    : Interfaces.C.C_float);

   function Get_miterLimit
     (This : ICanvasRenderingContext2D_Type)
     return Interfaces.C.C_float;

   procedure Put_shadowBlur
     (This : ICanvasRenderingContext2D_Type;
      p    : Interfaces.C.C_float);

   function Get_shadowBlur
     (This : ICanvasRenderingContext2D_Type)
     return Interfaces.C.C_float;

   procedure Put_shadowColor
     (This : ICanvasRenderingContext2D_Type;
      p    : GNATCOM.Types.BSTR;
      Free : Boolean := True);

   function Get_shadowColor
     (This : ICanvasRenderingContext2D_Type)
     return GNATCOM.Types.BSTR;

   procedure Put_shadowOffsetX
     (This : ICanvasRenderingContext2D_Type;
      p    : Interfaces.C.C_float);

   function Get_shadowOffsetX
     (This : ICanvasRenderingContext2D_Type)
     return Interfaces.C.C_float;

   procedure Put_shadowOffsetY
     (This : ICanvasRenderingContext2D_Type;
      p    : Interfaces.C.C_float);

   function Get_shadowOffsetY
     (This : ICanvasRenderingContext2D_Type)
     return Interfaces.C.C_float;

   procedure clearRect
     (This : ICanvasRenderingContext2D_Type;
      x    : Interfaces.C.C_float;
      y    : Interfaces.C.C_float;
      w    : Interfaces.C.C_float;
      h    : Interfaces.C.C_float);

   procedure fillRect
     (This : ICanvasRenderingContext2D_Type;
      x    : Interfaces.C.C_float;
      y    : Interfaces.C.C_float;
      w    : Interfaces.C.C_float;
      h    : Interfaces.C.C_float);

   procedure strokeRect
     (This : ICanvasRenderingContext2D_Type;
      x    : Interfaces.C.C_float;
      y    : Interfaces.C.C_float;
      w    : Interfaces.C.C_float;
      h    : Interfaces.C.C_float);

   procedure arc
     (This          : ICanvasRenderingContext2D_Type;
      x             : Interfaces.C.C_float;
      y             : Interfaces.C.C_float;
      radius        : Interfaces.C.C_float;
      startAngle    : Interfaces.C.C_float;
      endAngle      : Interfaces.C.C_float;
      anticlockwise : Interfaces.C.long);

   procedure arcTo
     (This   : ICanvasRenderingContext2D_Type;
      x1     : Interfaces.C.C_float;
      y1     : Interfaces.C.C_float;
      x2     : Interfaces.C.C_float;
      y2     : Interfaces.C.C_float;
      radius : Interfaces.C.C_float);

   procedure beginPath
     (This : ICanvasRenderingContext2D_Type);

   procedure bezierCurveTo
     (This : ICanvasRenderingContext2D_Type;
      cp1x : Interfaces.C.C_float;
      cp1y : Interfaces.C.C_float;
      cp2x : Interfaces.C.C_float;
      cp2y : Interfaces.C.C_float;
      x    : Interfaces.C.C_float;
      y    : Interfaces.C.C_float);

   procedure clip
     (This : ICanvasRenderingContext2D_Type);

   procedure closePath
     (This : ICanvasRenderingContext2D_Type);

   procedure fill
     (This : ICanvasRenderingContext2D_Type);

   procedure lineTo
     (This : ICanvasRenderingContext2D_Type;
      x    : Interfaces.C.C_float;
      y    : Interfaces.C.C_float);

   procedure moveTo
     (This : ICanvasRenderingContext2D_Type;
      x    : Interfaces.C.C_float;
      y    : Interfaces.C.C_float);

   procedure quadraticCurveTo
     (This : ICanvasRenderingContext2D_Type;
      cpx  : Interfaces.C.C_float;
      cpy  : Interfaces.C.C_float;
      x    : Interfaces.C.C_float;
      y    : Interfaces.C.C_float);

   procedure rect
     (This : ICanvasRenderingContext2D_Type;
      x    : Interfaces.C.C_float;
      y    : Interfaces.C.C_float;
      w    : Interfaces.C.C_float;
      h    : Interfaces.C.C_float);

   procedure stroke
     (This : ICanvasRenderingContext2D_Type);

   function isPointInPath
     (This    : ICanvasRenderingContext2D_Type;
      x       : Interfaces.C.C_float;
      y       : Interfaces.C.C_float)
     return GNATCOM.Types.VARIANT_BOOL;

   procedure Put_font
     (This : ICanvasRenderingContext2D_Type;
      p    : GNATCOM.Types.BSTR;
      Free : Boolean := True);

   function Get_font
     (This : ICanvasRenderingContext2D_Type)
     return GNATCOM.Types.BSTR;

   procedure Put_textAlign
     (This : ICanvasRenderingContext2D_Type;
      p    : GNATCOM.Types.BSTR;
      Free : Boolean := True);

   function Get_textAlign
     (This : ICanvasRenderingContext2D_Type)
     return GNATCOM.Types.BSTR;

   procedure Put_textBaseline
     (This : ICanvasRenderingContext2D_Type;
      p    : GNATCOM.Types.BSTR;
      Free : Boolean := True);

   function Get_textBaseline
     (This : ICanvasRenderingContext2D_Type)
     return GNATCOM.Types.BSTR;

   procedure fillText
     (This     : ICanvasRenderingContext2D_Type;
      text     : GNATCOM.Types.BSTR;
      x        : Interfaces.C.C_float;
      y        : Interfaces.C.C_float;
      maxWidth : GNATCOM.Types.VARIANT;
      Free     : Boolean := True);

   function measureText
     (This                : ICanvasRenderingContext2D_Type;
      text                : GNATCOM.Types.BSTR;
      Free                : Boolean := True)
     return Pointer_To_ICanvasTextMetrics;

   procedure strokeText
     (This     : ICanvasRenderingContext2D_Type;
      text     : GNATCOM.Types.BSTR;
      x        : Interfaces.C.C_float;
      y        : Interfaces.C.C_float;
      maxWidth : GNATCOM.Types.VARIANT;
      Free     : Boolean := True);

   procedure drawImage
     (This : ICanvasRenderingContext2D_Type;
      pSrc : GNATCOM.Types.Pointer_To_IDispatch;
      a1   : GNATCOM.Types.VARIANT;
      a2   : GNATCOM.Types.VARIANT;
      a3   : GNATCOM.Types.VARIANT;
      a4   : GNATCOM.Types.VARIANT;
      a5   : GNATCOM.Types.VARIANT;
      a6   : GNATCOM.Types.VARIANT;
      a7   : GNATCOM.Types.VARIANT;
      a8   : GNATCOM.Types.VARIANT;
      Free : Boolean := True);

   function createImageData
     (This              : ICanvasRenderingContext2D_Type;
      a1                : GNATCOM.Types.VARIANT;
      a2                : GNATCOM.Types.VARIANT;
      Free              : Boolean := True)
     return Pointer_To_ICanvasImageData;

   function getImageData
     (This              : ICanvasRenderingContext2D_Type;
      sx                : Interfaces.C.C_float;
      sy                : Interfaces.C.C_float;
      sw                : Interfaces.C.C_float;
      sh                : Interfaces.C.C_float)
     return Pointer_To_ICanvasImageData;

   procedure putImageData
     (This        : ICanvasRenderingContext2D_Type;
      imagedata   : Pointer_To_ICanvasImageData;
      dx          : Interfaces.C.C_float;
      dy          : Interfaces.C.C_float;
      dirtyX      : GNATCOM.Types.VARIANT;
      dirtyY      : GNATCOM.Types.VARIANT;
      dirtyWidth  : GNATCOM.Types.VARIANT;
      dirtyHeight : GNATCOM.Types.VARIANT;
      Free        : Boolean := True);

end MSHTML.ICanvasRenderingContext2D_Interface;

