package claudius
Install
dune-project
Dependency
Authors
Maintainers
Sources
sha256=83abeef68385b306372ff308dc3c6b75d7caf30d25df4111b1acc69a416fa6c5
sha512=281e7613c853e58fbaef2a7cf2039b4efa16ba4f14a1961b75d1f72221f88925425f8d54683e60a11c651200b84d538f3347d24957e4fa9eae0509e2e5110e03
doc/claudius/Claudius/Screen/index.html
Module Claudius.Screen
Source
Information about the display that can be accessed from the running code to work out screen size etc. The screen represents the window in which things will be drawn.
Initializations
val create :
?font:Font.t ->
?image_filenames:string list ->
int ->
int ->
int ->
Palette.t ->
t
create font width height scale palette
Creates a new screen of the specified size width
x height
, and it will be rendered in a window scaled up by the scale
factor provided. The framebuffers used when running will be indexed into the palette
provided here. Raises Invalid_argument
if the dimensions or scale are either zero or negative. If no font
is provided then a default font is used. If image_filenames
is provided, the images will be loaded and their palettes merged into the screen's global palette.
create width height scale font palette
Deprecated: now use create with the optional font.
Access
update screen new_palette
updates the screen with provided palette and marks the screen as dirty.
scale screen
Returns the scaling factor used when drawing screen
to a window.
font screen
Returns the font associated with the screen
if one was provided, or None
otherwise.
is_dirty screen
returns true
if the screen is marked as dirty (needing redraw).
clear_dirty screen
returns a new screen with the dirty flag cleared.