What is the setTransform() method?

February 21st, 2008 by uCertify Leave a reply »

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.
Get certified in first attempt download scmad - SCMAD simulation. Download free practice test for CX310-110 SCMAD Mobile Application Developer exam.
Like this article? Share it with others
If you like this article, please leave a comment or subscribe this blog via RSS or via e-mail, Bookmark and share through your network. Click the AddThis button below. Thanks.
  • Share/Bookmark
Advertisement

Leave a Reply

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