RASOPS(9) | Kernel Developer's Manual | RASOPS(9) |
rasops
, rasops_init
,
rasops_reconfig
—
#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
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:
RI_FULLCLEAR
eraserows
() hack to clear full screenRI_FORCEMONO
RI_BSWAP
RI_CURSOR
RI_CLEAR
RI_CENTER
RI_CURSORCLIP
RI_CFGDONE
rasops_reconfig
() completed successfullyRI_NO_AUTO
RI_ENABLE_ALPHA
rasops_init
() will only pick bitmap
fonts.RI_8BIT_IS_RGB
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 rasops_reconfig
() to change the
font and ri_wsfcookie is non-negative, you must call
wsfont_unlock
() on it, and reset it to -1 or a new,
valid cookie.
rasops
module itself is implemented within the file
sys/dev/rasops/rasops.c.
rasops
subsystem appeared in NetBSD
1.5.
rasops
subsystem was written by
Andrew Doran ⟨ad@NetBSD.org⟩.
August 7, 2019 | NetBSD 9.2 |