# Class: window

The graphics window luxinia runs in. Setters only have effect after update is called. Do not call setters without ever calling update.

## Methods:

### Method overview:

- bpp
- colorbits
- depthbits
- fullscreen
- height
- pos
- readcolor
- readdepth
- readstencil
- refsize
- res
- resstring
- stencilbits
- title
- update
- width

bpp ([int])
  returns: (int)
  returns or sets bits per pixel (16,24,32)
colorbits ()
  returns: (int r,g,b,a)
  returns actual bits used for each channel
depthbits ([int])
  returns: (int)
  returns or sets depthbits. After update this reflects the actual window value
fullscreen ([boolean])
  returns: ([boolean])
  gets or sets if window will be fullscreen
height ([int])
  returns: (int)
  returns or sets height
pos (x,y)
  returns: ()
  sets window position
readcolor (float x,y)
  returns: (float r,g,b,a)
  returns color value at window coordinate (in refsystem)
readdepth (float x,y)
  returns: (float)
  returns depth value at window coordinate (in refsystem)
readstencil (float x,y)
  returns: (int)
  returns stencil value at window coordinate (in refsystem)
refsize ([int w,h])
  returns: ([int w,h])
  sets reference size of screen (default=640,480)
res ([int])
  returns: ([int])
  sets window resolution 0 = 640x480x16, 1 = 800x600x16, 2 = 1024x768x16, 3 = 640x480x32, 4 = 800x600x32, 5 = 1024x768x32
resstring ([string])
  returns: ([string])
  gets or sets window resolution string=WIDTHxHEIGHTxBPP:DEPTH:STENCIL BPP should be 16,24 or 32. Only 32 has forced alpha buffer support. You can check colorbits what kind of bits per pixel are used.
stencilbits ([int])
  returns: (int)
  returns or sets stencilbits. After update this reflects the actual window value
title (string)
  returns: ()
  Set the title of the window
update ()
  returns: ()
  if you have changed resolution or fullscreen state this function makes changes active
width ([int])
  returns: (int)
  returns or sets width