The offset is only for when you're using an image as the pattern source, so you can locate the position of the 8x8 square inside the image. I'll file an issue to add a warning there if you use a pattern+offset to explain that. Thanks for finding this!
..okay, just to be pedantic, and because I can't not do something once I get the idea in my head, here's a function that shifts an array pattern:
local gfx = playdate.graphics
local pattern = {0xf0, 0xf0, 0xf0, 0xf0, 0x0f, 0x0f, 0x0f, 0x0f}
function shiftPattern(p, x, y)
out = {}
for i=1,8 do
local n = p[1+(i-y-1)%8] -- Lua's % works correctly with negative numbers!
out[i] = ((n>>(x%8)) | (n<<(8-(x%8)))) & 0xff
end
return out
end
x = 20
y = 20
function playdate.update()
gfx.clear()
gfx.setPattern(shiftPattern(pattern, x, y))
gfx.fillEllipseInRect(x,y,40,40)
x += 1
y += 1
end