PeachDrawing
PeachDrawing
Warp Class
Draws one surface as the picture a Homography makes of it: the raster half of a CSS perspective or 3D transform
(a PDF cm is affine and cannot). Every destination pixel is mapped back through the inverse to the source and sampled there.
public static class Warp
Inheritance System.Object → Warp
| Methods | |
|---|---|
| Apply(RasterSurface, RasterSurface, Homography) | Fills destination with source mapped by sourceToDestination. Both maps work in layout units, the units the surfaces record their placement in; a destination pixel whose source lies outside the source surface, or behind the viewer, stays transparent. Edges are soft because the source is sampled bilinearly against transparency beyond its border. |
| Composite(RasterSurface, RasterSurface, Homography, DepthPlane, DepthBuffer) | Draws source mapped by sourceToDestination<em>over</em> what destination already holds, where it is not behind what depth already holds: one plane of a 3D rendering context. plane is the depth of the same map (both are made from one 4x4 matrix). A fully opaque pixel records its depth; a translucent one does not, so it is composited over whatever was drawn before it without hiding what is behind it from a plane painted after. |