Closed Bug 315383 Opened 19 years ago Closed 17 years ago

Elements with coordinates >= 32768 not drawn

Categories

(Core :: SVG, defect)

1.8 Branch
x86
Windows XP
defect
Not set
normal

Tracking

()

RESOLVED FIXED

People

(Reporter: paul, Unassigned)

References

Details

Attachments

(1 file)

User-Agent:       Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8) Gecko/20051025 Firefox/1.5
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8) Gecko/20051025 Firefox/1.5

Lines that substantially exceed the SVG view box are not shown.
It would appear coordinates are being truncated to a 16bit number somewhere as line of length less than 32767 (after any scaling) are ok but lines of 32768 or longer (after any scaling) are not shown. 

Reproducible: Always

Steps to Reproduce:
I'll attach an example file.
Actual Results:  
The attached file should display 6 horizontal lines, a pair of red, a pair of green and a pair of blue.

Expected Results:  
Only the *slightly* shorter blue lines are displayed.

The red and green lines hould be displayed.
Assignee: nobody → general
Component: General → SVG
Product: Firefox → Core
QA Contact: general → ian
Version: unspecified → 1.8 Branch
Sounds like this is due to cairo's internal limits.
*** Bug 315382 has been marked as a duplicate of this bug. ***
This SVG file should show six horizontal lines, a pair of red, a pair green and a pair of blue. But only the blue lines are shown just because they are one pixel shorter!
confirming Branch and Trunk: 
Mozilla/5.0 (Windows; U; Win98; en-US; rv:1.8) Gecko/20051025 Firefox/1.5
Mozilla/5.0 (Windows; U; Win98; en-US; rv:1.9a1) Gecko/20051104 Firefox/1.6a1

WFM Mozilla/5.0 (Windows; U; Win98; en-US; rv:1.9a1) Gecko/20051106 SeaMonkey/1.5a

At first, Mozilla also only renders two blue lines. After some seconds, different colored lines are rendered above and below each blue line. Didn´t see how long it took, as I tested Firefox in the meantime.
Mozilla/5.0 (Macintosh; U; PPC Mac OS X Mach-O; en-US; rv:1.9a1) Gecko/20051106 Firefox/1.6a1

WFM
Look also at Bug 381875
I think Arpad's summary is more useful, so using that here.
Summary: Long SVG lines not drawn → Elements with coordinates >= 32768 not drawn
BTW, this is what the spec ( http://www.w3.org/TR/SVG/types.html#BasicDOMInterfaces ) says:
Unless stated otherwise for a particular attribute or property, a <number> has the capacity for at least a single-precision floating point number (see [ICC32]) and has a range (at a minimum) of -3.4e+38F to +3.4e+38F.
It is recommended that higher precision floating point storage and computation be performed on operations such as coordinate system transformations to provide the best possible precision and to prevent round-off errors.
Conforming High-Quality SVG Viewers are required to use at least double-precision floating point (see [ICC32]) for intermediate calculations on certain numerical operations.

Can someone tell me what +3.4e+38F means as int?
It would be 

340 [insert 33 zeros] 000
This is due to the internal Cairo precision that's used in Fx2 being 16.16 fixed point; that is, you only have 32768 pixels to work with.  This sucks, and we're working on fixing it.  Most likely, for Fx3, this will become 24.8, or 16,777,216.0 pixels.  This is -still- not ideal, but it will be much harder to accidentally hit.

Linux users will probably not see this fixed in Fx3, because the Render extension specifies 16.16 fixed as part of its API; its' not possible to send bigger coordinates down to X.
Status: UNCONFIRMED → NEW
Ever confirmed: true
It looks like Firefox 3 will be 24.8. i.e. it will have a coordinate range of ±33,554,432. The nightlies have this range now.


The testcase in this bug now works as do those in the various duplicates of this bug.
fixed by check in for bug 384681
Status: NEW → RESOLVED
Closed: 17 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: