File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Android and the fly likes Question on Image and Canvas Drawing Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


JavaRanch » Java Forums » Mobile » Android
Reply Bookmark "Question on Image and Canvas Drawing" Watch "Question on Image and Canvas Drawing" New topic
Author

Question on Image and Canvas Drawing

Monu Tripathi
Rancher

Joined: Oct 12, 2008
Posts: 1355

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.


[List of FAQs] | [Android FAQ] | [My Blog]
Mark L. Murphy
Author
Ranch Hand

Joined: Feb 11, 2009
Posts: 131
I am afraid that I have not experimented with Android's 2D or 3D graphics capabilities as yet. Maybe later this year.

Sorry!

Mark Murphy (a Commons Guy)
Author of The Busy Coder's Guide to Android Development http://commonsware.com/Android/
Monu Tripathi
Rancher

Joined: Oct 12, 2008
Posts: 1355

You've been very helpful; please dont apologize and embarass me

Thanks.

This message was edited 1 time. Last update was at by Monu Tripathi

Monu Tripathi
Rancher

Joined: Oct 12, 2008
Posts: 1355

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

Joined: Jun 10, 2003
Posts: 142
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


Ed Burnette, Author of Hello Android
Blog: ZDNet's Dev Connection - Twitter: @eburnette
 
 
subject: Question on Image and Canvas Drawing
 
developer file tools

cast iron skillet 49er

more from paul wheaton's glorious empire of web junk: cast iron skillet diatomaceous earth rocket mass heater sepp holzer raised garden beds raising chickens lawn care CFL flea control missoula heat permaculture