Closed Bug 786612 Opened 12 years ago Closed 12 years ago

SVG Pattern rotate

Categories

(Firefox :: Untriaged, defect)

14 Branch
x86
Windows XP
defect
Not set
normal

Tracking

()

RESOLVED DUPLICATE of bug 780880

People

(Reporter: artem, Unassigned)

Details

User Agent: Mozilla/5.0 (Windows NT 5.1; rv:14.0) Gecko/20100101 Firefox/14.0.1
Build ID: 20120713134347

Steps to reproduce:

var ptnH = svg.pattern(defs, patternNameH, 0, 0, 1200, 2700, 0, 0, 1200, 2700, {patternUnits: 'userSpaceOnUse', patternTransform: "translate(0,0) rotate(90)"}); 
var imgH = svg.image(ptn, 0, 0, 1200, 2700,   imageFileName); 			






Actual results:

I'm use image in pattern. If i rotate pattern - patternTransform: "translate(0,0) rotate(90)" -   no  image, but some solid color fill.



Expected results:

Image must be drawn rotated 90 degree
Thanks for the report. Could you attach a minimal testcase (.svg file e.g.) to test, please.
Status: UNCONFIRMED → RESOLVED
Closed: 12 years ago
Resolution: --- → DUPLICATE
(In reply to Loic from comment #1)
> Thanks for the report. Could you attach a minimal testcase (.svg file e.g.)
> to test, please.


Test page here: 
http://test3.w510.com.ua/svgbug.html
used image:
http://test3.w510.com.ua/svgtest.jpg


CODE:

<html>
<head>
<meta charset="utf-8">
<title>SVG pattern with rotate</title>
</head>
<body>

<h1>IMAGE used in patthern</h1>

<img src='svgtest.jpg'>


<h1>Draw Rectangles with pattern from image </h1>
<p>Left Rectangle with fill from simple pattern with image
<br>Right Rectangle fill with pattern rotated 90 degree
</p>

<svg xmlns="http://www.w3.org/2000/svg" version="1.1">
	<pattern id="Pattern1" patternUnits="userSpaceOnUse"   x="0" y="0" width="100" height="100" viewBox="0 0 100 100" > 
		<image x="0" y="0" width="100px" height="100px"    xlink:href="svgtest.jpg"> 
	</pattern>
	<pattern id="Pattern2" patternUnits="userSpaceOnUse"   x="0" y="0" width="100" height="100" viewBox="0 0 100 100" patternTransform="translate(0,0) rotate(90)"> 
		<image x="0" y="0" width="100px" height="100px"    xlink:href="svgtest.jpg"> 
	</pattern>	
	<rect x="1" y="1" width="100" height="100" stroke="green"  stroke-width="2" fill="url(#Pattern1)" />
	
	<rect x="111" y="1" width="100" height="100" stroke="blue"  stroke-width="2" fill="url(#Pattern2)" />
	
</svg>
</body>
</html>
(In reply to Artem from comment #3)
> (In reply to Loic from comment #1)
> > Thanks for the report. Could you attach a minimal testcase (.svg file e.g.)
> > to test, please.
> 
> 
> Test page here: 
> http://test3.w510.com.ua/svgbug.html
> used image:
> http://test3.w510.com.ua/svgtest.jpg

Thanks for the testcase, but as Robert Longson commented, it's a dupe of bug 780880 that's fixed in Firefox 17+.
See your testcase with FF18: http://i.imgur.com/Uucrn.jpg
You need to log in before you can comment on or make changes to this bug.