Now Reading
VT330/VT340 Programmer Reference Guide: Chapter 14

VT330/VT340 Programmer Reference Guide: Chapter 14

2023-05-14 02:25:06




VT330/VT340 Programmer Reference Guide: Chapter 14

VT100.net VT330/VT340 Programmer Reference Guide

What are Sixels?

The VT300 can ship and obtain sixel graphics knowledge. You’ll be able to draw monochrome
or shade (VT340 solely) pictures with sixel knowledge.

A sixel is a bunch of six pixels in a vertical column. A pixel (image component) is
the smallest displayable unit on a video display. Sixels characterize bitmap knowledge
for a graphic picture. The terminal processes sixel knowledge as bits of data. A
bit worth of 1 means activate a pixel. A bit worth of 0 means flip off the pixel.

You employ a single character code for every sixel. The terminal makes use of 6 bits of the
8-bit character code to encode bitmap knowledge.

You should use sixels to design character units and fonts for show. Quantity 1,
Chapter 5 of this handbook describes how one can design and cargo mushy character units
into the terminal.

Sixel Information Format

The VT300 makes use of a tool management string to ship and obtain sixel pictures.

NOTE: See Quantity 1, Chapter 2 of this handbook for basic details about
system management strings.

A lot of Digital’s printers acknowledge the management string format. Listed below are some
examples.

  • LA12
  • LA50
  • LA100
  • LA34-VA
  • LN03

Completely different printers have completely different output high quality. For instance, dot matrix printers
are very completely different from laser printers. Once you design sixel pictures on the
terminal for printing, you must use parameter values which might be acceptable for
your printer. For extra data, see your printer’s programmer reference
handbook.

Gadget Management String

The format for the system management string is as follows.

DCS P1 ; P2; P3; q s..s ST
9/0 ** 3/11 ** ** 7/1 *** 9/12

the place

DCS is a C1 management character that introduces the sixel knowledge sequence.
You can too specific DCS because the 7-bit escape sequence ESC P for a 7-bit
atmosphere.

P1 is the macro parameter. This parameter signifies the pixel side ratio
utilized by the applying or terminal. The pixel side ratio defines the
form of the pixel dots the terminal makes use of to attract pictures. For instance, a
pixel that’s twice as excessive as it’s huge has as side ratio of two:1. The
following record exhibits the values you should use for P1.

NOTE: The macro parameter is offered for compatibility with current
Digital software program. New purposes ought to set P1 to 0 and use the set raster
attributes management, described later on this chapter.

P1 Pixel Facet Ratio
(Vertical:Horizontal)
Omitted 2:1 (default)
0, 1 2:1
2 5:1
3, 4 3:1
5, 6 2:1
7, 8, 9 1:1

You’ll be able to override the setting of the macro parameter by utilizing the set raster
attributes character (“, 2/2) in a sixel knowledge string. See under.

; is a semicolon (3/11). This character separates numeric parameters in a
DCS string.

P2 selects how the terminal attracts the background shade. You should use one
of three values.

P2 That means
0 or 2 (default) Pixel positions specified as 0 are set to the present background shade.
1 Pixel positions specified as 0 stay at their present shade.

P3 is the horizontal grid measurement parameter. The horizontal grid measurement is the
horizontal distance between two pixel dots. The VT300 ignores this parameter
as a result of the horizontal grid measurement is fastened at 0.0195 cm (0.0075 in).

q signifies that this system management string is a sixel command.

s…s is the sixel-encoded knowledge string. The sixel knowledge characters are characters
within the vary of ? (hex 3F) to ~ (hex 7E). Every sixel knowledge character
represents six vertical pixels of knowledge. Every sixel knowledge character represents
a binary worth equal to the character code worth minus hex 3F.

Examples

  • ? (hex 3F) represents the binary worth 000000.
  • t (hex 74) represents the binary worth 110101.
  • ~ (hex 7E) represents the binary worth 111111.

The terminal interprets the six bits to a sixel – six pixels in a vertical
column. The least important bit is on the prime.

NOTE: For data on how one can code sixel characters, see “Delicate Character
Units” in Quantity 1, Chapter 5 of this handbook.

You can too use sixel management features within the knowledge string. The following part
describes these characters and their features.

ST is the string terminator. ST is a C1 management character. You can too
specific ST because the 7-bit escape sequence ESC for a 7-bit atmosphere.

Sixel Management Capabilities

You should use sixel management features to carry out particular features, akin to deciding on
colours and raster attributes.

Graphics Repeat Introducer (!)

The ! (2/1) character introduces a repeat sequence. A repeat sequence permits you to
repeat a graphic character a specified variety of occasions. You employ the next
format for the repeat sequence.

! Pn character
2/1 ** ****

the place

Pn is the repeat depend. The repeat depend may be any decimal worth. For
instance, in case you use a repeat depend of 23, the following character repeats 23
occasions.

character is the character to repeat. You should use any character within the
vary of ? (hex 3F) to ~ (hex 7E).

Raster Attributes (“)

The ” (2/2) character is the set raster attributes command. This command selects
the raster attributes for the sixel knowledge string that follows it. You should use
the command earlier than any sixel knowledge string. The ” command overrides any raster
attributes set by the macro parameter described above. You employ the next
format for the ” command.

Pan ; Pad; Ph; Pv
2/2 ** 3/11 ** ** **

the place

