bitmaps-0.2.5.1: Bitmap library

Data.Bitmap.Croppable

Synopsis

Documentation

class Bitmap bmp => BitmapCroppable bmp whereSource

Class for bitmaps that can be rectangularly cropped into (possibly) smaller sizes

Using the functions of the Bitmap class, default functions are be defined for each of these; of course, implementations are free to write more efficient versions.

Methods

cropSource

Arguments

:: bmp 
-> Coordinates (BIndexType bmp) 
-> Dimensions (BIndexType bmp) 
-> bmp

Crop a bitmap with the given dimensions (third argument) from a position (second argument)

Implementations can but are not required to assume that the result will be a (not necessarily proper) subset of the super bitmap only. Implementations should properly handle the case where the result is as large as the passed super bitmap.