Closed Bug 384681 Opened 17 years ago Closed 17 years ago

Cairo only has 16 bit coordinate space to work with (16.16 fixed)

Categories

(Core :: Graphics, defect)

x86
All
defect
Not set
normal

Tracking

()

RESOLVED FIXED

People

(Reporter: vlad, Assigned: vlad)

References

Details

Attachments

(2 files)

Cairo uses fixed point coordinates internally; right now, the precision is set to 16.16, to match the precision of pixman (the rasterizing back-end that cairo uses for fallback) and of the X Render extension.  However, this causes a number of problems, as it's quite common to need to draw at locations outside of the 32768 pixel range.  This bug really only affects drawing things that span that entire coordinate space after transformations; you can draw on a virtual area of any size, as long as you translate the visible portion to the screen first.  However, if you are drawing any large objects, that's where you can run into problems

This bug is a collection point for all other bugs that are affected by this issue.  Right now I have a fix that changes cairo's fixed point precision to be 24.8; however, currently, pixman remains at 16.16, so if the native platform can't handle the operation, we'll still have 16.16 issues.  Under linux, 16.16 is part of the X Render API, so we won't be able to fix anything there.  Under OSX, we should never hit fallback, so we should get the full 24.8 precision when talking to Quartz.  On Win32, for some common things (e.g. clearing large background rectangles) we won't hit fallback; for other things, we can hope that the CTM will translate things into the visible range.
See also bug 215055 comment 24 and 25.
Version: unspecified → Trunk
ok, let's switch to 24.8.  roc, does the clamping code look correct?
Attachment #284227 - Flags: review?(roc)
Attachment #284227 - Flags: superreview+
Attachment #284227 - Flags: review?(roc)
Attachment #284227 - Flags: review+
Attachment #284227 - Flags: approval1.9+
Checked in; resolving.  Not all the dependent bugs will be fixed -- some will have issues with 16.16 in the x server, others will have issues with the 16-bit limit in widget coords.
Status: NEW → RESOLVED
Closed: 17 years ago
Resolution: --- → FIXED
Forgot about this bit.
Attachment #285524 - Flags: superreview?(roc)
Attachment #285524 - Flags: review?(pavlov)
Why don't we expose a public cairo_get_max_coord() API and use it here instead of having this nasty implicit dependency?
Attachment #285524 - Flags: review?(pavlov) → review+
SVG text stroke currently comes out way too big on windows too. There's a patch in bug 400025.
Depends on: 400025
Attachment #285524 - Flags: superreview?(roc) → approval1.9?
Attachment #285524 - Flags: approvalM9+
Attachment #285524 - Flags: approval1.9?
Attachment #285524 - Flags: approval1.9+
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: