Go to the source code of this file.
Functions |
int | scale_precondition (unsigned scale, unsigned pixel, unsigned width, unsigned height) |
| Check if the scale implementation is applicable at the given arguments.
|
void | scale (unsigned scale, void *void_dst, unsigned dst_slice, const void *void_src, unsigned src_slice, unsigned pixel, unsigned width, unsigned height) |
| Apply the Scale effect on a bitmap.
|
Function Documentation
void scale |
( |
unsigned |
scale, |
|
|
void * |
void_dst, |
|
|
unsigned |
dst_slice, |
|
|
const void * |
void_src, |
|
|
unsigned |
src_slice, |
|
|
unsigned |
pixel, |
|
|
unsigned |
width, |
|
|
unsigned |
height |
|
) |
| |
Apply the Scale effect on a bitmap.
This function is simply a common interface for scale2x(), scale3x() and scale4x().
- Parameters:
-
scale | Scale factor. 2, 203 (fox 2x3), 204 (for 2x4), 3 or 4. |
void_dst | Pointer at the first pixel of the destination bitmap. |
dst_slice | Size in bytes of a destination bitmap row. |
void_src | Pointer at the first pixel of the source bitmap. |
src_slice | Size in bytes of a source bitmap row. |
pixel | Bytes per pixel of the source and destination bitmap. |
width | Horizontal size in pixels of the source bitmap. |
height | Vertical size in pixels of the source bitmap. |
int scale_precondition |
( |
unsigned |
scale, |
|
|
unsigned |
pixel, |
|
|
unsigned |
width, |
|
|
unsigned |
height |
|
) |
| |
Check if the scale implementation is applicable at the given arguments.
- Parameters:
-
scale | Scale factor. 2, 203 (fox 2x3), 204 (for 2x4), 3 or 4. |
pixel | Bytes per pixel of the source and destination bitmap. |
width | Horizontal size in pixels of the source bitmap. |
height | Vertical size in pixels of the source bitmap. |
- Returns:
- -1 on precondition violated.
- 0 on success.