Class TextModeCRTCalibration
Shows a calibration pattern through every CRT picture at once, in place of the picture, for adjusting the CRT settings to the display.
Inherited Members
Namespace: Scylla.TextMode.CRT
Assembly: ScyllaTextMode.CRT.dll
Syntax
public static class TextModeCRTCalibration
Remarks
The pattern goes through the whole tube: scanlines, video signal, afterglow, glow, mask and curvature. It is drawn at the resolution the picture is captured at, one pattern pixel per captured pixel, which is one display pixel unless the settings fix the cell size or the number of lines.
It is one switch for every TextMode view with a CRT, every camera effect and every in-world monitor, because calibration belongs to the display. A camera effect replaces the camera's whole picture, including a menu that camera draws, so a settings screen that offers the patterns should draw its controls on another camera or a view without a CRT.
The pattern is switched off at the start of every play session.
The following example shows the gray ramp while a settings screen is open and switches it off again afterwards. The grille pattern uses GrilleWidth for its line width.
TextModeCRTCalibration.Pattern = CRTCalibrationPattern.GrayRamp;
/* Or the grille with two pixel wide lines. */
TextModeCRTCalibration.GrilleWidth = 2;
TextModeCRTCalibration.Pattern = CRTCalibrationPattern.Grille;
/* When the settings screen closes. */
TextModeCRTCalibration.Pattern = CRTCalibrationPattern.None;
Fields
MAX_GRILLE_WIDTH
Widest grille line in pixels, 4.
Declaration
public const int MAX_GRILLE_WIDTH = 4
Field Value
| Type | Description |
|---|---|
| int |
MIN_GRILLE_WIDTH
Narrowest grille line in pixels, 1. With this width the grille alternates every pixel.
Declaration
public const int MIN_GRILLE_WIDTH = 1
Field Value
| Type | Description |
|---|---|
| int |
Properties
GrilleWidth
Gets or sets the width of one grille line in pixels, from MIN_GRILLE_WIDTH to MAX_GRILLE_WIDTH. 1 by default, which alternates every pixel. Values outside the range are clamped. Only the Grille pattern uses it.
Declaration
public static int GrilleWidth { get; set; }
Property Value
| Type | Description |
|---|---|
| int |
IsActive
Declaration
public static bool IsActive { get; }
Property Value
| Type | Description |
|---|---|
| bool |
Pattern
Gets or sets the pattern shown in place of the picture. None, the default, shows the picture. Every CRT view, camera effect and in-world monitor reads the value each frame, so a change shows on the next frame.
Declaration
public static CRTCalibrationPattern Pattern { get; set; }
Property Value
| Type | Description |
|---|---|
| CRTCalibrationPattern |