Go Back   CodingForums.com > :: Server side development > Java and JSP

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 10-28-2011, 03:47 AM   PM User | #1
RSCoderUnloader
New Coder

 
Join Date: Apr 2011
Posts: 34
Thanks: 6
Thanked 0 Times in 0 Posts
RSCoderUnloader is an unknown quantity at this point
Whats more efficient? Rotating images(in JLabel)

Im making a game and I need my character to rotate.
Would it be better to rotate it by making a whole other image, in the direction desired? or to rotate the content in code?

So theres 4 directions(up,down,left,right)

Option 1:
Have 4 images, each one in a certain direction. When i want to rotate, i
sub one image for another.

Option 2:
Have 1 image. When I want to rotate it, I actually rotate it in code.

P.S. I can do option 1 with ease, but i feel like its elementary and inefficient. But iv spent some time trying to use AffineTransform to try to rotate it with no luck
RSCoderUnloader is offline   Reply With Quote
Reply

Bookmarks

Tags
image, jlabel, rotate

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 05:27 AM.


Advertisement
Log in to turn off these ads.