Gecko:Image Snapping and Rendering: Difference between revisions

Jump to navigation Jump to search
no edit summary
No edit summary
Line 16: Line 16:
# Every image pixel 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 image pixel 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.)
# If the initial rectangle size in device pixels equals the image size in CSS pixels, then each filled device pixel should be set exactly to one image pixel. (RATIONALE: If the scale factor in the author's design is exactly the inverse of the scale required by the device, we must avoid scaling and subpixel translation or there will be unnecessary image blurring and performance penalty.)
# If the initial rectangle size in device pixels equals the image size in CSS pixels, then each filled device pixel should be set exactly to one image pixel. (RATIONALE: If the scale factor in the author's design is exactly the inverse of the scale required by the device, we must avoid scaling and subpixel translation or there will be unnecessary image blurring and performance penalty.)
=== Alternative requirements (dbaron) ===
# paint results must never depend on the dirty rect
# All edges (e.g., of background color, background image, border, foreground image, etc.) at the same subpixel location must be snapped (or not snapped) to the same place.  This includes multiple edges of the same element, edges of ancestor/descendant elements, and edges of elements without an ancestor/descendant relationship.
# Any two edges separated by a width that maps to an exact number of device pixels must end up snapped by the same amount (and direction).
# (from roc's list) Every image pixel 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.)
# (from roc's list) If the initial rectangle size in device pixels equals the image size in CSS pixels, then each filled device pixel should be set exactly to one image pixel. (RATIONALE: If the scale factor in the author's design is exactly the inverse of the scale required by the device, we must avoid scaling and subpixel translation or there will be unnecessary image blurring and performance penalty.)
canmove, Confirmed users, Bureaucrats and Sysops emeriti
1,334

edits

Navigation menu