Real Software Forums

The forum for Real Studio and other Real Software products.
[ REAL Software Website | Board Index ]
It is currently Thu Feb 27, 2020 12:46 pm
xojo

All times are UTC - 5 hours




Post new topic Reply to topic  [ 3 posts ] 
Author Message
 Post subject: How to Load images into an array the rotate them
PostPosted: Thu Mar 22, 2012 9:22 pm 
Offline

Joined: Sun Jan 01, 2012 10:33 am
Posts: 3
Greetings,

I am trying to Load Images for an application into an one dimensional array, this is the easy part. The part I cannot figure out is how to rotate the image once is loaded in the array. I though about creating the different sides of the picture characters like front, back, left and right then based on the index number of the array display the image corresponding to the key the user presses. Can anyone tell me if this is feasible or is there a better way? Your help is appreciated!


Regards,


Astral :D


Top
 Profile  
Reply with quote  
 Post subject: Re: How to Load images into an array the rotate them
PostPosted: Fri Mar 23, 2012 9:46 am 
Offline

Joined: Fri Sep 16, 2011 5:23 pm
Posts: 50
Location: Ft. Collins, CO
I don't quite understand what you're trying to accomplish. Drawing a picture rotated is pretty easy using the PixmapShape class (the docs include a good example to get you started). But your mention of front, left, back, and right suggests that you actually have four different images for each concept (character or whatever it is). In that case, yes, you need to load all four and then do a bit of math or logic to figure out which one to draw.

HTH,
- Joe

_________________
Image
Joe Strout — Luminary Apps
custom desktop & mobile software


Top
 Profile  
Reply with quote  
 Post subject: Re: How to Load images into an array the rotate them
PostPosted: Sat Mar 24, 2012 1:07 am 
Offline

Joined: Thu Dec 01, 2011 2:13 pm
Posts: 288
Create a new function rotate(Input as Picture) As Picture with the rotate code

Add following code to a pushbutton or something:

dim i as integer
for i=0 to Ubound(myArray)
myarray(i)=rotate(myarray(i))
next

_________________
Mac OS X 10.3-10.8
Windows 2000 (I know it sucks)
Windows Server 2007

You want a bunch of new classes and web styles? realstudiodevspot.com (search there for Web Styles Plugin)
Folderitem is too hard? File Bin Class
I hate cows.


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 3 posts ] 

All times are UTC - 5 hours


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group