Here is my code, you will only need to substitute the image on line 15 to run it:
local \_W = display.contentWidth local \_H = display.contentHeight local snapshot = display.newSnapshot(\_W, \_W \* 0.5) snapshot.fill.effect = "filter.polkaDots" snapshot.fill.effect.numPixels = \_W / 10 snapshot.fill.effect.dotRadius = 1 snapshot.fill.effect.aspectRatio = snapshot.width / snapshot.height snapshot.x = \_W \* 0.5 snapshot.y = \_H \* 0.5 display.setDefault( "textureWrapX", "repeat" ) display.setDefault( "textureWrapY", "mirroredRepeat" ) local scoreBG = display.newRect(snapshot.group, 0, 0, snapshot.width, snapshot.height) scoreBG.fill = { type="image", filename="wood7.jpg" } display.setDefault( "textureWrapX", "clampToEdge" )
The polka dots are next to one another horizontally, but there is an extra empty row between each row of polka dots. I don’t see any properties which would allow me to control how many rows would appear. Changing the pixel size simply increases the size of each cell, but also increases the size of the empty row as well so you cannot “fill” the empty space.
Is there something wrong in my implementation? Or is this something that has been overlooked in the filter?
Edit: Also, on certain devices (seems to be on 1080p+ devices), the polka dots seem distorted. Even when using the aspect ratio to try and keep them round, they get altered into weird squared shapes. I’ve seen this happen on a Galaxy S4, and a colleague has seen it on an ipad 5 and I believe a Nexus 7 2013.