ztk::photo rotate
Turns a photo anticlockwise.
ztk::photo rotate SRC DST DEGREES ?-background COLOR?
Description
Turns anticlockwise on the screen, as canvas rotate. A multiple of 90 moves the pixels exactly. Another angle gives a box that holds the whole turned image: each pixel blends the 4 pixels of SRC nearest to its middle turned back, and the corners are clear, or COLOR.
Returns
An empty string.
Examples
% image create photo r -width 2 -height 1
> r put {{red blue}}
> ztk::photo rotate r r 90
> list [image width r] [image height r] [r get 0 0]
1 2 {0 0 255}
% image create photo r2 -width 10 -height 10
> r2 put red -to 0 0 10 10
> ztk::photo rotate r2 r2 45 -background white
> list [image width r2] [r2 get 0 0]
15 {255 255 255}
Errors
% image create photo r3 -width 2 -height 2; ztk::photo rotate r3 r3 x
expected floating-point number but got "x"
-errorcode NONE
Facts
- Capability
- None.
- Tcl release
- Tcl 9.1 and 8.6.
- Since
- ztk 1.0.0-beta.10