mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-09-09 01:08:39 +09:00
moebius#106: SVG - CanvasImageSource - allow using an SVGImageElement as a CanvasImageSource
This commit is contained in:
parent
55b7eeecbf
commit
b50357b7ae
6 changed files with 38 additions and 11 deletions
|
|
@ -39138,6 +39138,18 @@
|
|||
"url": "/2dcontext/drawing-images-to-the-canvas/drawimage_html_image_9.html"
|
||||
}
|
||||
],
|
||||
"2dcontext/drawing-images-to-the-canvas/drawimage_svg_image_1.html": [
|
||||
{
|
||||
"path": "2dcontext/drawing-images-to-the-canvas/drawimage_svg_image_1.html",
|
||||
"references": [
|
||||
[
|
||||
"/2dcontext/drawing-images-to-the-canvas/drawimage_svg_image_1_ref.html",
|
||||
"=="
|
||||
]
|
||||
],
|
||||
"url": "/2dcontext/drawing-images-to-the-canvas/drawimage_svg_image_1.html"
|
||||
}
|
||||
],
|
||||
"2dcontext/line-styles/canvas_linestyles_linecap_001.htm": [
|
||||
{
|
||||
"path": "2dcontext/line-styles/canvas_linestyles_linecap_001.htm",
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
<!DOCTYPE html>
|
||||
<meta charset="utf-8">
|
||||
<link rel=match href=drawimage_html_image_1_ref.html>
|
||||
<link rel=match href=drawimage_svg_image_1_ref.html>
|
||||
<style>
|
||||
html, body {
|
||||
margin: 0;
|
||||
|
|
@ -13,8 +13,8 @@ var sourceWidth = 100;
|
|||
var sourceHeight = 100;
|
||||
var smoothingEnabled = false;
|
||||
var destCanvas = document.getElementById('dest');
|
||||
var sourceImg = document.createElement('img');
|
||||
sourceImg.src = '../2x2.png'
|
||||
var sourceImg = document.createElementNS('http://www.w3.org/2000/svg', 'image');
|
||||
sourceImg.setAttributeNS('http://www.w3.org/1999/xlink', 'href', '../2x2.png');
|
||||
sourceImg.width = sourceWidth;
|
||||
sourceImg.height = sourceHeight;
|
||||
|
||||
Loading…
Add table
Add a link
Reference in a new issue