[FIXED] Fill with ImageSheets

Hi,

Anyone had any luck with using imagesheets to fill a rectangle (or circle)?

According to the docs you can use the following syntax { type=“image”, sheet=mySheet, frame=3 }

So I modified one of my working examples that uses imagesheets to fill a rectangle and it fails (build 2013.2052)

-- imageSheet is a valid ImageSheet -- obj is a rectangle local fillParam = { type = "image", sheet = imageSheet, frame = 1} obj.fill = fillParam 

This produces;

… bad argument #3 to ‘?’ (ImageSheet expected, got table)

Using filename = xx works fine but I need to use imagesheets.

Any ideas?

Thanks

Looks like a bug to me. (I tested it myself and got the same error)

I think it’d be a good idea if you file a bug report for this.

I submitted a bug report for this, thanks.

Yes, this is a bug. It will be fixed in the next daily build (2061 or after)

Just tested this in build 2063 and it works great.

Thanks.

Actually I take that back, it works great for rectangles but not for Circle’s or Polygons.

It doesn’t give an error but does not honor the frame attribute so it fills it with the whole spritesheet image.

I’ll log another bug.

Hi Walter,

Is there any update on a fix for Texture fills via an imagesheet for Circle and Polygon objects (I submitted a bug) ?

I have just released a version of Level Director to support G2 which allows you to create rectangles, circles and polygons with texture fills but the Corona simulator output does not match because of this bug.

To recap, rectangles work but the other objects ignore the frame attribute therefore showing the whole spritesheet as the texture.

Thanks

Looks like a bug to me. (I tested it myself and got the same error)

I think it’d be a good idea if you file a bug report for this.

I submitted a bug report for this, thanks.

Yes, this is a bug. It will be fixed in the next daily build (2061 or after)

Just tested this in build 2063 and it works great.

Thanks.

Actually I take that back, it works great for rectangles but not for Circle’s or Polygons.

It doesn’t give an error but does not honor the frame attribute so it fills it with the whole spritesheet image.

I’ll log another bug.

Hi Walter,

Is there any update on a fix for Texture fills via an imagesheet for Circle and Polygon objects (I submitted a bug) ?

I have just released a version of Level Director to support G2 which allows you to create rectangles, circles and polygons with texture fills but the Corona simulator output does not match because of this bug.

To recap, rectangles work but the other objects ignore the frame attribute therefore showing the whole spritesheet as the texture.

Thanks

This bug has been fixed in recent daily builds.

This doesn’t look fixed to me in today’s build 2625 for applying an imagesheet frame to a polygon. I’m still getting the entire imageSheet repeating instead of an individual frame. Is there another build I need to look at? Is anyone else seeing this fixed?

Can you post your sample code?

I am able to get it working with the attached project.

For sure, you can see in the attached 4 files the exact same code where in one version I tile the image directly and in the other I’m tiling the frame within an image sheet. Attached is the image sheet too; the black bar cutting the box is the right side of the image sheet where the other, smaller, image frames sit.

I’m using these repeating settings globally:

display.setDefault( “textureWrapX”, “repeat” )
display.setDefault( “textureWrapY”, “repeat” )

This bug has been fixed in recent daily builds.

This doesn’t look fixed to me in today’s build 2625 for applying an imagesheet frame to a polygon. I’m still getting the entire imageSheet repeating instead of an individual frame. Is there another build I need to look at? Is anyone else seeing this fixed?

Can you post your sample code?

I am able to get it working with the attached project.