android
Prev Previous Post   Next Post Next
  #21  
Old 10-15-2010, 06:08 PM
Brett_val's Avatar
Brett_val Brett_val is offline
Senior Member
 
Join Date: Jan 2010
Location: The Netherlands
Posts: 636
Default

Quote:
Originally Posted by İreative View Post
Thanks! Also, someone noted that drawing an image at less than 0,0 caused the player to crash, so I'm trying to get around it by drawing only the part of that image which is visible on screen. exampleImage:draw(0, 0, 40, 40, 80, 80), which is supposed to just draw part of an image, doesn't seem to do anything; when I use it, no image is drawn. Do we know that this function actually works?
Yes it works, but I thought the API is wrong about the usage.
The first four are screen coordinates and the last two are sizes:
First two are where the upper left corner of the pic would be on screen, next two are where you want to start drawing the snip, and last two are the sizes of the snip.
I used my incredible paint skills to visualize this:

exampleImage:draw(x1, y1, x2, y2, x3, y3)
Attached Images
File Type: png Untitled.png (37.8 KB, 73 views)
__________________
this is a link to my personal homepage which I haven't
Reply With Quote

Advertisement [Remove Advertisement]

 

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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 -5. The time now is 02:05 AM.