beetlebug▾
/

ztk::photo flip

Mirrors a photo left to right, or top to bottom.

ztk::photo flip SRC DST horizontal|vertical

Description

horizontal swaps the left and the right, and vertical swaps the top and the bottom; the size stays.

Returns

An empty string.

Examples

% image create photo f -width 1 -height 2
> f put {{red} {blue}}
> ztk::photo flip f f vertical
> f get 0 0
0 0 255

Errors

% image create photo f2 -width 1 -height 1; ztk::photo flip f2 f2 up
bad direction "up": must be horizontal or vertical
-errorcode NONE

Facts

Capability
None.
Tcl release
Tcl 9.1 and 8.6.
Since
ztk 1.0.0-beta.10