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:

setTransform(int transform)

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:



Other articles

Click here to Article home

 
uCertify.com | Our Company | Articles | Privacy | Security | Contact Us | News and Press Release | uCertify India
MCSE: MCSA, MCTS, MCITP    JAVA Certification: SCJP, SCWCD Cisco Certification: CCNA, CCENT, A+, Network+, Security+
Oracle Certification: OCP 9i, OCP 10g, OCA 9i, OCA 10g CIW foundation    EC-212-32    CISSP    Photoshop ACE    Adobe Flash ACE
© 2008 uCertify.com. All rights reserved. All trademarks are the property of their respective owners.