In Android I'm using Canvas.drawPath( Path, Paint ) to fill a Path. I've set the Paint variable to use a BitmapShader & the Style to Fill. This method works fine until I try to use additional clipping, i.e. I try to draw to a sub-region within the Path like so
theCanvas.clipRect( visibleRect, Region.Op.REPLACE );
theCanvas.clipRect( additionalClipping, Region.Op.INTERSECT );
theCanvas.drawPath( path, paint );
My desired result is to have the texture within the BitmapShader within the Paint, drawn to a rectangular area intersected with edge of my path.
But the actual result of this is to have the texture tiled all over the Path area - the clipping I set on the Canvas seems to have had no effect.
Its almost as if calling Canvas.drawPath internally calls Canvas.setClip( Path, Region.Op.Replace ).
Any help is much appreciated, thank you.