CImage:Rot180


The Rot180 method rotates the image by 180 degrees about one or more pairs of axes. This reverses both coordinate axes in the specified plane. For a 2-dimensional image, you can use the default form Rot180() to rotate the image in the only possible way.

Syntax

bSuccess = CImage:Rot180()

bSuccess = CImage:Rot180( nAxisFrom, nAxisTo )

bSuccess = CImage:Rot180( nAxisFrom[], nAxisTo[] )

where

    If no arguments are given, axis 1 ("x") is rotated into axis 2 ("y").

    nAxisFrom and nAxisTo are the two axis numbers between 1 and the maximum number of axes supported by Mira.

    nAxisFrom[] and nAxisTo[] are arrays that specify a series of "from" axes and a series of "to" axes to perform a series of rotations.

    bSuccess is the returned success code. On success it is true, otherwise false.

Examples

The following script rotates an image 180 degrees to reverse it in the x-y plane:

I:Rot180()

-- default: rotate from axis 1 into axis 2.

Assuming that image I has 3 or more dimensions, the following script rotates 180 degrees between axis 1 and axis 3:

I:Rot180( 1, 3 )

-- rotate from axis 1 into axis 3.

The following script rotates the same 3-dimensional image 3 tims in succession:

I:Rot180( {1,3,1}, {2,1,2} )

-- rotate axis 1 -> axis 2, then axis 3 -> axis 1, then axis 1 -> 2.

Related Topics

Rot90

Rot270

CImage class