know draw shape

Put problem concerning Views, Layouts and other XML-Resources (like AndroidManifest) here.

know draw shape

Postby soniya » Mon Nov 17, 2008 3:01 pm

HI All,
please help me out...Suppose if we draw a any shape(circle) on the mobile screen using mouse and finger..is it possible to know what shape is drawn through used of a class???
soniya
Senior Developer
Senior Developer
 
Posts: 111
Joined: Mon Jan 14, 2008 1:52 pm
Location: india

Top

Postby MrSnowflake » Mon Nov 17, 2008 4:20 pm

Not really, I've written a class which allows you to define gestures using u, d, l, r directions. So a square beginning in the top left corner, going clockwise would be defined as: rdlu (First right then down, left and up).

If such things aren't enough, you have to make something yourself.
User avatar
MrSnowflake
Moderator
Moderator
 
Posts: 1439
Joined: Sat Feb 16, 2008 3:11 pm
Location: Flanders, Belgium

Postby soniya » Tue Nov 18, 2008 3:51 pm

Thanks for reply..
Can u tel 1 more question...
Can we highlight particular area of ImageView or bitmap or any image on TouchEvent???
soniya
Senior Developer
Senior Developer
 
Posts: 111
Joined: Mon Jan 14, 2008 1:52 pm
Location: india

Postby MrSnowflake » Tue Nov 18, 2008 4:30 pm

I guess then you have to manually edit the bitmap.
User avatar
MrSnowflake
Moderator
Moderator
 
Posts: 1439
Joined: Sat Feb 16, 2008 3:11 pm
Location: Flanders, Belgium

Postby Jompe71 » Tue Nov 18, 2008 7:48 pm

1. Get the ARGB array from the bitmap.
2. On touch/click calculate the offset in the array. And the desired width|height of the highlighted area stored in app.
3. Render the ARGB array BUT with the disired pixels with more HUE or alpha if less than 0xff.

Hope this helps...
There is no school like old school gaming.
Jompe71
Experienced Developer
Experienced Developer
 
Posts: 69
Joined: Sat Oct 25, 2008 2:21 pm
Location: Stockholm Sweden

Postby soniya » Wed Nov 19, 2008 2:41 pm

Thanks u for reply...
Can u forward me code example...plz if it's possible.....
soniya
Senior Developer
Senior Developer
 
Posts: 111
Joined: Mon Jan 14, 2008 1:52 pm
Location: india

Top

Return to View, Layout & Resource Problems

Who is online

Users browsing this forum: No registered users and 5 guests