Err SetClipOrigin (Item bitmapItem,int32 x,int32 y)
The (0,0) coordinate always refers to the top-left corner of the clip window, whether the clip window is set to the full size of the bitmap or to some subregion of the bitmap. The clip rectangle that you specify must fit within the parameters of the bitmap; that is, the clip x offset plus the clip window width must not exceed the actual width of the bitmap. The same is true for the height, or y, offset. The order of operations setting width/height first or setting origin first is significant.
If the read address is the same as the write address (this is normal), then the read buffer address is modified the same as the write buffer address (this is what you would expect). If you use SetReadAddress()
to set the read address to something other than the write buffer, the read address is not disturbed by the call to SetClipOrigin()
.
SetClipWidth
(),SetClipHeight()