• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Question on Image and Canvas Drawing

 
Monu Tripathi
Rancher
Posts: 1369
1
Android Eclipse IDE Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have an image on the canvas. The user should be able to select different areas of the image and should be able to label them.Something like the "Select tool", "Add Text" in paint.

I have been trying to achieve this by drawing a rectangle but it does not look pretty. Can you suggest some libraries that I can take a look at that can help here? Also, do we have APIs for drawing callouts and things alike?

Thanks.
 
Mark L. Murphy
Author
Ranch Hand
Posts: 131
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am afraid that I have not experimented with Android's 2D or 3D graphics capabilities as yet. Maybe later this year.

Sorry!
 
Monu Tripathi
Rancher
Posts: 1369
1
Android Eclipse IDE Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You've been very helpful; please dont apologize and embarass me

Thanks.
 
Monu Tripathi
Rancher
Posts: 1369
1
Android Eclipse IDE Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Apart from what I've asked in the first post above, I also want to know how can we resize an image drawn on the canvas. I can guess we would have to apply some sort of transformation to the Paint object or perhaps setBounds on the Image. But I am still unsure nonetheless.

Any pointers, links to tutorials will be helpful.
[I am raising this unanswered curiosity from the depths just to give it another chance!]

Thanks.


 
Ed Burnette
Author
Ranch Hand
Posts: 142
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
It sounds like you're on the right track. Android has the View APIs for User Interface controls like lists and buttons, and Graphics/Canvas APIs for drawing arbitrary things (like ships and explosions). There are no special APIs for callouts; Canvas drawing is fully custom.

You might find this tutorial helpful for resizing images: http://www.anddev.org/resize_and_rotate_image_-_example-t621.html
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic