Difference between revisions of "Resolution"

From ComputerCraft Wiki
Jump to: navigation, search
(Enhanced resolution: Adding a note about the impact of setTextScale on paintutils)
Line 1: Line 1:
'''Resolution''' refers to the number of on a monitor, terminal, or other Computercraft user interface. Each '''pixel''' is a single rectangular patch of color, which can also contain a single letter of text.
+
'''Resolution''' refers to the number of pixels on a monitor, terminal, or other Computercraft user interface. Each '''pixel''' is a single rectangular patch of color, which can also contain a single letter of text.
  
 
== Monitor resolution ==
 
== Monitor resolution ==

Revision as of 16:50, 7 November 2014

Resolution refers to the number of pixels on a monitor, terminal, or other Computercraft user interface. Each pixel is a single rectangular patch of color, which can also contain a single letter of text.

Monitor resolution

A 2x2 Monitor, connected to a Computer, with a Disk Drive connected.

Monitors and Advanced Monitors have variable resolution because of the borders of their screens, and because of the monitor.setTextScale function. This gives monitors potential for exceedingly high resolution when they are properly configured.

Default resolution

The default text scale for monitors is 1. Using the default text scale, a single monitor by itself has a resolution of 7 pixels horizontally by 5 pixels vertically. Resolution is increased when monitors are placed next to each other, both by using the extra monitors and by turning the borders between monitors into extra screen space. With the default text scale, monitor borders take up two pixels on the left and right sides, and one pixel on the top and bottom sides. The monitor in the middle of a 3x3 cluster of monitors would have a resolution of 11 pixels horizontally by 7 pixels vertically, while the whole cluster would have a total resolution of 29 pixels horizontally by 19 pixels vertically.

Using the default text scale, the largest possible monitor cluster (8 blocks wide and 6 blocks tall) has a total resolution of 70 pixels horizontally by 40 pixels vertically.

Enhanced resolution

The text scale of monitor.setTextScale can be increased or decreased in increments of 0.5, and the highest resolution setting is achieved when the text scale is set to 0.5. Under this setting, a single monitor by itself has a resolution of 15 pixels horizontally by 10 pixels vertically. At this scale, monitor borders take up three pixels on the left and right sides, and two pixels on the top and bottom sides.

Using the 0.5 text scale for maximum resolution, the largest possible monitor cluster has a total resolution of 162 pixels horizontally by 80 pixels vertically.

Note that the setTextScale function also changes the resolution of pixels drawn with the paintutils API, so the function is more powerful than its name suggests.

Computer resolution

Computers and Advanced Computers have a resolution of 51 pixels horizontally by 19 pixels vertically.

Pocket computer resolution

Pocket Computers have a resolution of 26 pixels horizontally by 19 pixels vertically.

See also