blob: 52af2e2441d16d90572887131c26c38e705c8588 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
|
<!DOCTYPE html>
<html><head>
<title>CSS Transforms Test: SVG presentation attribute transform-origin, 'bottom left'</title>
<link href="mailto:dschulze@adobe.com" rel="author" title="Dirk Schulze">
<link href="http://www.w3.org/TR/css-transforms-1/#transform-origin-property" rel="help">
<link href="https://drafts.csswg.org/css-transforms-1/#svg-transform" rel="help">
<link href="http://www.w3.org/TR/css-transforms-1/#svg-user-coordinate-space" rel="help">
<link href="reference/svg-origin-relative-length-ref.htm" rel="match">
<meta content="svg" name="flags">
<meta content="The initial point of origin gets translated to 75,225 since 'bottom left' is relative to the bounding box of the object." name="assert">
<style type="text/css">
svg {
width: 200px;
height: 200px;
}
</style>
</head>
<body>
<p>The test passes if there is a vertical fuchsia stripe to the left of an orange stripe. You should see no red.</p>
<svg>
<!-- Fill with Gradient to avoid false positive. -->
<defs>
<linearGradient x2="0%" y2="100%" id="grad">
<stop stop-color="orange" offset="50%"></stop>
<stop stop-color="fuchsia" offset="50%"></stop>
</linearGradient>
</defs>
<rect y="1" width="148" fill="red" x="1" height="148"></rect>
<rect width="150" fill="url(#grad)" y="75" x="75" transform-origin="bottom left" transform="rotate(90deg) translate(-225,75)" height="150"></rect>
</svg>
</body></html>
|