摘要 |
This invention provides a method and system for image cropping in a zooming environment. In a zooming engine, a clip stack and transform stack are provided for all images in a view. When a crop region is selected for an image, the image maintains its crop region in local coordinates. Prior to rendering, the image's local crop region coordinates are pushed on to the clip stack and the image's transform and view's transform are pushed onto a transform stack. A new screen transform is determined from the image transform and the view transform. The screen transform is applied to the image's clip region to provide clip region screen coordinates. These coordinates are pushed on the clip stack. The same transformation is applied to the image's uncropped bounding box coordinates. When the cropped image sends a draw call, the clip region is set and the image is rendered within the clip region and the transformed bounding box.
|