<?xml version="1.0" encoding="UTF-8"?>
<NeoAppBuilderPlugIn>
  <Title>neoCanvas</Title>
  <Author>SinLios</Author>
  <Website>https://visualneo.com</Website>
  <EMail>info@sinlios.com</EMail>
  <Copyright>2022</Copyright>
  <Description>HTML5 Canvas plugin

V: 1.0</Description>
  <CompiledName>C:\Users\sinli\OneDrive\CloudStation\visualneo\VisualNeoWeb\Plugins\neoCanvas\neocanvas.nabp</CompiledName>
  <AutoInstall>yes</AutoInstall>
  <Code>function neoCanvasInitialize(objId){
   var width = document.getElementById(objId).offsetWidth;
   var height = document.getElementById(objId).offsetHeight;
   $("#"+objId).html('&lt;canvas id="'+objId+'Canvas" width="'+width+'" height="'+height+'"&gt;&lt;/canvas&gt;');
}
function neoCanvasDrawImage(objId,objImg,x,y){
  var c = document.getElementById(objId+"Canvas");
  var ctx = c.getContext("2d");
  var img = document.getElementById(objImg);
  ctx.drawImage(img, x, y);
}
function neoCanvasDrawImageTile(objId,objImg,sx,sy,swidth,sheight,x,y,dwidth,dheight){
  var c = document.getElementById(objId+"Canvas");
  var ctx = c.getContext("2d");
  var img = document.getElementById(objImg);
  ctx.drawImage(img,sx,sy,swidth,sheight,x,y,dwidth,dheight);
}</Code>
  <Files/>
  <ActionList>
    <Action Name="neoCanvasInitialize">
      <Hint>Initializes neoCanvas</Hint>
      <Params>objId|OBJID|Select a Container object</Params>
      <Template>neoCanvasInitialize(objId);</Template>
    </Action>
    <Action Name="neoCanvasDrawImage">
      <Hint>Copy an image into the canvas at the desired position</Hint>
      <Params>objId|OBJID|Select a Container object;objImg|OBJID|Select an image object;x|INTEGER|x coordinate where to place the image on the canvas;y|INTEGER|y coordinate where to place the image on the canvas</Params>
      <Template>neoCanvasDrawImage(objId,objImg,x,y);</Template>
    </Action>
    <Action Name="neoCanvasDrawImageTile">
      <Hint>Copy an image tile into the canvas at the desired position</Hint>
      <Params>objId|OBJID|Select a Container object;objImg|OBJID|Select an image object;sx|INTEGER|x coordinate where to start clipping;sy|INTEGER|y coordinate where to start clipping;swidth|INTEGER|Width of the clipped image;sheight|INTEGER|Height of the clipped image;x|INTEGER|x coordinate where to place the image on the canvas;y|INTEGER|y coordinate where to place the image on the canvas;dwidth|STRING|Width of the image to use (stretch or reduce the image);dheight|STRING|Height of the image to use (stretch or reduce the image)</Params>
      <Template>neoCanvasDrawImageTile(objId,objImg,sx,sy,swidth,sheight,x,y,dwidth,dheight);</Template>
    </Action>
  </ActionList>
</NeoAppBuilderPlugIn>
