tags:

views:

23

answers:

1

the Canvas class does not take Shape as a parameter for any of its methods. There is no drawShape or clipShape, etc... So, I need to use Path instead. Does android sdk expose any way to convert Shape to Path or Path to shape? I haven't been able to find relationship any between the 2 classes...?

Thank you

A: 

Shape is just an abstraction over the Canvas. It may or may not use a Path internally. You cannot convert a Shape to a Path directly, but all Shapes can be implemented using Path. You can however create a Shape from a Path using the PathShape class.

Romain Guy