Gecko:Image Snapping and Rendering: Difference between revisions

Jump to navigation Jump to search
Line 28: Line 28:
# Every pixel (in the plane of tiled images) sampled in actual rendering would also be sampled by an ideal rendering to an infinite-resolution device. (RATIONALE: Web authors should not be faced with fringes contributed by pixels they did not intend to be sampled.)
# Every pixel (in the plane of tiled images) sampled in actual rendering would also be sampled by an ideal rendering to an infinite-resolution device. (RATIONALE: Web authors should not be faced with fringes contributed by pixels they did not intend to be sampled.)
# The ratio of initial rectangle size in device pixels to image size in CSS pixels, along both axes, must be used as the scale factors for the image space to device space transform. (RATIONALE: Otherwise scaled image tiling will become grossly incorrect at large distances.)
# The ratio of initial rectangle size in device pixels to image size in CSS pixels, along both axes, must be used as the scale factors for the image space to device space transform. (RATIONALE: Otherwise scaled image tiling will become grossly incorrect at large distances.)
# The anchor point, mapped back to image space via the initial rect, and then mapped to device space via the algorithm's image space to device space transform, should end up at the original anchor point transformed by the logical-fill-rectangle-to-device-fill-rectangle transform. (RATIONALE: A CSS background-position:right/bottom image should actually be drawn with the rightmost/bottommost set of pixels at the appropriate edge of the element, no matter what scaling is in effect, so we need to be told which edges should line up and make sure they do.)
# The anchor point, mapped back to image space via the initial rect, and then mapped to device space via the algorithm's image space to device space transform, then snapped to the nearest device pixel, should end up at the original anchor point transformed by the logical-fill-rectangle-to-device-fill-rectangle transform and then snapped to the nearest device pixel. (RATIONALE: A CSS background-position:right/bottom image should actually be drawn with the rightmost/bottommost set of pixels at the appropriate edge of the element, no matter what scaling is in effect, so we need to be told which edges should line up and make sure they do.)


Requirements 5 and 6 imply the following additional requirement:
Requirements 5 and 6 imply the following additional requirement:
1,295

edits

Navigation menu