Win a copy of Java Persistence with Spring Data and Hibernate this week in the Spring forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Tim Cooke
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • Junilu Lacar
  • Rob Spoor
  • Jeanne Boyarsky
Saloon Keepers:
  • Stephan van Hulst
  • Carey Brown
  • Tim Holloway
  • Piet Souris
Bartenders:

Question on Image and Canvas Drawing

 
Rancher
Posts: 1369
1
Android Eclipse IDE Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
Author
Posts: 131
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.


 
Author
Posts: 142
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
I will open the floodgates of his own worst nightmare! All in a tiny ad:
The Low Tech Laboratory Movie Kickstarter is LIVE NOW!
https://www.kickstarter.com/projects/paulwheaton/low-tech
reply
    Bookmark Topic Watch Topic
  • New Topic