Problem with object:setFillColor()

I just tested a new game on device and noticed some graphics are not colored like they are in the simulator.

I’m using white bitmap images I color with setFillColor to green and in the simulator everything works fine, but on device the graphics are black.

Any idea what this can be?

Hi @c.noeth,

Can you show a little code around this? Also, what format and size (pixels) are the images? And what device are you testing on?

Brent

Here is a snipped of the code:

 local imagenow = newImage(fontsheet,numbers[c1],framesizeX,framesizeY)                     charasize=round(imagenow.width\*0.85)                     -- giving the sign a color                     imagenow:setFillColor (Color\_R,Color\_G,Color\_B)                     imagenow.alpha=0 -- so we can blend it in later!                     imagenow.x=(round(charasize))+(txtcounter\*charasize)                     imagenow.y=(round(linenumber\*imagenow.height\*0.7))                     imagenow.xScale=0.85                     imagenow.yScale=0.85                                          sentenceTextArray[x]:insert(imagenow)                     imagenow=nil

The black letters appear on an iPad with iOS 6.x (can’t look it up right now for the exact iOS). But when I remember correctly it also appeared on an iPad 4 running iOS 7.x

Can you upload 2 screenshots that show the difference? That would help me attempt to diagnose this better.

Thanks,

Brent

sampletext.jpg

Here you can see a screenshot from the test text output in the simulator. It shows the below seen bitmap font (from an image sheet). The image sheet has white letters with a black border and a light grey to white filled area. This letters are colored green as seen in the above code. In the simulator the letters appear green as you can see in the screenshot above. On device the green area of the letters is totally black.

Thank you for your help Brent!

Hey Brent,

I hope you didn’t invest too much time to look into this because it was a mistake by me.

The device used a different language setting and the table I was getting the color info from was not set correctly.

Sorry for the hassle. Thanks again for your help!!!

Hi @c.noeth,

Can you show a little code around this? Also, what format and size (pixels) are the images? And what device are you testing on?

Brent

Here is a snipped of the code:

 local imagenow = newImage(fontsheet,numbers[c1],framesizeX,framesizeY)                     charasize=round(imagenow.width\*0.85)                     -- giving the sign a color                     imagenow:setFillColor (Color\_R,Color\_G,Color\_B)                     imagenow.alpha=0 -- so we can blend it in later!                     imagenow.x=(round(charasize))+(txtcounter\*charasize)                     imagenow.y=(round(linenumber\*imagenow.height\*0.7))                     imagenow.xScale=0.85                     imagenow.yScale=0.85                                          sentenceTextArray[x]:insert(imagenow)                     imagenow=nil

The black letters appear on an iPad with iOS 6.x (can’t look it up right now for the exact iOS). But when I remember correctly it also appeared on an iPad 4 running iOS 7.x

Can you upload 2 screenshots that show the difference? That would help me attempt to diagnose this better.

Thanks,

Brent

sampletext.jpg

Here you can see a screenshot from the test text output in the simulator. It shows the below seen bitmap font (from an image sheet). The image sheet has white letters with a black border and a light grey to white filled area. This letters are colored green as seen in the above code. In the simulator the letters appear green as you can see in the screenshot above. On device the green area of the letters is totally black.

Thank you for your help Brent!

Hey Brent,

I hope you didn’t invest too much time to look into this because it was a mistake by me.

The device used a different language setting and the table I was getting the color info from was not set correctly.

Sorry for the hassle. Thanks again for your help!!!