setFillColor not acting after upgrade to latest version

Hi All,

I’ve just updated to latest version with graphics 2.0. Spent a merry hour or two redoing all coordinates.

Just found another issue.  (build 2076)

Altering colour of a object with object:setFillColor (r,g,b) doesn’t work anymore, or rather it doesn’t reliably change. The objects that don’t change are newRect in most cases.

I’m having the same issues with setFillColor on newRect objects. I have not found a solution.

See http://forums.coronalabs.com/topic/41376-colour-problem/?hl=setfillcolor

c6y says "Found out why. It’s a new Graphics 2.0 feature:

 

‘All RGBA color values have changed from 0:255 to 0:1. You can convert existing color values by dividing the old values by 255’ "

See this link for more things that have changed with Graphics 2.0: http://www.coronalabs.com/blog/2013/10/16/wednesday-faqs-graphics-2-0/

  1. What changes do I need to make to my code to run in the full Graphics 2.0 mode?

The following is a list of things you will need to change when you run your project in full Graphics 2.0 mode (when  graphicsCompatibility  is not included in your  config.lua  file).

  • Display Objects are created with X/Y (center) positioning instead of Top Left.
  • display.setReferencePoint  has been removed. Use  object.anchorX  and  object.anchorY  instead.
  • display.newGradient  has been deprecated. Use  object.fill = table  instead.
  • All RGBA color values have changed from 0:255 to 0:1. You can convert existing color values by dividing the old values by 255.
  • object:setTextColor  has been deprecated. Use  object:setFillColor  or  object.fill = value  instead.
  • line:setColor  has been deprecated. Use  line:setStrokeColor  instead.
  • line.width  has been deprecated. Use  line.strokeWidth  instead.
  • xReferenceyReferencexOrigin  and  yOrigin  have been removed. Use  anchorX  and  anchorY instead.
  • Groups don’t have anchor points enabled by default. You need to set  “group.anchorChildren = true” to enable anchor points on the group.

I’m having the same issues with setFillColor on newRect objects. I have not found a solution.

See http://forums.coronalabs.com/topic/41376-colour-problem/?hl=setfillcolor

c6y says "Found out why. It’s a new Graphics 2.0 feature:

 

‘All RGBA color values have changed from 0:255 to 0:1. You can convert existing color values by dividing the old values by 255’ "

See this link for more things that have changed with Graphics 2.0: http://www.coronalabs.com/blog/2013/10/16/wednesday-faqs-graphics-2-0/

  1. What changes do I need to make to my code to run in the full Graphics 2.0 mode?

The following is a list of things you will need to change when you run your project in full Graphics 2.0 mode (when  graphicsCompatibility  is not included in your  config.lua  file).

  • Display Objects are created with X/Y (center) positioning instead of Top Left.
  • display.setReferencePoint  has been removed. Use  object.anchorX  and  object.anchorY  instead.
  • display.newGradient  has been deprecated. Use  object.fill = table  instead.
  • All RGBA color values have changed from 0:255 to 0:1. You can convert existing color values by dividing the old values by 255.
  • object:setTextColor  has been deprecated. Use  object:setFillColor  or  object.fill = value  instead.
  • line:setColor  has been deprecated. Use  line:setStrokeColor  instead.
  • line.width  has been deprecated. Use  line.strokeWidth  instead.
  • xReferenceyReferencexOrigin  and  yOrigin  have been removed. Use  anchorX  and  anchorY instead.
  • Groups don’t have anchor points enabled by default. You need to set  “group.anchorChildren = true” to enable anchor points on the group.