mirror of
https://github.com/servo/servo.git
synced 2025-08-11 00:15:32 +01:00
Implements drawImage for html image as ImageSource
This commit is contained in:
parent
184d214e26
commit
88954e3e18
86 changed files with 1380 additions and 251 deletions
35
tests/ref/2dcontext/drawimage_html_image_8_ref.html
Normal file
35
tests/ref/2dcontext/drawimage_html_image_8_ref.html
Normal file
|
@ -0,0 +1,35 @@
|
|||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
</head>
|
||||
<style>
|
||||
html, body {
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
#destination {
|
||||
width: 100px;
|
||||
height: 100px;
|
||||
background-color: red;
|
||||
}
|
||||
|
||||
#img {
|
||||
position: relative;
|
||||
top: 0px;
|
||||
left: 0px;
|
||||
width: 32px;
|
||||
height: 32px;
|
||||
background-image: url("../2x2.png");
|
||||
background-position: -32px -32px;
|
||||
background-size: 64px 64px;
|
||||
background-repeat: no-repeat;
|
||||
}
|
||||
|
||||
</style>
|
||||
<body>
|
||||
<div id="destination">
|
||||
<div id="img"><div>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
Loading…
Add table
Add a link
Reference in a new issue