Closed Bug 355467 Opened 18 years ago Closed 18 years ago

<svg:pattern> does not render

Categories

(Core :: SVG, defect)

x86
Windows XP
defect
Not set
normal

Tracking

()

RESOLVED WORKSFORME

People

(Reporter: djpnewton, Unassigned)

References

Details

Attachments

(6 files)

User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9a1) Gecko/20061001 Minefield/3.0a1 Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9a1) Gecko/20061001 Minefield/3.0a1 I have a simple pattern that should stretch the pattern over an elements filled area but it is not rendering at all. Reproducible: Always
Attached image svg pattern example
Attached file svg pattern example 2
Well, we're clearly not handling patternUnits="objectBoundingBox" right. We do the right thing in GetPatternRect, but we don't handle it correctly the other places we call GetX(), GetY(), GetHeight(), and GetWidth(). I did a quick hack to fix that up, but I'm still not getting the correct rendering (I think I'm getting some incorrect offsets). Pattern example 2 is totally messed up in my hacked version (but at least it paints a pattern!).
Does this help any with your patch? I needed this to fix bug 345448.
(In reply to comment #6) > Created an attachment (id=241460) [edit] > partial fix (actually bug 345448) > > Does this help any with your patch? I needed this to fix bug 345448. > No, but it certainly changes things. The pattern is still offset, but now it seems to be even more so. I'm attaching my patch, can you see what you see?
Status: UNCONFIRMED → ASSIGNED
Ever confirmed: true
Blocks: 277148
Example 2 seems to display as desired now. Example 1 does not though.
I think we are displaying Example 1 correctly. I.e. it should not display anything. To get it to display set patternContentUnits = "objectBoundingBox" on the pattern. patternContentUnits is currently not specified and so it defaults to userSpaceOnUse. Consider the rect in Example 1 for instance which is at x=0, y=250. This references a pattern rect at 0, 0 with height 100. Since we are in user space this means the pattern displays entirely outside the rect because 0 + 100 < 250. Not sure whether to close this as INVALID based on Example 1 or a duplicate of bug 377263 based on Example 2.
Status: ASSIGNED → RESOLVED
Closed: 18 years ago
Resolution: --- → WORKSFORME
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: