public static void Initialize()
        {
            PrepareTheBody();

            CreateCanvasElement();

            WindowRenderSize = new Rectangle(0, 0, HtmlContext.window.innerWidth, HtmlContext.window.innerHeight);

            _playerImage = new HtmlImageElement();
            _playerImage.src = "res/Square.gif";
            //HtmlContext.document.body.appendChild(_playerImage);

            _characterRenderers = new List<CanvasCharacterRenderer>();

            Resize();
        }
	public  void drawImageFromRect(HtmlImageElement image, double sx, double sy, double sw) {}
	public  void drawImage(HtmlImageElement image, double x, double y, double width, double height) {}
Exemple #4
0
	public  void setDragImage(HtmlImageElement image, int x, int y) {}
Exemple #5
0
 /// <summary>
 /// This is an experimental method, and is likely to be buggy. Please report issues.
 /// Extends the existing sprite sheet by flipping the original frames either horizontally, vertically, or both, and adding appropriate animation & frame data.
 /// </summary>
 /// <param name="spriteSheet">The sprite sheet to use as the source.</param>
 /// <param name="flipData">A generic object that specifies which frames will be flipped,
 /// what to name the flipped result, and how to flip the frames (horizontally, vertically, or both).
 /// Each property name indicates the name of a new sequence to create,
 /// and should reference an array where the first index is the name of the original sequence to flip,
 /// the second index indicates whether to flip it horizontally, the third index indicates whether to flip it vertically,
 /// and the fourth indicates what the "next" value for the resulting frame data should be.
 /// For example, the following would create a new sequence named "walk_left" consisting of the frames from the original "walk_right" sequence flipped horizontally: {walk_left: ["walk_right", true, false]}</param>
 public static void flip(HtmlImageElement spriteSheet, object flipData) { }
Exemple #6
0
 public void texImage2D(int target, int level, HtmlImageElement image, bool flipY)
 {
 }
 public void texImage2D(int target, int level, HtmlImageElement image) { }
Exemple #8
0
 public void drawImage(HtmlImageElement image, double x, double y, double width, double height)
 {
 }
Exemple #9
0
 public void drawImage(HtmlImageElement image, float sx, float sy, float sw, float sh, float dx, float dy, float dw, float dh)
 {
 }
Exemple #10
0
 public void drawImage(HtmlImageElement image, double x, double y)
 {
 }
Exemple #11
0
 public void drawImage(HtmlImageElement image, float dx, float dy)
 {
 }
Exemple #12
0
 public void texSubImage2D(int target, int level, int xoffset, int yoffset, HtmlImageElement image, bool flipY, bool asPremultipliedAlpha)
 {
 }
Exemple #13
0
 public void texSubImage2D(int target, int level, int xoffset, int yoffset, HtmlImageElement image, bool flipY)
 {
 }
	public  void drawImageFromRect(HtmlImageElement image, double sx, double sy, double sw, double sh, double dx, double dy, double dw, double dh, string compositeOperation) {}
Exemple #15
0
 public void drawImageFromRect(HtmlImageElement image)
 {
 }
Exemple #16
0
 public void texSubImage2D(int target, int level, int xoffset, int yoffset, int format, int type, HtmlImageElement image)
 {
 }
Exemple #17
0
 public void drawImageFromRect(HtmlImageElement image, double sx, double sy, double sw)
 {
 }
	public void drawImage(HtmlImageElement image, float dx, float dy) {}
Exemple #19
0
 public void drawImageFromRect(HtmlImageElement image, double sx, double sy, double sw, double sh, double dx, double dy, double dw, double dh)
 {
 }
 public void texSubImage2D(int target, int level, int xoffset, int yoffset, HtmlImageElement image, bool flipY) { }
Exemple #21
0
 public void drawImageFromRect(HtmlImageElement image, double sx, double sy, double sw, double sh, double dx, double dy, double dw, double dh, string compositeOperation)
 {
 }
Exemple #22
0
 /// <summary>
 /// Returns a single frame of the specified sprite sheet as a new PNG image.
 /// </summary>
 /// <param name="spriteSheet">The SpriteSheet instance to extract a frame from.</param>
 /// <param name="frame">The frame number or animation name to extract. If an animation name is specified, only the first frame of the animation will be extracted.</param>
 /// <returns>a single frame of the specified sprite sheet as a new PNG image.</returns>
 public static HtmlImageElement extractFrame(HtmlImageElement spriteSheet, JsNumber frame) { return null; }
