Hello everyone!
Program generates polygons (display object) by rules and math functions.
Sizes of polygons and their sides are different. But polygons are symmetric along the axis X.
After that I am filling them by Image (512*512, format png) - sizes of polygons as a rule are bigger than picture.
I am using code for filling and repeating. But sometimes image quantity is bad on some of polygons.
Code:
local o = display.newPolygon( xCentr,yCentr, dots)
o.fill = { type=“image”, filename=“bg.png” }
scaleFactorX = 1 ; scaleFactorY = 1
if ( o.width > o.height ) then
scaleFactorY = o.width / o.height
else
scaleFactorX = o.height / o.width
end
o.fill.scaleX =0.3*scaleFactorX
o.fill.scaleY = 0.3*scaleFactorY
in attach screenshot of two polygons - the bottom polygon has bad shape.
Is it a bug or i need to edit my logic of scaling ?