public void BeginRender(float width, float height) { _canvas = (HtmlCanvasElement) document.createElement("canvas"); _canvas.width = (int) width; _canvas.height = (int) height; _canvas.style.width = width + "px"; _canvas.style.height = height + "px"; _context = (CanvasRenderingContext2D)_canvas.getContext("2d"); _context.textBaseline = "top"; }
public void drawImage(HtmlCanvasElement image, float sx, float sy, float sw, float sh, float dx, float dy, float dw, float dh) {}
public CanvasPattern createPattern(HtmlCanvasElement image, string repetition) { return default(CanvasPattern); }
public void texSubImage2D(int target, int level, int xoffset, int yoffset, int format, int type, HtmlCanvasElement canvas) { }
public CanvasPattern createPattern(HtmlCanvasElement canvas, string repetitionType) { return default(CanvasPattern); }
public void drawImage(HtmlCanvasElement canvas, double x, double y, double width, double height) {}
public object EndRender() { var result = _canvas; _canvas = null; return result; }
/// <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> /// <param name="canvas">Optional. If specified, this canvas will be used and returned. If not, a new canvas will be created.</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, HtmlCanvasElement canvas) { return null; }
public void drawImage(HtmlCanvasElement canvas, double x, double y) { }
public CanvasPattern createPattern(HtmlCanvasElement image, string repetition) { return(default(CanvasPattern)); }
public void drawImage(HtmlCanvasElement image, float sx, float sy, float sw, float sh, float dx, float dy, float dw, float dh) { }
public void drawImage(HtmlCanvasElement image, float dx, float dy) { }
public void texSubImage2D(int target, int level, int xoffset, int yoffset, HtmlCanvasElement canvas, bool flipY, bool asPremultipliedAlpha) { }
public void texSubImage2D(int target, int level, int xoffset, int yoffset, HtmlCanvasElement canvas, bool flipY) { }
public void texImage2D(int target, int level, HtmlCanvasElement canvas, bool flipY) { }
public void drawImage(HtmlCanvasElement canvas, double x, double y, double width, double height) { }
public Stage(HtmlCanvasElement canvas) { }
public void drawImage(HtmlCanvasElement canvas, double sx, double sy, double sw, double sh, double dx, double dy, double dw, double dh) { }
public void drawImage(HtmlCanvasElement canvas, double x, double y) {}
public CanvasPattern createPattern(HtmlCanvasElement canvas, string repetitionType) { return(default(CanvasPattern)); }
public void drawImage(HtmlCanvasElement canvas, double sx, double sy, double sw, double sh, double dx, double dy, double dw, double dh) {}
public void texImage2D(int target, int level, int internalformat, int format, int type, HtmlCanvasElement canvas) {}
public void texImage2D(int target, int level, int internalformat, int format, int type, HtmlCanvasElement canvas) { }
public void texSubImage2D(int target, int level, int xoffset, int yoffset, int format, int type, HtmlCanvasElement canvas) {}
private static void CreateCanvasElement() { var canvas = new HtmlCanvasElement { id = "canvas2D" }; canvas.style.width = new JsString("100%"); canvas.style.height = new JsString("100%"); HtmlContext.document.body.appendChild(canvas); _canvasRenderingContext2D = canvas.As<HtmlCanvasElement>().getContext("2d").As<CanvasRenderingContext2D>(); }
/// <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="canvas">Canvas 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> /// <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(HtmlCanvasElement canvas, double dx, double dy, double dw, double dh) { }
public void drawImage(HtmlCanvasElement image, float dx, float dy) {}
/// <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(HtmlCanvasElement image, JsString repetition) { return null; }
/// <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(HtmlCanvasElement image) { return null; }
/// <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(HtmlCanvasElement imageOrUri) { }