What is the setTransform() method?
Are you preparing for IT certification? With practice questions, study notes, interactive quizzes, tips and technical articles, uCertify PrepKits ensure that you get a solid grasp of core technical concepts to ace your certification exam in first attempt.
What is the setTransform() method?
Rating:
The setTransform() method is a method of the Sprite class. It is used to change the direction of a specified image. It rotates the image in the multiples of 90 degrees and also provides mirrored (about the vertical axis) versions of each of the rotations. The general syntax of this method is as follows:
Here, the transform parameter takes one of the following constant values:
- TRANS_MIRROR: It allows the Sprite to appear reflected about its vertical center.
- TRANS_MIRROR_ROT180: It allows the Sprite to appear reflected about its vertical center and then rotated clockwise by 180 degrees.
- TRANS_MIRROR_ROT90: It allows the Sprite to appear reflected about its vertical center and then rotated clockwise by 90 degrees.
- TRANS_MIRROR_ROT270: It allows the Sprite to appear reflected about its vertical center and then rotated clockwise by 270 degrees.
- TRANS_NONE: It does not transform the image.
- TRANS_ROT90: It allows the Sprite to rotate by 90 degrees clockwise.
- TRANS_ROT180: It allows the Sprite to rotate by 180 degrees clockwise.
- TRANS_ROT270: It allows the Sprite to rotate by 270 degrees clockwise.
Rating:
Was this information helpful?
Other articles
- What is the Spacer class?
- What is the listRecordStores() method?
- What is the setRecord() method?
- What is the previousRecordId() method?
- What is the newMessage() method?