I used the code below to move the result of the rotation …
g.Rotate(Radians, -(g.Width/4), g.Height/2) // x,y values
and was surprised to notice… changing the Height value (as positive) moves the image to the left of the screen !
I continued to play with the Y (height) values a bit and noticed it do both at the same time.
To get the black Apple draw to the left, I have to pass a negative value and it is drawn on the left, but also a bit to the height (vs its prior lovation). If I use a positive value, the Black Apple goes to the right and bottom…
Same probably happens for the X value… (I stopped playing with the project) /
Used code to confirm that (modified from the LR):
// Rotate the entire drawing area around its center // and draw a rectangle Const Pi = 3.14159 g.Rotate(Pi / 4, g.Width / 2, CDbl(wMain.TF.Text)) // 45 degrees or 1/8 of a circle g.DrawingColor = Color.Blue g.FillRectangle(g.Width / 2 - 20, g.Height / 2 - 20, 20, 20)
I add a TextField in wMain window and run, then I changed the TF value and watched the blue square going to the left of the screen…
Nota: I strongly dislike the way the Language Reference (in Xojo IDE) delete the text I type (Text. or Graphics. ), when he recognize one word, while I am adding the complement (say TextInputStream… or Graphics.Rotate) and of course after I issue a Return… I have to start typing again !
New values (read them in the left part of the screen):