Class: NullScreen

NullScreen


new NullScreen()

A NullScreen is a screen device that doesn't actually render anything. It might be useful if you want to run an engine on Node.

Implements:
Source:

Members


<readonly> inputData :*

This value contains the data that the screen is currently rendering.

Use Screen#setInputData to change it.

Type:
  • *
Implements:
Source:

<readonly> inputFormat :ScreenInputFormat

This value contains the input format that the screen is expecting to render.

Use Screen#setInputFormat to change it.

Type:
  • ScreenInputFormat
Implements:
Source:

<readonly> inputHeight :number

This value contains the height of the input that the screen is expecting to render.

Use Screen#setInputSize to change it.

Type:
  • number
Implements:
Source:

<readonly> inputPitch :number

This value contains the pitch of the input that the screen is expecting to render.

The pitch is the actual amount of data in a pixel row. Some engines add extra data after each row in order to align the data size.

Use Screen#setInputSize to change it.

Type:
  • number
Implements:
Source:

<readonly> inputWidth :number

This value contains the width of the input that the screen is expecting to render.

Use Screen#setInputSize to change it.

Type:
  • number
Implements:
Source:

<readonly> outputHeight :number

This value contains the output height of the rendered data.

Use Screen#setOutputSize to change it.

Type:
  • number
Implements:
Source:

<readonly> outputWidth :number

This value contains the output width of the rendered data.

Use Screen#setOutputSize to change it.

Type:
  • number
Implements:
Source:

Methods


flushScreen()

Render the input data on the screen.

Implements:
Source:

setInputData(data)

An engine will call this function to inform the device of the new input data.

Parameters:
Name Type Description
data *

The new input data.

Implements:
Source:

setInputFormat(format)

An engine will call this function to inform the device of the new input format.

Throw an exception if the screen device doesn't support the new input format.

Parameters:
Name Type Description
format ScreenInputFormat

The new input format.

Implements:
Source:

setInputSize(width, height, pitch)

An engine will call this function to inform the device of the new input size.

Parameters:
Name Type Argument Description
width number

The new input width.

height number

The new input height.

pitch number <optional>

The new input pitch.

Implements:
Source:

setOutputSize(width, height)

Change the output size.

Parameters:
Name Type Description
width number

The new output width.

height number

The new output height.

Implements:
Source:

validateInputFormat(format)

An engine will call this function to check if the device supports the specified input format.

Return true if the screen device supports the specified input format.

Parameters:
Name Type Description
format ScreenInputFormat

The input format to validate.

Implements:
Source:
Returns:
Type
bool