Game Development Reference
In-Depth Information
ClientSize.Width
Size.Width
Figure 6.3
Size and ClientSize of the form.
runtime without problem. Check full-screen again and the triangle will be full-
sized.
The initial size of the form can be set by setting the ClientSize property.
ClientSize = new Size(800, 600);
This will set the form's client area to 800 pixels by 600 pixels.
Aspect Ratio
Humans, as you are no doubt aware, have two eyes. The eyes are set in the face
horizontally, and this gives us a wider horizontal viewing range than vertical.
Widescreen TVs and monitors are more natural for us to use than square or
vertically tall ones. The relationship between the width and height of a viewing
area is called the aspect ratio. Certain aspect ratios are more comfortable than
others. It's easy in code to provide a range of different aspect ratios.
If the ClientSize is set to 800 by 600, its aspect ratio is 1.33—the width is
1.33 times longer than the height. This ratio is also referred to as 4:3. 4:3 is a
minimum; as widescreens become more popular, aspect ratios of 16:9 become
more popular. PlayStation 3 has a default resolution of 1280 by 720; the width is
 
 
Search WWH ::




Custom Search