Important Notice: Our web hosting provider recently started charging us for additional visits, which was unexpected. In response, we're seeking donations. Depending on the situation, we may explore different monetization options for our Community and Expert Contributors. It's crucial to provide more returns for their expertise and offer more Expert Validated Answers or AI Validated Answers. Learn more about our hosting issue here.

How can I prevent the drawing functions from drawing outside the boundaries of the target grid?

0
Posted

How can I prevent the drawing functions from drawing outside the boundaries of the target grid?

0

Fundamentally, grids are “fictions”. The programmer may think there are subwindows everywhere there’s a grid, but in fact there is only the outer window (or the whole screen potentially). The only “reality” to grids are coordinates in the main window (screen). So when you clear a grid or draw text in a grid or whatever, all that’s happening is that the GraphicsDesigner function adds the x,y position of the grid to the coordinates you specify and clear/draw/whatever. This works perfectly fine for the vast, vast, vast majority of situations. For example, when you clear a grid, graphicsDesigner clears just that part of the window that is allocated to the grid. When you draw grid borders, GraphicsDesigner draws in the grids boundaries. Since grids (in the GuiDesigner sense) draw themselves – and GraphicsDesigner does the ‘right thing’ in all the simple and normal situations – only people drawing graphics ever find out grids are just “smoke and mirrors”! 🙂 Anyway, Linux XBasic has REAL su

Related Questions

What is your question?

*Sadly, we had to bring back ads too. Hopefully more targeted.

Experts123