Ultimate Amiga

Please login or register.

Login with username, password and session length
Advanced search  
Pages: [1]   Go Down

Author Topic: icon rotate  (Read 2958 times)

0 Members and 1 Guest are viewing this topic.

rednova

  • A600
  • *
  • Karma: 0
  • Offline Offline
  • Gender: Male
  • Posts: 225
    • http://www.feryogi.com
icon rotate
« on: September 06, 2007, 07:16:50 PM »

If I make an icon of a word (like: rednova-graphics-) is it possible to make it rotate 180 degrees?
or do it with fonts?
Thanks!!!

rednova
-mobilis in mobile-
Logged
-mobilis in mobile-

Lonewolf10

  • AMOS Extensions Developer
  • AMOS Dev
  • A2000
  • *****
  • Karma: 3
  • Offline Offline
  • Gender: Male
  • Posts: 618
    • http://www.aliensrcooluk.com
Re: icon rotate
« Reply #1 on: September 06, 2007, 08:52:09 PM »


ermm.. yes it can be done mathematically. (Don't ask me how!)

I think if you flip the image vertically and horizontally that does the same thing. Look at the extra's manual that came with AMOS - The Creator. I'm sure it's in there.

*checks AMOS Pro manual*

Yes, found it. (I found it by looking up "flipping" in the back index).

Look up commands HREV (Horizontal flip) and VREV (Vertical flip). The BOB versions are found on pages 07.02.10 and 07.02.11


(Edit: HREV BLOCK and VREV BLOCK on page 07.07.04 of the AMOS Pro manual might be a better choice, depending on how you are doing the text/object to be flipped)


Hope that does what you want. I believe in the original AMOS it could be done on sprites, but I don't have time to confirm it. I do know the old way included added some sort of binary to normal Sprite commands, IIRC.


Regards,
Lonewolf10

« Last Edit: September 06, 2007, 08:54:54 PM by Lonewolf10 »
Logged

Lonewolf10

  • AMOS Extensions Developer
  • AMOS Dev
  • A2000
  • *****
  • Karma: 3
  • Offline Offline
  • Gender: Male
  • Posts: 618
    • http://www.aliensrcooluk.com
Re: icon rotate
« Reply #2 on: September 06, 2007, 08:59:04 PM »


Hi,

Does anyone have any rotating routines, or routines that allow you to rotate a 2D image in a 3D like way?

It would save me researching yet another thing I'll need soon :)


Regards,
Lonewolf10

Logged

SamuraiCrow

  • compile-time wierdo
  • Forum Mod
  • A1200
  • *****
  • Karma: 5
  • Offline Offline
  • Gender: Male
  • Posts: 946
  • Compile-time wierdo
Re: icon rotate
« Reply #3 on: September 07, 2007, 12:02:26 AM »

@Lonewolf10

The Amiga chipsets contain no way to do image rotation.  You just have to manipulate the pixels manually using the trig functions sine and cosine to convert the angles into rectangular coordinates.  Amos may have some mechanism to automate the process but I kind of doubt it.

My rotate function in my utility for converting my font from an icon bank to a rotated mirror-image sprite bank in the Ribbons and Curls demo was done with Point and Plot in a double-nested loop.

When we get Mattathias in its final form, it will do image rotation using OpenGL's texture-map functions.
« Last Edit: September 07, 2007, 12:06:57 AM by SamuraiCrow »
Logged

Lonewolf10

  • AMOS Extensions Developer
  • AMOS Dev
  • A2000
  • *****
  • Karma: 3
  • Offline Offline
  • Gender: Male
  • Posts: 618
    • http://www.aliensrcooluk.com
Re: icon rotate
« Reply #4 on: September 07, 2007, 08:36:47 PM »


Thanks. I'll have a closer look at your program tomorrow.


Regards,
Lonewolf10

Logged

SamuraiCrow

  • compile-time wierdo
  • Forum Mod
  • A1200
  • *****
  • Karma: 5
  • Offline Offline
  • Gender: Male
  • Posts: 946
  • Compile-time wierdo
Re: icon rotate
« Reply #5 on: September 08, 2007, 03:54:34 AM »

I didn't include the rotate utility with my source in the demo.  I just included the two banks of graphics in the .AMOS source file.
Logged

Lonewolf10

  • AMOS Extensions Developer
  • AMOS Dev
  • A2000
  • *****
  • Karma: 3
  • Offline Offline
  • Gender: Male
  • Posts: 618
    • http://www.aliensrcooluk.com
Re: icon rotate
« Reply #6 on: September 08, 2007, 08:28:18 PM »


Oh, hehe.

That's ok, I already worked out how you did it earlier today (rotating an image 90 degrees is easy). The way I would do it is to read the image data line by line (e.g. 0,0 to 10,0; 0,1 to 10,1 etc.) and then redraw it somewhere else (e.g. 10,0 to 10,10; 9,0 to 9,10 etc.) depending on which way you wanted it rotated.
Of course rotating something inebetween 0 and 90 is alot harder and *does* require the appropriate maths equations :(


Regards,
Lonewolf10

Logged
Pages: [1]   Go Up
 

TinyPortal 2.2.2 © 2005-2022