Exemple #23
0
 public CanvasPattern createPattern(HtmlImageElement image, string repetitionType)
 {
     return(default(CanvasPattern));
 }
Exemple #24
0
 /// <summary>
 /// Merges the rgb channels of one image with the alpha channel of another.
 /// This can be used to combine a compressed JPEG image containing color data with a PNG32 monochromatic image containing alpha data.
 /// With certain types of images (those with detail that lend itself to JPEG compression) this can provide significant file size savings versus a single RGBA PNG32.
 /// This method is very fast (generally on the order of 1-2 ms to run).
 /// </summary>
 /// <param name="rbgImage">The image (or canvas) containing the RGB channels to use.</param>
 /// <param name="alphaImage">The image (or canvas) containing the alpha channel to use.</param>
 /// <returns>A canvas with the combined image data. This can be used as a source for Bitmap or SpriteSheet.</returns>
 public static HtmlCanvasElement mergeAlpha(HtmlImageElement rbgImage, HtmlImageElement alphaImage) { return null; }
	public  void texImage2D(int target, int level, int internalformat, int format, int type, HtmlImageElement image) {}
	public  void drawImage(HtmlImageElement image, double x, double y) {}
	public  void texSubImage2D(int target, int level, int xoffset, int yoffset, int format, int type, HtmlImageElement image) {}
	public  void drawImageFromRect(HtmlImageElement image) {}
Exemple #29
0
 /// <summary>
 /// Draws a given image onto the Accelerated Canvas App Game Interface.
 /// </summary>
 /// <remarks>
 /// Draws the given image onto the canvas.
 /// <para>Available Platforms:</para>
 /// <list type="bullet">
 /// <item>
 /// <description>Apple iOS</description>
 /// </item>
 /// <item>
 /// <description>Google Android</description>
 /// </item>
 /// <item>
 /// <description>Microsoft Windows 8</description>
 /// </item>
 /// <item>
 /// <description>Microsoft Windows Phone 8</description>
 /// </item>
 /// <item>
 /// <description>Html5 natively</description>
 /// </item>
 /// <item>
 /// <description>XDK emulated mode</description>
 /// </item>
 /// </list>
 /// </remarks>
 /// <example>
 /// See <see cref="drawImage(HtmlImageElement,double,double,double,double,double,double,double,double)"/> example.
 /// </example>
 /// <param name="image">Image to draw</param>
 /// <param name="dx">The x-coordinate to position the image at on the Accelerated Canvas App Game Interface</param>
 /// <param name="dy">The y-coordinate to position the image at on the Accelerated Canvas App Game Interface</param>
 public new void drawImage(HtmlImageElement image, double dx, double dy) { }
	public  void drawImageFromRect(HtmlImageElement image, double sx, double sy, double sw, double sh, double dx, double dy, double dw, double dh) {}
