>
> Inside the onDraw method I have several paths that draw a shape...
>
You are using several paths to draw a single shape?

what I want to know is how can I select the image that the different paths
> create and move it around the screen.
>
You would need to determine if the user touched inside one of your paths,
and if so, translate all your paths by the difference in x and y
coordinates from the first touched point (this is assuming that you are
wanting to move the shape dynamically based on touch events from the user).

Unfortunately, there is no easy way to determine if a point is inside a
path... I googled this and got several good pages with many methods of
calculating this:

http://lmgtfy.com/?q=android+determine+if+point+is+inside+Path


> Is there a way to combining all those path to a single object that I can
> work with?
>
I don't really understand why you are using multiple paths to create your
shape... Why can't you do it with a single path object?

Thanks,
Justin Anderson
MagouyaWare Developer
http://sites.google.com/site/magouyaware


On Fri, Jun 22, 2012 at 8:31 PM, 0gravity <0gravity...@gmail.com> wrote:

> I have class that extends SurfaceView.  Inside the onDraw method I have
> several paths that draw a shape...what I want to know is how can I select
> the image that the different paths create and move it around the screen.
> Is there a way to combining all those path to a single object that I can
> work with?
>
> Here is part of my onDraw method:
>
> Path theSymbol = new Path();
>
> theSymbol.moveTo(0.0F, 0.0F);
> theSymbol.lineTo(0.0F, 50.0F);
> theSymbol.lineTo(16.666666F, 58.333332F);
> theSymbol.lineTo(-16.666666F, 75.0F);
> theSymbol.lineTo(16.666666F, 91.666664F);
> theSymbol.lineTo(-16.666666F, 108.33333F);
>      theSymbol.lineTo(16.666666F, 124.99999F);
>      theSymbol.lineTo(-16.666666F, 141.66666F);
>      theSymbol.lineTo(0.0F, 150.0F);
>      theSymbol.lineTo(0.0F, 200.0F);
>      theSymbol.offset(100F, 20.0F);
>
> canvas.drawPath(theSymbol, paint);
>
>
> I would really appreciate if someone can point me in the right
> direction...as I have been searching for weeks and I can't find a concrete
> method to do this.
>
> Thanks in advance,
> 0gravity.
>
>  --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to android-developers@googlegroups.com
> To unsubscribe from this group, send email to
> android-developers+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/android-developers?hl=en

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to