Closed wafs closed 4 years ago
@wafs not sure that possible. Can you android into android here. If there is a way to do it i'll implement it on iOS and Android
@wafs not sure that possible. Can you android into android here. If there is a way to do it i'll implement it on iOS and Android
There is a way in android by using a shader and then using that shader on the Paint object ( https://developer.android.com/reference/android/graphics/BitmapShader )
But I also achieved the same effect by just looping and drawing the bitmap at the new coordinates every loop. The main reason I asked was because in HTML5's canvas spec it's easy to create a pattern with repeat x/y ( https://developer.mozilla.org/en-US/docs/Web/API/CanvasRenderingContext2D/createPattern#Creating_a_simple_pattern ) and was wondering if there was a similar API here.
@wafs your solution works but is not optimized. Doing it with a shader is really a lot faster!
I checked the demos and have had a play with this canvas library, but couldn't find the correct area to set the image mode to tiling when using an image to fill a path.
Is this a thing?