Exemple #31
0
 /// <summary>
 /// Draws a given image onto the Accelerated Canvas App Game Interface.
 /// </summary>
 /// <remarks>
 /// Draws the given image onto the canvas.
 /// <para>Available Platforms:</para>
 /// <list type="bullet">
 /// <item>
 /// <description>Apple iOS</description>
 /// </item>
 /// <item>
 /// <description>Google Android</description>
 /// </item>
 /// <item>
 /// <description>Microsoft Windows 8</description>
 /// </item>
 /// <item>
 /// <description>Microsoft Windows Phone 8</description>
 /// </item>
 /// <item>
 /// <description>Html5 natively</description>
 /// </item>
 /// <item>
 /// <description>XDK emulated mode</description>
 /// </item>
 /// </list>
 /// </remarks>
 /// <example>
 /// <code lang="C#">
 /// public static void DrawSprite(long positionx, long positiony, string imageUrl, long frame)
 /// {
 ///     var ctx = AppMobi.canvas.GetContext2d();
 ///     //draws a particular frame of a 90x100 size sprite
 ///     var imgSprite = new HtmlImageElement();
 ///     imgSprite.addEventListener("load", delegate(DOMEvent evt)
 ///     {
 ///         if (ctx.existsDrawImageTile)
 ///         {
 ///             ctx.DrawImageTile(imgSprite, positionx, positiony, frame, 100, 90, false, false, 1);
 ///         }
 ///         else
 ///         {
 ///             //in the XDK, there is no drawImageTile command
 ///             var sx = frame * 100;
 ///             ctx.drawImage(imgSprite, sx, 0, 100, 90, 100, 300, 100, 90);
 ///         }
 ///         ctx.Present();
 ///     }, false);
 ///     imgSprite.src = imageUrl;
 /// }
 /// </code>
 /// </example>
 /// <param name="image">Image to draw</param>
 /// <param name="sx">This parameter moves the clipping region on the source image to a certain x-coordinate. This is helpful in the animation of sprites.</param>
 /// <param name="sy">This parameter moves the clipping region on the source image to a certain y-coordinate. This is helpful in the animation of sprites.</param>
 /// <param name="sw">This parameter clips the source image to a certain width. This is helpful in the animation of sprites.</param>
 /// <param name="sh">This parameter clips the source image to a certain height. This is helpful in the animation of sprites.</param>
 /// <param name="dx">The x-coordinate to position the image at on the Accelerated Canvas App Game Interface</param>
 /// <param name="dy">The y-coordinate to position the image at on the Accelerated Canvas App Game Interface</param>
 /// <param name="dw">The width to size the image to on the Accelerated Canvas App Game Interface</param>
 /// <param name="dh">The height to size the image to on the Accelerated Canvas App Game Interface</param>
 public new void drawImage(HtmlImageElement image, double sx, double sy, double sw, double sh, double dx, double dy, double dw, double dh) { }
Exemple #32
0
 public void texImage2D(int target, int level, int internalformat, int format, int type, HtmlImageElement image)
 {
 }
Exemple #33
0
 public void DrawImageTile(HtmlImageElement image, double dx, double dy, long t, double dw, double dh, bool flipX, bool flipY, double alpha) { }
Exemple #34
0
 public void setDragImage(HtmlImageElement image, int x, int y)
 {
 }
Exemple #35
0
 /// <summary>
 /// Begins a pattern fill using the specified image. This ends the current subpath.
 /// </summary>
 /// <param name="image">The Image, Canvas, or Video object to use as the pattern.</param>
 /// <returns>The Graphics instance the method is called on (useful for chaining calls.)</returns>
 public Graphics beginBitmapFill(HtmlImageElement image) { return null; }
	public CanvasPattern createPattern(HtmlImageElement image, string repetition) { return default(CanvasPattern); }
Exemple #37
0
 /// <summary>
 /// Begins a pattern fill using the specified image. This ends the current subpath.
 /// </summary>
 /// <param name="image">The Image, Canvas, or Video object to use as the pattern.</param>
 /// <param name="repetition">Optional. Indicates whether to repeat the image in the fill area. One of "repeat", "repeat-x", "repeat-y", or "no-repeat". Defaults to "repeat".</param>
 /// <returns>The Graphics instance the method is called on (useful for chaining calls.)</returns>
 public Graphics beginBitmapStroke(HtmlImageElement image, JsString repetition) { return null; }
	public void drawImage(HtmlImageElement image, float sx, float sy, float sw, float sh, float dx, float dy, float dw, float dh) {}
Exemple #39
0
 /// <summary>
 /// Begins a pattern fill using the specified image. This ends the current subpath.
 /// </summary>
 /// <param name="image">The Image, Canvas, or Video object to use as the pattern.</param>
 /// <returns>The Graphics instance the method is called on (useful for chaining calls.)</returns>
 public Graphics beginBitmapStroke(HtmlImageElement image) { return null; }
 public void texImage2D(int target, int level, HtmlImageElement image, bool flipY) { }
Exemple #41
0
 /// <summary>
 /// Bitmap Constructor
 /// </summary>
 /// <param name="imageOrUri">The source object or URI to an image to display.
 /// This can be either an Image, Canvas, or Video object, or a string URI to an image file to load and use.
 /// If it is a URI, a new Image object will be constructed and assigned to the .image property.</param>
 public Bitmap(HtmlImageElement imageOrUri) { }
 public void texSubImage2D(int target, int level, int xoffset, int yoffset, HtmlImageElement image, bool flipY, bool asPremultipliedAlpha) { }
Exemple #43
0
 public void texImage2D(int target, int level, HtmlImageElement image)
 {
 }