Problem with text and text background when clipping
Posted: Wed Jul 03, 2024 10:02 am
I'm having strange behaviour trying to clip inside a canvas on my Mac. Is this something I'm doing or is it a bug?
The problem looks like the text background is in one place, and the text appears 10 pixels up and to the left which corresponds to the clip region values.
The problem looks like the text background is in one place, and the text appears 10 pixels up and to the left which corresponds to the clip region values.
Code: Select all
OpenWindow(0, 0, 0, 400, 400, "Test", #PB_Window_SystemMenu | #PB_Window_MinimizeGadget | #PB_Window_MaximizeGadget | #PB_Window_ScreenCentered)
CanvasGadget(0, 0, 0, 400, 400)
LoadFont(0, "Arial", 18)
StartDrawing(CanvasOutput(0))
DrawingFont(FontID(0))
ClipOutput(10, 10, 400, 400)
DrawText(50, 50, "Test", #Green, #Blue)
StopDrawing()
Repeat
event = WaitWindowEvent(10)
Until event = #PB_Event_CloseWindow