rotation

Type: Real

Availability: Read or write at any time

The rotation property of the Picture control contains the number of radians by which the current picture is rotated about the center point of the control. The default value is zero (0).

The picture is:

As a result, the best way to handle the rotation property is to:

  1. Construct the picture in another Picture control to the required size without rotation, with the appropriate stretch property value and control size.

  2. Use the Window class createPictureAsType method to obtain the binary picture value from the Picture control that you created in the previous step of this instruction.

    If you call the createPictureAsType method with a bit value less than the bit value of the original image, color distortion can occur.

  3. Resize the destination Picture control so that it fits the rotated picture. (Set the destination stretch property value to Stretch_None and the picture property to the binary value returned from createPictureAsType method.)

In addition, creating a picture with the pictureType method set to PictureType_Jpeg results in picture image quality reduction, because the JPEG format is lossy; that is, picture quality is reduced to lessen the size of the resulting image. To retain existing quality and produce a smaller binary image, use a picture type such as PictureType_Png, which has a lossless compression of images for greater clarity.

Any stretching of an image can cause image distortion.