mojo.graphics Module Image.Width
Community Forums/Monkey Talk/mojo.graphics Module Image.Width| 
 | ||
| Can anyone make an example of how to use Method Width(). Im trying to make a collision function. If can't find a way to use Image Width, I guess I will creat the function using the "distance formula" wich Im trying to avoid. Any ideas? I want to test it before I buy it. | 
| 
 | ||
| Local image:Image image = LoadImage("myimage.png") Local width:float width = image.Width() ??? What else do you need ??? | 
| 
 | ||
| Thanks Matty for replying. Well I didn't express myself well, what i was trying to say, how exactly you get your image width value. For example in B3D is [ valueImage=  ImageWidth(image) ], now I could use valueImage to make a collision function. Im new at this framework. :oS | 
| 
 | ||
| In that case the method I've shown above will do that: in the above example: 
Local myimage:Image 'image is an object of type "Image"
myimage = LoadImage("mypictureimage.png") 'myimage now holds a reference to the image "mypictureimage.png"
Local mywidth:float 'mywidth is a local variable of type float
mywidth = myimage.Width() 'we assign the variable the value of the image's width using the Width() method
Hope that is a little clearer. Last edited 2011 | 
| 
 | ||
| Thank you very much Matty | 
| 
 | ||
| I got confused with width = image.Width() i was thinking image was part of the width() method. Thank you Matty! |