module

Tput::Output::Rectangles

Inherits Tput::Macros / Crystallabs::Helpers::Alias_Methods

Instance methods

copy_rectangle(*arguments)

CSI Pt; Pl; Pb; Pr; Pp; Pt; Pl; Pp$ v Copy Rectangular Area (DECCRA, VT400 and up). Pt; Pl; Pb; Pr denotes the rectangle. Pp denotes the source page. Pt; Pl denotes the target location. Pp denotes the target page. NOTE: xterm doesn't enable this code by default.

Source
erase_rectangle(top = 0, left = 0, bottom = @screen.height - 1, right = @screen.width - 1)

Erases characters from the specified rectangular area in page memory. When an area is erased, all character positions are replaced with the space character. Character values and visual attributes from the specified area are erased. Line attributes are not erased.

CSI Pt; Pl; Pb; Pr$ z
  Erase Rectangular Area (DECERA), VT400 and up.
    Pt; Pl; Pb; Pr denotes the rectangle.

NOTE: xterm doesn't enable this code by default.

Aliases: decera

Source
fill_rectangle(*arguments)

CSI Pc; Pt; Pl; Pb; Pr$ x Fill Rectangular Area (DECFRA), VT420 and up. Pc is the character to use. Pt; Pl; Pb; Pr denotes the rectangle. NOTE: xterm doesn't enable this code by default.

Source
reverse_attr_in_rectangle(*arguments)

CSI Pt; Pl; Pb; Pr; Ps$ t Reverse Attributes in Rectangular Area (DECRARA), VT400 and up. Pt; Pl; Pb; Pr denotes the rectangle. Ps denotes the attributes to reverse, i.e., 1, 4, 5, 7. NOTE: xterm doesn't enable this code by default.

Source
select_change_extent(param = 0)

CSI Ps x Select Attribute Change Extent (DECSACE). Ps = 0 -> from start to end position, wrapped. Ps = 1 -> from start to end position, wrapped. Ps = 2 -> rectangle (exact).

Source
selective_erase_rectangle(top = 0, left = 0, bottom = @screen.height - 1, right = @screen.width - 1)

Erases all erasable characters from a specified rectangular area in page memory. The select character protection attribute (DECSCA) control function defines whether or not DECSERA can erase characters.

When an area is erased, DECSERA replaces character positions with the space character (2/0). DECSERA does not change:

  • Visual attributes set by the select graphic rendition (SGR) function
  • Protection attributes set by DECSCA
  • Line attributes

The coordinates of the rectangular area are affected by the setting of origin mode (DECOM). Method is not affected by the page margins.

CSI Pt; Pl; Pb; Pr$ {
  Selective Erase Rectangular Area (DECSERA), VT400 and up.
    Pt; Pl; Pb; Pr denotes the rectangle.

Aliases: decsera

Source
set_attr_in_rectangle(*arguments)

CSI Pt; Pl; Pb; Pr; Ps$ r Change Attributes in Rectangular Area (DECCARA), VT400 and up. Pt; Pl; Pb; Pr denotes the rectangle. Ps denotes the SGR attributes to change: 0, 1, 4, 5, 7. NOTE: xterm doesn't enable this code by default.

Source