Quantcast
Channel: Small Basic
Viewing all articles
Browse latest Browse all 669

GraphicsWindow Basics - Small Basic Featured Article

$
0
0

Check out this classic article from :

 

Small Basic: GraphicsWindow Basics

 

Table of Contents

 

 

 

Here's an excerpt about moving shapes:

The position of a shape is defined by a bounding box. The bounding box is a rectangle that completely covers the shape when it was created. The position of the shape on the canvas is defined by the top left corner of the bounding box. The bounding box has a width and height which corresponds to the size set when the shape was created.

  • If a shape has width w and height h, then to position a shape with its centre at (x,y), we need to set the top left corner at (x-w/2,y-h/2).
  • Note that when a rotated or zoomed shape is moved it appears as if the rotation or zoom was performed after the positioning movement – the position is the top left corner of the un-rotated and un-zoomed bounding box.

 

I love how the Wiki is always evolving! This article was written in 2012, but in March of this year, Yan translated it into French:

 

 Small Basic - Les Bases : La Fenêtre Graphique GraphicsWindow (fr-FR)

  

Special thanks to Yan for translating and to LitDev for this timeless article!

 

Small and Basically yours,

   - Ninja Ed

 


Viewing all articles
Browse latest Browse all 669

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>