1,295
edits
| Line 26: | Line 26: | ||
# Paints with different dirty rectangles draw the same values for the pixels they draw in common. (RATIONALE: Principle #1.) | # Paints with different dirty rectangles draw the same values for the pixels they draw in common. (RATIONALE: Principle #1.) | ||
# The device pixels that are filled should be the logical fill rectangle rounded to device pixel edges, preserving device pixel centers. (RATIONALE: That's how we "pixel snap" solid rect fills and image drawing should be consistent with solid fills in the pixels that are touched. Satisfies Principles #2 and #3.) | # The device pixels that are filled should be the logical fill rectangle rounded to device pixel edges, preserving device pixel centers. (RATIONALE: That's how we "pixel snap" solid rect fills and image drawing should be consistent with solid fills in the pixels that are touched. Satisfies Principles #2 and #3.) | ||
# Every | # 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 rounded to the nearest device pixel boundaries. (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, should end up at the original anchor point rounded to the nearest device pixel boundaries. (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.) | ||
edits