libcucul canvas transformation


Functions

int cucul_invert (cucul_canvas_t *)
 Invert a canvas' colours.
int cucul_flip (cucul_canvas_t *)
 Flip a canvas horizontally.
int cucul_flop (cucul_canvas_t *)
 Flip a canvas vertically.
int cucul_rotate (cucul_canvas_t *)
 Rotate a canvas.

Detailed Description

These functions perform horizontal and vertical canvas flipping.

Function Documentation

int cucul_invert ( cucul_canvas_t cv  ) 

Invert a canvas' colours (black becomes white, red becomes cyan, etc.) without changing the characters in it.

This function never fails.

Parameters:
cv The canvas to invert.
Returns:
This function always returns 0.

int cucul_flip ( cucul_canvas_t cv  ) 

Flip a canvas horizontally, choosing characters that look like the mirrored version wherever possible. Some characters will stay unchanged by the process, but the operation is guaranteed to be involutive: performing it again gives back the original canvas.

This function never fails.

Parameters:
cv The canvas to flip.
Returns:
This function always returns 0.

int cucul_flop ( cucul_canvas_t cv  ) 

Flip a canvas vertically, choosing characters that look like the mirrored version wherever possible. Some characters will stay unchanged by the process, but the operation is guaranteed to be involutive: performing it again gives back the original canvas.

This function never fails.

Parameters:
cv The canvas to flop.
Returns:
This function always returns 0.

int cucul_rotate ( cucul_canvas_t cv  ) 

Apply a 180-degree transformation to a canvas, choosing characters that look like the upside-down version wherever possible. Some characters will stay unchanged by the process, but the operation is guaranteed to be involutive: performing it again gives back the original canvas.

This function never fails.

Parameters:
cv The canvas to rotate.
Returns:
This function always returns 0.