Could please somebody explain me (ASCII is really welcome) what the stride argument stands for in Canvas.drawBitmap() and in Bitmap.setPixels()/getPixels()? I understand it’s a way to skip elements in the colors array, but how?
Could please somebody explain me (ASCII is really welcome) what the stride argument stands
Share
In most cases the stride is the same as the width. The stride is useful if you are trying to copy/draw a sub-region of a Bitmap. For instance, if you have a 100×100 bitmap and you want to draw the 50×50 top-right corner, you can use a width of 50px and a stride of 100px.