Skip to content

foresight_backend_block ​

foresight_backend_block, text output device drawing with Unicode block or Braille characters (gnuplot block).

The page is the character grid of foresight_backend_dumb, its layout and text unchanged; the graphics (frame, ticks, grid, series, key samples) are drawn on a bitmap of sx x sy dots per cell, each cell written as the character of its dots: half (1x2, half blocks), quadrants (2x2, the default as in gnuplot), sextants (2x3, Unicode 13) or braille (2x4). Text is written over the graphics. Unlike gnuplot, a cell without dots is a blank, Braille included, so rows trim and copy as text; a point is its dot and the four neighbours. A cell takes the color of the last series drawn in it.

Source: src/lib/foresight_backend_block.F90

Dependencies

Contents ​

Variables ​

NameTypeAttributesDescription
BLOCK_CHARSETScharacter(len=*)parameterCharacter sets (gnuplot names).

Derived Types ​

backend_block ​

Block character text device.

Inheritance

Extends: backend_dumb

Components

NameTypeAttributesDescription
themetype(theme_object)Output theme: colors the layout's ones are mapped to (foresight_theme).
enhancedlogicalTexts read as gnuplot's enhanced text (foresight_enhanced).
latin1logicalTexts in ISO 8859-1, written in UTF-8 (set encoding iso_8859_1).
literallogicalThe texts written now as they are (an automatic title, noenhanced).
texlogicalTexts are LaTeX source, set by LaTeX (cairolatex): numbers in math mode.
text_sizereal(kind=R8P)Default font size of the texts [px].
boxedlogicalThe texts written now are boxed (gnuplot's textbox): on the background.
page_familycharacter(len=48)Font family of the page (set terminal ... font), empty: the device's.
fonttype(font_object)The font of the texts written now (gnuplot font "..."); unset parts the page's.
head_pxreal(kind=R8P)Length [px] and angle [deg] of the data arrowheads drawn now, 0 for the default head.
head_fixedlogicalThose heads keep their size on short arrows (gnuplot fixed).
clear_screenlogicalClear the terminal before writing to standard output.
filecharacter(len=:)allocatableOutput file, - for standard output.
gridcharacter(len=1)allocatableCells, (column, row).
symbolstype(color_symbol)allocatableSymbols in use.
tintinteger(kind=I4P)allocatableCell color, index in symbols, 0 for the default.
colorscharacter(len=7)Color mode: mono, ansi, ansi256, ansirgb.
cwreal(kind=R8P)Cell width [px].
chreal(kind=R8P)Cell height [px].
font_sizereal(kind=R8P)Font size [px].
areareal(kind=R8P)Plot area: left, top, width, height [px].
hiddenlogicalInside a hidden group: nothing is drawn.
charsetcharacter(len=9)Character set.
sxinteger(kind=I4P)Dots per cell, horizontally.
syinteger(kind=I4P)Dots per cell, vertically.
dots_onlogicalallocatableBitmap, (dot column, dot row).
clipinteger(kind=I4P)Dots of the open plot area: first, last column, first, last row; all 0 outside one.

Type-Bound Procedures

NameAttributesDescription
wants_scenepass(self)Whether 3D scenes are written.
scenepass(self)A 3D view's scene (JSON).
hoverpass(self)Text on mouse-over of a point.
pixmappass(self)A PNG image [px].
front_areapass(self)Open or close the front layer of the plot area.
end_pagepass(self)Write the page, rows right-trimmed: to standard output, or atomically to the file.
begin_axespass(self)No panel metadata in text.
end_axespass(self)No panel metadata in text.
begin_grouppass(self)A hidden group (the grid when off) is not drawn at all.
end_grouppass(self)Leave the group.
dotspass(self)Dots are the color symbol, whatever the point type.
polygonpass(self)Closed polygon [px]: its inside filled (px_fill) unless fill is none, then its border with the symbol of stroke unless none; the opacity has no meaning in text, a ghost (unlit cell) is not drawn.
imagepass(self)Raster image over the box of top-left (x0, y0) and bottom-right (x1, y1) corners [px]: a character per cell whose centre lies inside, the density of the pixel luminance, in the pixel color.
textpass(self)Text (text_raw), ISO 8859-1 texts in UTF-8 first (latin1).
text_rawpass(self)text without the ISO 8859-1 conversion.
data_polylinepass(self)Polyline [unit square] drawn with the color symbol, clipped to the plot area; grid lines (the polar grid) with ., frame lines (the polar border, the r axis) with -, | or + by their slope, as gnuplot's dumb.
data_dotspass(self)Dots [unit square] inside the plot area drawn with the color symbol, whatever the point type.
data_barspass(self)Error bars [unit square] as | (vertical) or - (horizontal) runs, clipped to the plot area; no caps.
data_polygonpass(self)Closed polygon [unit square] clipped to the plot area, then drawn in it as polygon.
data_imagepass(self)Raster image over the box of bottom-left (x0, y0) and top-right (x1, y1) corners [unit square], clipped to the plot area: the pixels of the visible part drawn as image.
text_widthpass(self)Width of string in cells [px]: superscripts take full cells after a ^.
rotates_textpass(self)Tick labels stay horizontal on text devices, as on gnuplot's dumb terminal.
row_heightpass(self)Height of a character row [px]: text is written row by row.
readoutpass(self)Seven-segment readout of top-left corner (x, y) [px] in characters: the label row, then 3 rows of 4 columns per cell, lit segments in the series color, the whole glass written so that it covers what lies below; the digit height is not used, characters have one size.
readout_extentpass(self)Width and height [px] of a readout in characters: 4 columns per cell and the unit text, 3 rows and the label.
data_arrowspass(self)Arrows [unit square]: shafts clipped to the plot area with the color symbol, heads (at a tip inside the plot area) as two short segments, filled or not.
data_labelpass(self)Text at a data point (data_label_raw), ISO 8859-1 texts in UTF-8 first (latin1).
data_label_rawpass(self)data_label without the ISO 8859-1 conversion.
colpass(self)Column of an abscissa [px].
color_indexpass(self)Index of a color in symbols.
rowpass(self)Row of an ordinate [px].
putpass(self)Set a cell.
begin_pagepass(self)Start a blank page and its bitmap.
begin_plot_areapass(self)Remember the plot area and its dots, where point markers are clipped.
end_plot_areapass(self)Leave the plot area: markers are no longer clipped (key samples).
cellpass(self)Text of the cell (c, r): its text character, else the character of its dots, a blank if none.
clearpass(self)Blank the cells and the dots of the box of top-left corner (x, y) and size width x height [px].
polylinepass(self)Frame lines (ticks) and key samples drawn on the bitmap, grid lines dotted (every other dot).
px_fillpass(self)Fill the dots whose centre lies inside the polygon (x, y) [px], coloring their cells (even-odd rule).
px_pointpass(self)A data point at p [px]: its dot and the four neighbours, inside the plot area when in one.
px_segmentpass(self)A data segment from a to b [px] on the bitmap; symbol (the error bar character in text) is not used, but for the grid one .: a dotted line.
rectpass(self)Stroked rectangles drawn on the bitmap; a fill blanks the cells and dots covered.
dotpass(self)Set a dot.
dot_linepass(self)Rasterise a dot segment.

backend_block%wants_scene ​

Whether the device writes the scene of a 3D view (the HTML page, for the viewer's mouse rotation): no.

Attributes: pure

Returns: logical

fortran
function wants_scene(self) result(wants)

Arguments

NameTypeIntentAttributesDescription
selfclass(backend_object)inDevice.

Call graph

backend_block%scene ​

The scene of a 3D view (foresight_scene3d's JSON), in the open panel: nothing on a device without a viewer.

fortran
subroutine scene(self, json)

Arguments

NameTypeIntentAttributesDescription
selfclass(backend_object)inoutDevice.
jsoncharacter(len=*)inScene.

Call graph

backend_block%hover ​

text shown on mouse-over of the point (x, y) [unit square], a disk of diameter [px] (gnuplot's hypertext): nothing on a device without a mouse.

fortran
subroutine hover(self, x, y, text, diameter)

Arguments

NameTypeIntentAttributesDescription
selfclass(backend_object)inoutDevice.
xreal(kind=R8P)inAbscissa [unit].
yreal(kind=R8P)inOrdinate [unit].
textcharacter(len=*)inText.
diameterreal(kind=R8P)inSensitive disk [px].

backend_block%pixmap ​

The PNG image png (base64) with its top left corner at (x, y), width x height [px], stretched (gnuplot set pixmap): nothing on a device without images.

fortran
subroutine pixmap(self, x, y, width, height, png)

Arguments

NameTypeIntentAttributesDescription
selfclass(backend_object)inoutDevice.
xreal(kind=R8P)inLeft side [px].
yreal(kind=R8P)inTop side [px].
widthreal(kind=R8P)inWidth [px].
heightreal(kind=R8P)inHeight [px].
pngcharacter(len=*)inThe PNG file, base64.

Call graph

backend_block%front_area ​

Open (opening) or close the front layer of the plot area, after its overlays (markers, caps): the data space objects of gnuplot's front layer go above the points. separate false on a device that draws them in the plot area (before it closes): this one, nothing to open or close.

fortran
subroutine front_area(self, opening, separate)

Arguments

NameTypeIntentAttributesDescription
selfclass(backend_object)inoutDevice.
openinglogicalinOpen, else close.
separatelogicaloutA layer of its own.

Call graph

backend_block%end_page ​

Write the page, rows right-trimmed: to standard output, or atomically to the file.

fortran
subroutine end_page(self)

Arguments

NameTypeIntentAttributesDescription
selfclass(backend_dumb)inoutDevice.

Call graph

backend_block%begin_axes ​

No panel metadata in text.

fortran
subroutine begin_axes(self, view)

Arguments

NameTypeIntentAttributesDescription
selfclass(backend_dumb)inoutDevice.
viewtype(axes_view)inPanel geometry and axis ranges.

Call graph

backend_block%end_axes ​

No panel metadata in text.

fortran
subroutine end_axes(self)

Arguments

NameTypeIntentAttributesDescription
selfclass(backend_dumb)inoutDevice.

Call graph

backend_block%begin_group ​

A hidden group (the grid when off) is not drawn at all.

fortran
subroutine begin_group(self, name, visible, series)

Arguments

NameTypeIntentAttributesDescription
selfclass(backend_dumb)inoutDevice.
namecharacter(len=*)inGroup name.
visiblelogicalinoptionalGroup shown.
seriesinteger(kind=I4P)inoptionalSeries number, unused in text.

Call graph

backend_block%end_group ​

Leave the group.

fortran
subroutine end_group(self)

Arguments

NameTypeIntentAttributesDescription
selfclass(backend_dumb)inoutDevice.

Call graph

backend_block%dots ​

Dots are the color symbol, whatever the point type.

fortran
subroutine dots(self, x, y, color, diameter, pt, line_width)

Arguments

NameTypeIntentAttributesDescription
selfclass(backend_dumb)inoutDevice.
xreal(kind=R8P)inAbscissae [px].
yreal(kind=R8P)inOrdinates [px].
colorcharacter(len=*)inFill color.
diameterreal(kind=R8P)inDot diameter [px].
ptinteger(kind=I4P)inoptionalPoint type, ignored.
line_widthreal(kind=R8P)inoptionalMarker line width, ignored.

Call graph

backend_block%polygon ​

Closed polygon [px]: its inside filled (px_fill) unless fill is none, then its border with the symbol of stroke unless none; the opacity has no meaning in text, a ghost (unlit cell) is not drawn.

fortran
subroutine polygon(self, x, y, fill, opacity, stroke, line_width, ghost)

Arguments

NameTypeIntentAttributesDescription
selfclass(backend_dumb)inoutDevice.
xreal(kind=R8P)inVertex abscissae [px].
yreal(kind=R8P)inVertex ordinates [px].
fillcharacter(len=*)inFill color.
opacityreal(kind=R8P)inFill opacity, unused.
strokecharacter(len=*)inBorder color.
line_widthreal(kind=R8P)inBorder width, unused.
ghostlogicalinoptionalUnlit cell of a segmented fill.

Call graph

backend_block%image ​

Raster image over the box of top-left (x0, y0) and bottom-right (x1, y1) corners [px]: a character per cell whose centre lies inside, the density of the pixel luminance, in the pixel color.

fortran
subroutine image(self, x0, y0, x1, y1, rgba)

Arguments

NameTypeIntentAttributesDescription
selfclass(backend_dumb)inoutDevice.
x0real(kind=R8P)inLeft [px].
y0real(kind=R8P)inTop [px].
x1real(kind=R8P)inRight [px].
y1real(kind=R8P)inBottom [px].
rgbainteger(kind=I4P)inPixels.

Call graph

backend_block%text ​

Text (text_raw), ISO 8859-1 texts in UTF-8 first (latin1).

fortran
subroutine text(self, x, y, string, anchor, sup, rotate, color)

Arguments

NameTypeIntentAttributesDescription
selfclass(backend_dumb)inoutDevice.
xreal(kind=R8P)inAnchor abscissa [px].
yreal(kind=R8P)inAnchor ordinate (baseline) [px].
stringcharacter(len=*)inText.
anchorcharacter(len=*)inHorizontal anchor: start, middle or end.
supcharacter(len=*)inoptionalSuperscript appended to string.
rotatereal(kind=R8P)inoptionalRotation.
colorcharacter(len=*)inoptionalText color.

Call graph

backend_block%text_raw ​

Text in the row of its baseline; superscripts appended after ^; rotated text written top to bottom; the color is not drawn.

fortran
subroutine text_raw(self, x, y, string, anchor, sup, rotate, color)

Arguments

NameTypeIntentAttributesDescription
selfclass(backend_dumb)inoutDevice.
xreal(kind=R8P)inAnchor abscissa [px].
yreal(kind=R8P)inAnchor ordinate (baseline) [px].
stringcharacter(len=*)inText.
anchorcharacter(len=*)inHorizontal anchor: start, middle or end.
supcharacter(len=*)inoptionalSuperscript appended to string.
rotatereal(kind=R8P)inoptionalRotation [deg].
colorcharacter(len=*)inoptionalText color (not drawn).

Call graph

backend_block%data_polyline ​

Polyline [unit square] drawn with the color symbol, clipped to the plot area; grid lines (the polar grid) with ., frame lines (the polar border, the r axis) with -, | or + by their slope, as gnuplot's dumb.

fortran
subroutine data_polyline(self, x, y, color, line_width, dasharray)

Arguments

NameTypeIntentAttributesDescription
selfclass(backend_dumb)inoutDevice.
xreal(kind=R8P)inAbscissae [unit].
yreal(kind=R8P)inOrdinates [unit].
colorcharacter(len=*)inStroke color.
line_widthreal(kind=R8P)inStroke width [px].
dasharraycharacter(len=*)inSVG dash array.

Call graph

backend_block%data_dots ​

Dots [unit square] inside the plot area drawn with the color symbol, whatever the point type.

fortran
subroutine data_dots(self, x, y, color, diameter, pt, line_width)

Arguments

NameTypeIntentAttributesDescription
selfclass(backend_dumb)inoutDevice.
xreal(kind=R8P)inAbscissae [unit].
yreal(kind=R8P)inOrdinates [unit].
colorcharacter(len=*)inFill color.
diameterreal(kind=R8P)inDot diameter [px].
ptinteger(kind=I4P)inoptionalPoint type, ignored.
line_widthreal(kind=R8P)inoptionalMarker line width, ignored.

Call graph

backend_block%data_bars ​

Error bars [unit square] as | (vertical) or - (horizontal) runs, clipped to the plot area; no caps.

fortran
subroutine data_bars(self, x1, y1, x2, y2, color, line_width, cap, vertical)

Arguments

NameTypeIntentAttributesDescription
selfclass(backend_dumb)inoutDevice.
x1real(kind=R8P)inBar start abscissae.
y1real(kind=R8P)inBar start ordinates.
x2real(kind=R8P)inBar end abscissae.
y2real(kind=R8P)inBar end ordinates.
colorcharacter(len=*)inStroke color.
line_widthreal(kind=R8P)inStroke width [px].
capreal(kind=R8P)inCap length [px].
verticallogicalinVertical bars.

Call graph

backend_block%data_polygon ​

Closed polygon [unit square] clipped to the plot area, then drawn in it as polygon.

fortran
subroutine data_polygon(self, x, y, fill, opacity, stroke, line_width, ghost)

Arguments

NameTypeIntentAttributesDescription
selfclass(backend_dumb)inoutDevice.
xreal(kind=R8P)inVertex abscissae [unit].
yreal(kind=R8P)inVertex ordinates [unit].
fillcharacter(len=*)inFill color.
opacityreal(kind=R8P)inFill opacity.
strokecharacter(len=*)inBorder color.
line_widthreal(kind=R8P)inBorder width [px].
ghostlogicalinoptionalUnlit cell of a segmented fill.

Call graph

backend_block%data_image ​

Raster image over the box of bottom-left (x0, y0) and top-right (x1, y1) corners [unit square], clipped to the plot area: the pixels of the visible part drawn as image.

fortran
subroutine data_image(self, x0, y0, x1, y1, rgba)

Arguments

NameTypeIntentAttributesDescription
selfclass(backend_dumb)inoutDevice.
x0real(kind=R8P)inLeft [unit].
y0real(kind=R8P)inBottom [unit].
x1real(kind=R8P)inRight [unit].
y1real(kind=R8P)inTop [unit].
rgbainteger(kind=I4P)inPixels.

Call graph

backend_block%text_width ​

Width of string in cells [px]: superscripts take full cells after a ^.

Attributes: pure

Returns: real(kind=R8P)

fortran
function text_width(self, string, sup, font_size) result(width)

Arguments

NameTypeIntentAttributesDescription
selfclass(backend_dumb)inDevice.
stringcharacter(len=*)inText.
supcharacter(len=*)inSuperscript.
font_sizereal(kind=R8P)inFont size [px].

Call graph

backend_block%rotates_text ​

Tick labels stay horizontal on text devices, as on gnuplot's dumb terminal.

Attributes: pure

Returns: logical

fortran
function rotates_text(self) result(rotates)

Arguments

NameTypeIntentAttributesDescription
selfclass(backend_dumb)inDevice.

Call graph

backend_block%row_height ​

Height of a character row [px]: text is written row by row.

Attributes: pure

Returns: real(kind=R8P)

fortran
function row_height(self) result(height)

Arguments

NameTypeIntentAttributesDescription
selfclass(backend_dumb)inDevice.

Call graph

backend_block%readout ​

Seven-segment readout of top-left corner (x, y) [px] in characters: the label row, then 3 rows of 4 columns per cell, lit segments in the series color, the whole glass written so that it covers what lies below; the digit height is not used, characters have one size.

fortran
subroutine readout(self, x, y, height, masks, label, prefix, suffix, color, font_size)

Arguments

NameTypeIntentAttributesDescription
selfclass(backend_dumb)inoutDevice.
xreal(kind=R8P)inLeft side [px].
yreal(kind=R8P)inTop side [px].
heightreal(kind=R8P)inDigit height [px], unused.
masksinteger(kind=I4P)inSegments of each cell.
labelcharacter(len=*)inLabel, empty for none.
prefixcharacter(len=*)inText before the glass.
suffixcharacter(len=*)inText after the glass.
colorcharacter(len=*)inColor of the lit segments.
font_sizereal(kind=R8P)inFont size [px], unused.

Call graph

backend_block%readout_extent ​

Width and height [px] of a readout in characters: 4 columns per cell and the unit text, 3 rows and the label.

Attributes: pure

Returns: real(kind=R8P)

fortran
function readout_extent(self, height, cells, label, prefix, suffix, font_size) result(extent)

Arguments

NameTypeIntentAttributesDescription
selfclass(backend_dumb)inDevice.
heightreal(kind=R8P)inDigit height [px], unused.
cellsinteger(kind=I4P)inGlass cells.
labelcharacter(len=*)inLabel, empty for none.
prefixcharacter(len=*)inText before the glass.
suffixcharacter(len=*)inText after the glass.
font_sizereal(kind=R8P)inFont size [px].

Call graph

backend_block%data_arrows ​

Arrows [unit square]: shafts clipped to the plot area with the color symbol, heads (at a tip inside the plot area) as two short segments, filled or not.

fortran
subroutine data_arrows(self, x1, y1, x2, y2, color, line_width, head, filled)

Arguments

NameTypeIntentAttributesDescription
selfclass(backend_dumb)inoutDevice.
x1real(kind=R8P)inTail abscissae [unit].
y1real(kind=R8P)inTail ordinates [unit].
x2real(kind=R8P)inTip abscissae [unit].
y2real(kind=R8P)inTip ordinates [unit].
colorcharacter(len=*)inStroke color.
line_widthreal(kind=R8P)inStroke width [px].
headinteger(kind=I4P)inHeads: 0 none, 1 end, 2 start, 3 both.
filledlogicalinFilled heads.

Call graph

backend_block%data_label ​

Text at a data point (data_label_raw), ISO 8859-1 texts in UTF-8 first (latin1).

fortran
subroutine data_label(self, x, y, string, anchor, rotate, color, dx, dy)

Arguments

NameTypeIntentAttributesDescription
selfclass(backend_dumb)inoutDevice.
xreal(kind=R8P)inAnchor abscissa [unit].
yreal(kind=R8P)inAnchor ordinate [unit].
stringcharacter(len=*)inText.
anchorcharacter(len=*)inHorizontal anchor: start, middle or end.
rotatereal(kind=R8P)inRotation [deg, counterclockwise].
colorcharacter(len=*)inText color.
dxreal(kind=R8P)inHorizontal offset [px].
dyreal(kind=R8P)inVertical offset [px, downward].

Call graph

backend_block%data_label_raw ​

Text at a data point [unit square] inside the plot area, moved by the offset; unrotated in text.

fortran
subroutine data_label_raw(self, x, y, string, anchor, rotate, color, dx, dy)

Arguments

NameTypeIntentAttributesDescription
selfclass(backend_dumb)inoutDevice.
xreal(kind=R8P)inAnchor abscissa [unit].
yreal(kind=R8P)inAnchor ordinate [unit].
stringcharacter(len=*)inText.
anchorcharacter(len=*)inHorizontal anchor: start, middle or end.
rotatereal(kind=R8P)inRotation [deg, counterclockwise], ignored.
colorcharacter(len=*)inText color, ignored.
dxreal(kind=R8P)inHorizontal offset [px].
dyreal(kind=R8P)inVertical offset [px, downward].

Call graph

backend_block%col ​

Column of the cell containing the abscissa x [px], clamped to the page.

Attributes: elemental

Returns: integer(kind=I4P)

fortran
function col(self, x) result(c)

Arguments

NameTypeIntentAttributesDescription
selfclass(backend_dumb)inDevice.
xreal(kind=R8P)inAbscissa [px].

Call graph

backend_block%color_index ​

Index of color in symbols, assigning the next symbol on first use.

Returns: integer(kind=I4P)

fortran
function color_index(self, color) result(k)

Arguments

NameTypeIntentAttributesDescription
selfclass(backend_dumb)inoutDevice.
colorcharacter(len=*)inSVG color.

Call graph

backend_block%row ​

Row of the cell containing the ordinate y [px], clamped to the page.

Attributes: elemental

Returns: integer(kind=I4P)

fortran
function row(self, y) result(r)

Arguments

NameTypeIntentAttributesDescription
selfclass(backend_dumb)inDevice.
yreal(kind=R8P)inOrdinate [px].

Call graph

backend_block%put ​

Set cell (c, r) and its color index tint (default 0), ignoring cells off the page.

Attributes: pure

fortran
subroutine put(self, c, r, symbol, tint)

Arguments

NameTypeIntentAttributesDescription
selfclass(backend_dumb)inoutDevice.
cinteger(kind=I4P)inColumn.
rinteger(kind=I4P)inRow.
symbolcharacter(len=1)inSymbol.
tintinteger(kind=I4P)inoptionalColor index in symbols.

Call graph

Subroutines ​

begin_page ​

Start a blank page and its bitmap.

fortran
subroutine begin_page(self, file, width, height, font_size)

Arguments

NameTypeIntentAttributesDescription
selfclass(backend_block)inoutDevice.
filecharacter(len=*)inOutput file, - for standard output.
widthreal(kind=R8P)inPage width [px].
heightreal(kind=R8P)inPage height [px].
font_sizereal(kind=R8P)inFont size [px].

Call graph

begin_plot_area ​

Remember the plot area and its dots, where point markers are clipped.

fortran
subroutine begin_plot_area(self, x, y, width, height)

Arguments

NameTypeIntentAttributesDescription
selfclass(backend_block)inoutDevice.
xreal(kind=R8P)inLeft side [px].
yreal(kind=R8P)inTop side [px].
widthreal(kind=R8P)inWidth [px].
heightreal(kind=R8P)inHeight [px].

Call graph

end_plot_area ​

Leave the plot area: markers are no longer clipped (key samples).

fortran
subroutine end_plot_area(self)

Arguments

NameTypeIntentAttributesDescription
selfclass(backend_block)inoutDevice.

Call graph

clear ​

Blank the cells and the dots of the box of top-left corner (x, y) and size width x height [px].

fortran
subroutine clear(self, x, y, width, height)

Arguments

NameTypeIntentAttributesDescription
selfclass(backend_block)inoutDevice.
xreal(kind=R8P)inLeft side [px].
yreal(kind=R8P)inTop side [px].
widthreal(kind=R8P)inWidth [px].
heightreal(kind=R8P)inHeight [px].

Call graph

polyline ​

Frame lines (ticks) and key samples drawn on the bitmap, grid lines dotted (every other dot).

fortran
subroutine polyline(self, x, y, color, line_width, dasharray)

Arguments

NameTypeIntentAttributesDescription
selfclass(backend_block)inoutDevice.
xreal(kind=R8P)inAbscissae [px].
yreal(kind=R8P)inOrdinates [px].
colorcharacter(len=*)inStroke color.
line_widthreal(kind=R8P)inStroke width [px].
dasharraycharacter(len=*)inSVG dash array.

Call graph

px_fill ​

Fill the dots whose centre lies inside the polygon (x, y) [px], coloring their cells (even-odd rule).

fortran
subroutine px_fill(self, x, y, color)

Arguments

NameTypeIntentAttributesDescription
selfclass(backend_block)inoutDevice.
xreal(kind=R8P)inVertex abscissae [px].
yreal(kind=R8P)inVertex ordinates [px].
colorcharacter(len=*)inFill color.

Call graph

px_point ​

A data point at p [px]: its dot and the four neighbours, inside the plot area when in one.

fortran
subroutine px_point(self, p, color)

Arguments

NameTypeIntentAttributesDescription
selfclass(backend_block)inoutDevice.
preal(kind=R8P)inPoint [px].
colorcharacter(len=*)inColor.

Call graph

px_segment ​

A data segment from a to b [px] on the bitmap; symbol (the error bar character in text) is not used, but for the grid one .: a dotted line.

fortran
subroutine px_segment(self, a, b, color, symbol)

Arguments

NameTypeIntentAttributesDescription
selfclass(backend_block)inoutDevice.
areal(kind=R8P)inStart [px].
breal(kind=R8P)inEnd [px].
colorcharacter(len=*)inColor.
symbolcharacter(len=*)in

Call graph

rect ​

Stroked rectangles drawn on the bitmap; a fill blanks the cells and dots covered.

fortran
subroutine rect(self, x, y, width, height, stroke, fill, line_width)

Arguments

NameTypeIntentAttributesDescription
selfclass(backend_block)inoutDevice.
xreal(kind=R8P)inLeft side [px].
yreal(kind=R8P)inTop side [px].
widthreal(kind=R8P)inWidth [px].
heightreal(kind=R8P)inHeight [px].
strokecharacter(len=*)inStroke color.
fillcharacter(len=*)inFill color.
line_widthreal(kind=R8P)inStroke width [px].

Call graph

dot ​

Set dot (i, j) and color its cell with tint (unless 0, or the cell holds text), ignoring dots off the page.

Attributes: pure

fortran
subroutine dot(self, i, j, tint)

Arguments

NameTypeIntentAttributesDescription
selfclass(backend_block)inoutDevice.
iinteger(kind=I4P)inDot column.
jinteger(kind=I4P)inDot row.
tintinteger(kind=I4P)inColor index, 0 to keep the cell color.

Call graph

dot_line ​

Bresenham segment of dots from a to b [px], every other dot if dotted.

Attributes: pure

fortran
subroutine dot_line(self, a, b, tint, dotted)

Arguments

NameTypeIntentAttributesDescription
selfclass(backend_block)inoutDevice.
areal(kind=R8P)inStart [px].
breal(kind=R8P)inEnd [px].
tintinteger(kind=I4P)inColor index, 0 for the default.
dottedlogicalinEvery other dot only.

Call graph

Functions ​

cell ​

Text of the cell (c, r): its text character, else the character of its dots, a blank if none.

Attributes: pure

Returns: character(len=:)

fortran
function cell(self, c, r) result(text)

Arguments

NameTypeIntentAttributesDescription
selfclass(backend_block)inDevice.
cinteger(kind=I4P)inColumn.
rinteger(kind=I4P)inRow.

Call graph

dot_index ​

Dot containing the coordinate p [px] with cells cell_size px wide of per_cell dots, clamped to 1..last.

Attributes: elemental

Returns: integer(kind=I4P)

fortran
function dot_index(p, cell_size, per_cell, last) result(d)

Arguments

NameTypeIntentAttributesDescription
preal(kind=R8P)inCoordinate [px].
cell_sizereal(kind=R8P)inCell size [px].
per_cellinteger(kind=I4P)inDots per cell.
lastinteger(kind=I4P)inLast dot.

Call graph

code_point ​

Unicode code point of the cell character of charset with the dots bits, non-zero: bit i + sx * j for the dot of column i and row j (from 0, left to right, top to bottom).

Attributes: pure

Returns: integer(kind=I4P)

fortran
function code_point(charset, bits) result(code)

Arguments

NameTypeIntentAttributesDescription
charsetcharacter(len=*)inCharacter set.
bitsinteger(kind=I4P)inDots.

Call graph

utf8 ​

UTF-8 encoding of the code point code (at most U+10FFFF).

Attributes: pure

Returns: character(len=:)

fortran
function utf8(code) result(text)

Arguments

NameTypeIntentAttributesDescription
codeinteger(kind=I4P)inCode point.

Call graph

Released under the GPL v3, BSD 2-Clause, BSD 3-Clause or MIT License.