Skip to content

riintuilib

This library gives Blitz Basic 2 a new object, Rast: a RastPort of the operating system that draws on a bitmap object. IPBitMap sets up a Rast for a bitmap; IPOutput makes it the output channel, so that Print and NPrint draw their text on the bitmap; DefaultOutput ends that.

IPLocate and IPColour work on the Rast in use, chosen with Use Rast. The pens of IPColour are also the pens of the text of IPOutput: pen 1 on pen 0 at first, drawn without a background (only the pixels of the characters are set).

The text of IPOutput is drawn with its top left corner at the drawing position of the Rast, which IPLocate sets, and the position then moves on to the end of the text, so the next Print follows it. The line feed of NPrint moves it to the start of the next line. The Rast has no layer, and the library does not clip the text to the bitmap.

BitMap 0,320,64,2
IPBitMap 0,0
Use Rast 0
IPColour 2
IPOutput 0
Print "Hello"
DefaultOutput

The fixed bugs of the library are listed in Fixes in riintuilib.

Library number 15. It manages Rast objects, by default at most 7 (the compiler options set the maximum).

Commands

IPBitMap

Sets up the Rast object rast and gives it the bitmap object bitmap to draw on.

Statement. Help text: rast,bitmap
Arguments: .w, .w

The Rast is set up anew, with the default pens and position; it does not become the Rast in use.

IPColour

Sets the foreground pen, and the background pen if given, of the Rast in use and of the text of IPOutput. A negative pen leaves that pen unchanged.

Statement. Help text: fgpen[,bgpen]
2 forms:

  • .w
  • .w, .w

IPLocate

Moves the drawing position of the Rast in use to x,y.

Statement. Help text: x,y
Arguments: .w, .w

The next text of IPOutput to this Rast is drawn with its top left corner at this position.

IPOutput

Makes the Rast object rast the output channel, so that Print and NPrint draw their text on its bitmap until DefaultOutput or another output command.

Statement. Help text: rast
Arguments: .w

The text is drawn with the pens of the last IPColour and without a background, with its top left corner at the drawing position of the Rast (IPLocate); the position then moves on to the end of the text. The line feed of NPrint moves it to the start of the next line. A text of any length is drawn whole. The Rast does not clip: a text that runs past the right edge of the bitmap goes on in the following rows and, past the last one, into the memory behind the bitmap.

Rast

The object of this library, a RastPort that draws on a bitmap, set up with IPBitMap; Use Rast makes one the Rast in use.

Object name. No help text.