package claudius

  1. Overview
  2. Docs

doc/claudius/Claudius/Screen/index.html

Module Claudius.ScreenSource

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.

Sourcetype t

Initializations

Sourceval 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.

Sourceval create_with_font : int -> int -> int -> Font.t -> Palette.t -> t

create width height scale font palette Deprecated: now use create with the optional font.

Access

Sourceval dimensions : t -> int * int

dimensions screen Returns the width and height of the screen.

Sourceval palette : t -> Palette.t

palette screen Returns the palette associated with the screen.

Sourceval update_palette : t -> Palette.t -> unit

update screen new_palette updates the screen with provided palette and marks the screen as dirty.

Sourceval scale : t -> int

scale screen Returns the scaling factor used when drawing screen to a window.

Sourceval font : t -> Font.t

font screen Returns the font associated with the screen if one was provided, or None otherwise.

Sourceval is_dirty : t -> bool

is_dirty screen returns true if the screen is marked as dirty (needing redraw).

Sourceval clear_dirty : t -> unit

clear_dirty screen returns a new screen with the dirty flag cleared.

Sourceval pictures : t -> Picture.t array

pictures screen returns the array of pictures loaded into the screen.