if have some type of 2d object / figure shape. That should be drawn on canvs. The origin of that shape should be the center (originX = width/2, OriginY = width/2). But I see no way to get this width. Or is there something i missed in the docs?
I thought about this. But I use something like addCubic to add a cuveshape. I never really understood how these Controlpoints work. I managed to get a result, ok. But to calculate the width by code… Never ever… Is there some documentation about these controlpoints i have never found? Is there some code thats shows me the calculation of what controlpoints do?
The only other way I see is to draw the shape to a picture und go through its rgbsurface pixel by pixel…
Not a nice way.
I think it would be easy for Xojo to give the width and height info for this object. One point more on this really long list of things that - I think - is necessary and not available.
Or From the other side: How do others solve that? I can’t be the first one. In short, I have a canvas, there is a backgroundlayer. You can put Shapes on this layer. If you zoom in or out, you could not handle that with an origin of 0,0. It is mandatory to have the origin centered, otherwise the shape is “walking” on the map. And espaceially for this case (zooming in and out) vector is the way to do it, not pixel. Perhaps I miss something, but then I didn’t see it.