The graphics window luxinia runs in. Setters only have effect after update is called. Do not call setters without ever calling update.
- bpp ([int])
- returns: (int)
returns or sets bits per pixel (16,24,32)
- client2screen (x,y)
- returns: ([x,y])
converts coordinates from client (luxinia) window to screen (desktop) window.
- 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
- iconify ()
- returns: ()
iconifies the window.
- minsize ([int w,h])
- returns: ([int w,h])
returns or sets minimum size of window. Only has effect in windowed mode.
- multisamples ([int])
- returns: (int)
returns or sets samples for fullscreen anti-aliasing. After update this reflects the actual window value
- ontop ([boolean])
- returns: ([boolean])
returns or sets if window is always on top
- pos ([x,y])
- returns: ([x,y])
sets or returns 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)
- ref2screen (x,y)
- returns: (x,y)
converts reference to screen pixel coords (origin top left in both).
- refsize ([int w,h])
- returns: ([int w,h])
sets reference size of screen (default=640,480). Reference size is mostly important for list2d rendering and mouse positions. It allows the window not use pixel positions but custom dimensions which gui will be stretched to.
- res ([int])
- returns: ([int])
sets window resolution 0 = 640x480x16, 1 = 800x600x16, 2 = 1024x768x16, 3 = 640x480x32, 4 = 800x600x32, 5 = 1024x768x32
- resizemode ([int mode])
- returns: ([int])
allows to get or set how the window should be resized if a user changes window size in windowed mode. * 0 size is not changed (default)
* 1 size is changed
* 2 size and refsize are changed to new window size.
* 3 size is changed and refsize will be changed according to window.resizeratio.
- resizepixelscale ([x,y])
- returns: ([x,y])
sets or returns pixelsize ratio (pixels/mm) for resizemode 3. outref = scale * screenpixels_per_mm. Queries screenpixels_per_mm automatically via window.screensizemm and window.screensize in the resize event.
- resstring ([string])
- returns: ([string])
gets or sets window resolution
string=WIDTHxHEIGHTxBPP:DEPTH:STENCIL:FSAASAMPLES 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.
- restore ()
- returns: ()
restores the window if iconified.
- screen2client (x,y)
- returns: ([x,y])
converts coordinates from screen (desktop) window to client (luxinia) window.
- screen2ref (x,y)
- returns: (x,y)
converts screen pixel to reference coords (origin top left in both).
- screensize ()
- returns: (int w,h)
returns primary display resolution.
- screensizemm ()
- returns: (int w,h)
returns size in millimeters for current primary display (e.g monitor).
- size ([int w,h])
- returns: ([int w,h])
returns or sets size of window. Needs window.update to show effect
- stencilbits ([int])
- returns: (int)
returns or sets stencilbits. After update this reflects the actual window value
- texmatrix ()
- returns: (matrix4x4)
- 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