# unit fastgraph

### Unit to handle screen graphics, accelerated bitmap modes

author: Tomasz Biela (Tebe/Madteam)

http://www.freepascal.org/docs-html/rtl/graph/index-5.html
Marcin Żukowski (Eru/TQA): fLine

## Constants:

name: | value: | description:
--- | --- | ---
tlshc: array [0..15] of byte | ($03,$02,$02,$01,$01,$02,$02,$03,$03,$03,$03,$03,$03,$03,$02,$03) | $EE6D: Table Left SHift Columns
tmccn: array [0..15] of byte | ($28,$14,$14,$28,$50,$50,$A0,$A0,$40,$50,$50,$50,$28,$28,$A0,$A0) | $EE7D: Table Mode Column CouNts
tmrcn: array [0..15] of byte | ($18,$18,$0C,$18,$30,$30,$60,$60,$C0,$C0,$C0,$C0,$18,$0C,$C0,$C0) | $EE8D: Table Mode Row CouNts

## Interface:

name: | description:
--- | ---
SetBkColor | #### procedure SetBkColor(color: byte); assembler; Sets the background color to Color
SetColor | #### procedure SetColor(color: byte); assembler; Sets the foreground color to Color
PutPixel | #### procedure PutPixel(x,y: smallint); assembler; register; Puts a point at (X,Y) using color Color
GetPixel | #### function GetPixel(x,y: smallint): byte; assembler; Return color of pixel
Line | #### procedure Line(x1,y1,x2,y2: smallint); Bresenham line
Hline | #### procedure Hline(x0,x1,y: smallint); Draw horizintal line, fast as possible
fLine | #### procedure fLine(x0,y0,x1,y1: byte); assembler; DRAWTO in Graphics 8, 9, 15 A quick hack by eru
Scanline | #### function Scanline(y: smallint): PByte;
LineTo | #### procedure LineTo(x, y: smallint); Draw a line starting from current position to a given point
fRectangle | #### procedure fRectangle(x1, y1, x2, y2: Smallint); Draws a rectangle with corners at (X1,Y1) and (X2,Y2), using the current color and style
SetActiveBuffer | #### procedure SetActiveBuffer(a: word); assembler; overload;
SetActiveBuffer | #### procedure SetActiveBuffer(var a: TDisplayBuffer); overload;
InitGraph | #### procedure InitGraph(mode: byte); overload; Init graphics mode