Device 9 Details

Device 9 Details

Top  Previous  Next

Device 9 displays enhanced characters instead of the raster graphic fonts used for the standard VGA display. This provides full control of the position of the text down to the pixel level. This means that text can be written to any location on the screen, not just to character cell positions. It also provides full control over the text attributes, text color and background color.

 

Like device 6, only carriage return and line feed are handled. Unlike other devices, the output characters aren't stored in the screen buffer and you cannot set or read the characters or attribtues. This also means that characters cannot be deleted from the screen by deleting them from the screen buffer.

 

VGA Screen. Since device 9 uses the simulated VGA screen, font attributes and colors are set using the Extended Graphics intrinsics. Because the VGA screen is specified by a handle of -1, you must you use a -1 handle with the Extended Graphics intrinsics.

 

Text Position. The text position is controlled by the current pen position. The pen position is set by the Move, Line and Dot standard intriniscs. It is also controlled by the MoveTo and LineTo Extended Intinsics.

 

Text Colors and Transparency. The font color is controlled by the SetFontColor intrinsic. The font background color and opacity/transparency is controlled by the SetFill extended intrinsic.

 

Text Attributes.Text Attributes are controlled by the SetFontFace and SetFontStyle extended intrinsics.

 

Note: If you use italic characters with a non-transparent background, the output speed will be significantly slower. This is because EXPL outputs individual characters separately, and italic characters overlap. That means EXPL must carefully measure character widths so the background from one character doesn't paint over the previous character.

 

You can speed up Italic font output several ways. If you use the SetFill extended intrinsic to set the background to be transparent, EXPL doesn't need to deal with the overlapping character backgrounds, and the text will be output at full speed. You can also use the TextOut extended intrinsic. It doesn't output characters one at a time, so it operates a full speed no matter how the background is set.

 

Click here Device 9 Example Code.