Patent ID: 8643678

Claim:
A method implemented by data processing apparatus, the method comprising: identifying a two-dimensional image representing an icon and a two-dimensional image representing a light source; applying an affine transformation to a transparency channel of the image representing the icon, the affine transformation projecting pixels of the transparency channel into three-dimensional space; and generating a field of pixels representing a shadow cast by the icon by computing a portion of the light source that is visible to pixels of the field by subtracting rows of a matrix that represents the affine transformation from rows of a matrix that represents a transparency channel of the light source image, wherein subtracting the rows of the affine transformation from the rows of the transparency channel of the light source image comprises computing first run-length encodings based at least partly on rows of the matrix representing the transparency channel of the light source image and computing second run-length encodings based at least partly on rows of the matrix representing the affine transformation, and computing brightness of each of the generated pixels of the field based at least partly on the computed portion of the visible light source.