Question about display.newCircle

I got a question about the explanation:
display.newCircle( xCenter, yCenter, radius )
creates a circle with radius radius centered at (xCenter, yCenter). The local origin is at the center of the circle; the reference point is initialized to this local origin. By default, there is no fill or stroke color.

What does xCenter end yCenter do?
I placed the circle in my file changed the numbers nothing happened. changed the size and those numbers and nothing changed (other than the size but the local origin had no effect)

I squashed the circle with scale the “origin” settings had no effect. Rotated the squashed circle. “origin” settings still no effect.

What is it used for? I just stopped entering numbers for it and set them to 0 as they seem to do nothing.

I thought it might be the rotation point but that has a separate piece of code.

Thanks,
Tayari [import]uid: 100901 topic_id: 17618 reply_id: 317618[/import]

xCenter and yCenter are the x and y coordinates of the circle’s center, they are the point from which the circle will be drawn on screen. They should set the starting location of the circle. Are you sure you’re doing everything else correctly? [import]uid: 90817 topic_id: 17618 reply_id: 67071[/import]

You’ll have to post some code to get a better explanation, but kylelyle06 has it right about the xCenter and yCenter.

Once the circle is created, you can set the reference point to whatever you want, and that’s the point at which it will be moved, rotated, scaled, etc. [import]uid: 52430 topic_id: 17618 reply_id: 67090[/import]

Hi, I think I figured it out.
This is my code

local knop1 = display.newCircle( 500, 500, 70)

knop1 :setFillColor ( 255, 255, 255,50 )

But as I was doing more than one thing at a time. I was also experimenting with
knop1.y and knop1.x
Which overrode the first position.

I trying to figure Lua out by rebuilding an interface I made in Objective C.
In Obj C I used interface builder for placing my menu items so I never had to worry about entering the coords myself.

The fact that Dutch is my first language and not English does not help :s.

Thanks for the help.
Tayari

ps, just found out some thing. I used some wrong settings in my config.lua that threw of my coords system. So that also messed with me understanding the positioning. It works now :slight_smile: [import]uid: 100901 topic_id: 17618 reply_id: 67144[/import]