man.bsd.lv manual page server

Manual Page Search Parameters

RASOPS(9) Kernel Developer's Manual RASOPS(9)

rasops, rasops_init, rasops_reconfigraster display operations

#include <dev/wscons/wsdisplayvar.h>
#include <dev/rasops/rasops.h>

int
rasops_init(struct rasops_info *ri, int wantrows, int wantcols);

int
rasops_reconfig(struct rasops_info *ri, int wantrows, int wantcols);


options RASOPS_DEFAULT_WIDTH=80
options RASOPS_DEFAULT_HEIGHT=25

The rasops subsystem is a set of raster operations for wscons(9).

The primary data type for using the raster operations is the rasops_info structure in <dev/rasops/rasops.h>.

Valid values for the ri_flg member are:

() hack to clear full screen
monochrome output even if we can do color
framebuffer endianness doesn't match CPU
cursor is switched on
clear display on startup
center onscreen output
cursor is currently clipped
rasops_reconfig() completed successfully
do not generate box drawing characters for ISO fonts. Use this when it is not safe to allocate memory, for example when setting up an early console.
the caller supports anti-aliased fonts in the given colour depth. Without this flag () will only pick bitmap fonts.
the caller uses an R3G3B2 colour map in 8 bit. rasops_init() will generate an appropriate ri_devcmap[] but the caller still needs to set up the actual colour map.

rasops_init() initialises a rasops_info descriptor. rasops_reconfig() is used to reconfigure it if parameters have changed in some way.

The arguments wantrows and wantcols are the number of rows and columns we'd like. Passing zero for either one of them uses the default — normally 80 by 25 but it can be changed with config options RASOPS_DEFAULT_WIDTH and RASOPS_DEFAULT_HEIGHT.

In terms of optimization, bitmap fonts of width 8 or 16 work the best for all depths. For depths other than 1 the fonts of width 12 are also optimized.

If calling () to change the font and ri_wsfcookie is non-negative, you must call () on it, and reset it to -1 or a new, valid cookie.

The rasops subsystem is implemented within the directory sys/dev/rasops. The rasops module itself is implemented within the file sys/dev/rasops/rasops.c.

intro(9), wscons(9), wsdisplay(9), wsfont(9)

The rasops subsystem appeared in NetBSD 1.5.

The rasops subsystem was written by Andrew Doran ⟨ad@NetBSD.org⟩.

August 7, 2019 NetBSD-9.2