Pan and Pad outline the pixel side ratio for the next sixel knowledge
string. Pan is the numerator, and Pad is the denominator.

Pan
--- = pixel side ratio
Pad

The pixel side ratio defines the form of the pixels the terminal makes use of to
draw the sixel picture.

Pan defines the vertical form of the pixel. Pad defines the horizontal
form of the pixel. For instance, to outline a pixel that’s twice as excessive as
it’s huge, you employ a worth of two for Pan and 1 for Pad.

In the event you use the set raster attributes command (“) in a sixel knowledge string, you
should specify a pixel side ratio. You’ll be able to solely use integer values for Pan
and Pad. The VT300 rounds the pixel side ratio to the closest integer.

Ph and Pv outline the horizontal and vertical measurement of the picture (in pixels),
respectively.

Ph and Pv do not restrict the scale of the picture outlined by the sixel knowledge.
Nevertheless, Ph and Pv allow you to omit background sixel knowledge from the picture
definition and nonetheless have a shade background. Additionally they present a concise
manner for the applying or terminal to encode the scale of a picture.

NOTE: The VT300 makes use of Ph and Pv to erase the background when P2 is
set to 0 or 2.

Shade Introducer (#)

The # (2/3) shade introducer begins a shade choice sequence. There are two
methods to pick colours.

  • Choose a shade map entry by quantity.
  • Use HLS (hue, lightness, and saturation) or RGB (purple, inexperienced, blue) colours.

Fundamental Colours

You should use the next format to pick a fundamental shade map entry.

the place

See Also

NOTE: The VT330 has 4 accessible shade map entries, the VT340 has 16.

HLS or RGB Colours

You employ the next format to specify HLS or RGB
colours. HLS and RGB are universally acknowledged shade coordinate programs.

# Computer ; Pu; Px; Py; Pz
2/3 ** 3/11 ** ** ** **

the place

Computer is the colour quantity.

Pu is the colour coordinate system (HLS or RGB).

Px, Py, and Pz are the colour coordinates within the specified system. Table
14-1
lists the doable values.

Desk 14-1 Shade Specifier
Parameter Attainable Values Definition
Computer 0 to 255 The colour quantity to outline.
Pu (required) 1
2
HLS (hue, lightness, and saturation)
RGB (purple, inexperienced, and blue)

NOTE: The values of the next parameters depend upon the colour coordinate
system chosen (HLS or RGB).

HLS Values
Px 0 to 360 levels Hue angle
Py 0 to one hundred pc Lightness
Pz 0 to one hundred pc Saturation
RGB Values
Px 0 to one hundred pc Crimson depth
Py 0 to one hundred pc Inexperienced depth
Pz 0 to one hundred pc Blue depth

NOTE: See the “Output Mapping” part in Chapter 2 for a dialogue of
shade and shade programming.

Graphics Carriage Return ($)

The $ (2/4) character signifies the top of the sixel line. The energetic place
returns to the left web page border of the identical sixel line. You should use this character
to overprint strains.

Graphics New Line (-)

The – (2/13) character signifies the top of a sixel line. The energetic place
strikes to the left margin of the following sixel line.

Parameter Separator (;)

The ; (3/11) character separates numeric parameters in a tool management string.
If there isn’t a quantity earlier than the separator, the terminal assumes that parameter
is 0. If there’s a quantity after the separator, the terminal assumes that
parameter is 0.

Sixel Scrolling Mode

You’ll be able to set the sixel scrolling mode by utilizing the Sixel Scrolling characteristic within the
Graphics Set-Up display. You can too choose this mode by utilizing the sixel
show mode (DECSDM) management operate.

Sixel Scrolling Enabled

When sixel show mode is enabled, the sixel energetic place begins on the
upper-left nook of the ANSI textual content energetic place. Scrolling happens when the
sixel energetic place reaches the underside margin of the graphics web page. When
sixel mode is exited, the textual content cursor is about to the present sixel cursor place.

The VT300 sends a sixel subsequent line (-) character following a sixel dump. The highest
line of the sixel picture could scroll off the display
if (1) your utility returns the sixel dump to the terminal, or (2) you carry out
a sixel dump to a video terminal related to the VT300 printer port.

NOTE: You’ll be able to forestall the sixel picture from scrolling off the display by disabling
the sixel scrolling characteristic.

Sixel Scrolling Disabled

When sixel scrolling is disabled, the sixel energetic place begins on the upper-left
nook of the energetic graphics web page. The terminal ignores any instructions
that try to advance the energetic place under the underside margin of the
graphics web page. When sixel mode is exited, the textual content cursor doesn’t change from
the place it was in when sixel mode was entered.

Sixel Show Mode Management Perform

You’ll be able to set the sixel scrolling mode by utilizing the sixel show mode
(DECSDM) management operate.

When sixel show mode is about, the Sixel Scrolling characteristic is enabled. When
sixel show mode is reset, the Sixel Scrolling characteristic is disabled.

To set DECSDM, the management operate is.

CSI ? 8 0 h
9/11 3/15 3/8 3/0 6/8

To reset DECSDM, the management operate is.

CSI ? 8 0 l
9/11 3/15 3/8 3/0 6/12

Source Link

What's Your Reaction?
Excited
0
Happy
0
In Love
0
Not Sure
0
Silly
0
View Comments (0)

Leave a Reply

Your email address will not be published.

2022 Blinking Robots.
WordPress by Doejo

Scroll To Top