collision detection - Android Create a rectangle within an image view -


hi wanted know how can create rectangle inside imageview. can see in image (http://i.stack.imgur.com/zcpdt.png ) need create rectangular internal , external, determining collision outside there no problems, can not seem create internal one. create internal one, did way:

rect r1 = new rect(object1.x, object1.y, object1.x + bounds1.width(),  object1.y + bounds1.height()); 

for internal 1 had thought same, halving values, not work =(

i think must write custom imageview extends imageview , override ondraw method. draw rect on it.


Comments

Popular posts from this blog

linux - Does gcc have any options to add version info in ELF binary file? -

android - send complex objects as post php java -

charts - What graph/dashboard product is facebook using in Dashboard: PUE & WUE -