Hi there. I am playing around with rotate to make a different-looking top title bar. I am making an oval, rotating it slightly, and placing it at the very top (TopLayoutGuide.Bottom + SG). When run in the Simulator, I see a weird angle in the upper-right where it does not fill to the top (see first image). The second image is the same layout and code, but without the rotate, and this one fills correctly across the top as expected. Any ideas? Xojo 2021 r3.1, Xcode 13.1, Monterey
Only tested in Simulator and not on a device, so not sure if this is an issue with rotate in iOS or Simulator issue
What are you expecting the rotate to do? You cant draw above the top bar unless you disable it with a declare to get fullscreen. It seems the rotation is causing the clipping because it is rotating, you just cant see the other part because it was moved “up” into space you dont control.
IDK if it is actually a “very top” issue. Here is the canvas moved down on the screen below another canvas. (pay no attention to my art. just adding things and playing around with sizes for now ). I am just trying out different styles for the app. Was thinking to use this rotated oval as a neat top title area
Ok but if its below another canvas it will still be clipped. You cant draw outside of the bounds of a canvas. If you move where you are drawing the oval down so it is in the center of the canvas everything should work fine
Oh, and I did want the oval “clipped” at the top to show only the bottom half of it. In the code, I have the top of the draw set to -55, so it would draw the whole oval, rotate it, and display only the bottom piece of it
When you first draw the oval, part of it is “off screen” in regard to the canvas. This doesnt fill in your gradient, this fills in nothing because you cant draw outside. It will be the same drawing within a picture - there is nothing to actually hold the pixels you draw so they arent rendered. Then when you rotate, it has no data for the newly exposed area and you see the white. Tim’s suggestion of Object2D should solve your problem, or you can draw your oval in the center of something like a picture, do the rotation and whatever other effects, then draw that picture into your canvas clipped to the appropriate bounds you want to display.
Out of curiosity, is this only the case for iOS? My goal is achieved in desktop (fills the whole top across and does not angle cutoff on the top-right). I am going to play around with Object2D still but curious as to why desktop shows as expected but iOS does not