Difference between revisions of "platform.window:invalidate"

From Inspired-Lua Wiki
Jump to navigation Jump to search
m (Text replace - "| <u>" to "| <u><center>")
Line 17: Line 17:
 
! Parameter !! Type !! Description
 
! Parameter !! Type !! Description
 
|-
 
|-
| <u>x</u> || number || x-coordinate of the upper-left origin.
+
| <u><center>x</u> || number || x-coordinate of the upper-left origin.
 
|-
 
|-
| <u>y</u> || number || y-coordinate of the upper-left origin.
+
| <u><center>y</u> || number || y-coordinate of the upper-left origin.
 
|-
 
|-
| <u>width</u> || number || width of the region to be refreshed.
+
| <u><center>width</u> || number || width of the region to be refreshed.
 
|-
 
|-
| <u>height</u> || number || height of the region to be refreshed.
+
| <u><center>height</u> || number || height of the region to be refreshed.
 
|}
 
|}
  

Revision as of 23:41, 30 May 2011


platform.window:invalidate is a function that is part of platform.window.


This routine invalidates a region of the window by firing the on.paint event, thus forcing it get repainted.
x and y default to (0, 0) and width and height default to the pixel width and height of the window.

This has been introduced in TI-Nspire OS 3.0 (Changes).


Syntax

platform.window:invalidate([x, y, width, height])

Parameter Type Description
x
number x-coordinate of the upper-left origin.
y
number y-coordinate of the upper-left origin.
width
number width of the region to be refreshed.
height
number height of the region to be refreshed.

Examples

platform.window:invalidate()
platform.window:invalidate(0, 0, 50, 10)

Good to know

The entire window can be forced to repaint with by calling the function with no arguments : platform.window:invalidate() , allowing all parameters to take their default values.

See also