Older Newer
Sun, 03 Nov 2019 16:07:14 . . . . SyneRyder [Tweak example code to fit smaller screens]


Changes by last author:

Added:
= getDisplaySettings =

== Syntax ==

int getDisplaySettings(int s)

== Arguments ==

:s

:: Set to 0 for the bit depth, to 1 for the horizontal resolution in pixels, to 2 for the vertical resolution in pixels and to 3 for the refresh rate in Hz of the screen.

== Return ==

Returns a value according to the used s parameter.

== Description ==

Lets you know the bit depth, resolution and refresh rate of the screen. Especially the refresh rate is useful if you want to display an animation in the preview with the help of setTimerEvent and updatePreview. Because if you draw more frames per second than the refresh rate is able to display, your animation will flicker.

== Example ==

<code>

%ffp

ForEveryTile:

{

Info (" %d bit \n %d x %d pixel \n %d Hz", getDisplaySettings(0), getDisplaySettings(1), getDisplaySettings(2), getDisplaySettings(3));

return true;

}

</code>

== Also see ==

setTimerEvent, updatePreview