## gfx

All graphics functions.

### Methods

#### inner Box(x1, y1, x2, y2, c)
`doc/internal.js`, `line 274`

  draw a box.

  ##### Parameters:

  Name | Type | Description
  --- | --- | ---
  `x1` | number | start x coordinate.
  `y1` | number | start y coordinate.
  `x2` | number | end x coordinate.
  `y2` | number | end y coordinate.
  `c` | number | color.

#### inner Circle(x, y, r, c)
`doc/internal.js`, `line 283`

  draw a circle.

  ##### Parameters:

  Name | Type | Description
  --- | --- | ---
  `x` | number | x coordinate.
  `y` | number | y coordinate.
  `r` | number | radius.
  `c` | number | color.

#### inner CircleArc(x, y, r, start, end, style, c) → {ArcInfo}
`doc/internal.js`, `line 327`

  Draw a circle arc.

  ##### Parameters:

  Name | Type | Description
  --- | --- | ---
  `x` | number | x coordinate.
  `y` | number | y coordinate.
  `r` | number | radius.
  `start` | number | start angle in tenths of degrees.
  `end` | number | end angle in tenths of degrees.
  `style` | * | value from ARC.
  `c` | number | color.

  ##### Returns:

  ArcInfo - detailed info about the drawn arc.

#### inner ClearScreen(c)
`doc/internal.js`, `line 235`

  clear the screen with given color.

  ##### Parameters:

  Name | Type | Description
  --- | --- | ---
  `c` | number | the color.

#### inner CustomCircle(x, y, r, w, c)
`doc/internal.js`, `line 293`

  draw a circle with given width.

  ##### Parameters:

  Name | Type | Description
  --- | --- | ---
  `x` | number | x coordinate.
  `y` | number | y coordinate.
  `r` | number | radius.
  `w` | number | line width.
  `c` | number | color.

#### inner CustomCircleArc(x, y, r, start, end, style, w, c) → {ArcInfo}
`doc/internal.js`, `line 341`

  Draw a circle arc with given width.

  ##### Parameters:

  Name | Type | Description
  --- | --- | ---
  `x` | number | x coordinate.
  `y` | number | y coordinate.
  `r` | number | radius.
  `start` | number | start angle in tenths of degrees.
  `end` | number | end angle in tenths of degrees.
  `style` | * | value from ARC.
  `w` | number | line width.
  `c` | number | color.

  ##### Returns:

  ArcInfo - detailed info about the drawn arc.

#### inner CustomEllipse(x, y, xr, yr, w, c)
`doc/internal.js`, `line 314`

  draw a ellipse with given width.

  ##### Parameters:

  Name | Type | Description
  --- | --- | ---
  `x` | number | x coordinate.
  `y` | number | y coordinate.
  `xr` | number | radius.
  `yr` | number | radius.
  `w` | number | line width.
  `c` | number | color.

#### inner CustomLine(x1, y1, x2, y2, w, c)
`doc/internal.js`, `line 264`

  draw a line with given width.

  ##### Parameters:

  Name | Type | Description
  --- | --- | ---
  `x1` | number | start x coordinate.
  `y1` | number | start y coordinate.
  `x2` | number | end x coordinate.
  `y2` | number | end y coordinate.
  `w` | number | line width.
  `c` | number | color.

#### inner Ellipse(x, y, xr, yr, c)
`doc/internal.js`, `line 303`

  draw a ellipse.

  ##### Parameters:

  Name | Type | Description
  --- | --- | ---
  `x` | number | x coordinate.
  `y` | number | y coordinate.
  `xr` | number | radius.
  `yr` | number | radius.
  `c` | number | color.

#### inner FilledBox(x1, y1, x2, y2, c)
`doc/internal.js`, `line 351`

  draw a filled box.

  ##### Parameters:

  Name | Type | Description
  --- | --- | ---
  `x1` | number | start x coordinate.
  `y1` | number | start y coordinate.
  `x2` | number | end x coordinate.
  `y2` | number | end y coordinate.
  `c` | number | color.

#### inner FilledCircle(x, y, r, c)
`doc/internal.js`, `line 360`

  draw a filled circle.

  ##### Parameters:

  Name | Type | Description
  --- | --- | ---
  `x` | number | x coordinate.
  `y` | number | y coordinate.
  `r` | number | radius.
  `c` | number | color.

#### inner FilledEllipse(x, y, xr, yr, c)
`doc/internal.js`, `line 370`

  draw a filled ellipse.

  ##### Parameters:

  Name | Type | Description
  --- | --- | ---
  `x` | number | x coordinate.
  `y` | number | y coordinate.
  `xr` | number | radius.
  `yr` | number | radius.
  `c` | number | color.

#### inner FilledPolygon(c, points)
`doc/internal.js`, `line 386`

  draw a filled polygon.

  ##### Parameters:

  Name | Type | Description
  --- | --- | ---
  `c` | number | color.
  `points` | Array.<Array.<number>> | an array of arrays with two coordinates (e.g. [[1, 1], [1, 10], [10, 10], [10, 1]]).

#### inner FloodFill(x, y, bound, c)
`doc/internal.js`, `line 379`

  do a flood fill.

  ##### Parameters:

  Name | Type | Description
  --- | --- | ---
  `x` | number | x coordinate.
  `y` | number | y coordinate.
  `bound` | number | bound color.
  `c` | number | fill color.

#### inner GetPixel(x, y) → {number}
`doc/internal.js`, `line 422`

  get color of on-screen pixel.

  ##### Parameters:

  Name | Type | Description
  --- | --- | ---
  `x` | number | x coordinate.
  `y` | number | y coordinate.

  ##### Returns:

  number - pixel color.

#### inner GetScreenMode() → {number}
`doc/internal.js`, `line 229`

  Get color depth info.

  ##### Returns:

  number - bits per pixel.

#### inner Line(x1, y1, x2, y2, c)
`doc/internal.js`, `line 253`

  draw a line.

  ##### Parameters:

  Name | Type | Description
  --- | --- | ---
  `x1` | number | start x coordinate.
  `y1` | number | start y coordinate.
  `x2` | number | end x coordinate.
  `y2` | number | end y coordinate.
  `c` | number | color.

#### inner Plot(x, y, c)
`doc/internal.js`, `line 243`

  draw a point.

  ##### Parameters:

  Name | Type | Description
  --- | --- | ---
  `x` | number | x coordinate.
  `y` | number | y coordinate.
  `c` | number | color.

#### inner SaveBmpImage(fname)
`doc/internal.js`, `line 402`

  Save current screen to BMP file.

  ##### Parameters:

  Name | Type | Description
  --- | --- | ---
  `fname` | string | filename.

#### inner SavePcxImage(fname)
`doc/internal.js`, `line 408`

  Save current screen to PCX file.

  ##### Parameters:

  Name | Type | Description
  --- | --- | ---
  `fname` | string | filename.

#### inner SaveTgaImage(fname)
`doc/internal.js`, `line 414`

  Save current screen to TGA file.

  ##### Parameters:

  Name | Type | Description
  --- | --- | ---
  `fname` | string | filename.

#### inner SetRenderBitmap(bm)
`doc/internal.js`, `line 211`

  set the current render destination.

  ##### Parameters:

  Name | Type | Description
  --- | --- | ---
  `bm` | Bitmap | A Bitmap to render on or null to use the screen as rendering destination.

#### inner SizeX() → {number}
`doc/internal.js`, `line 217`

  get the width of the drawing area.

  ##### Returns:

  number - the width of the drawing area.

#### inner SizeY() → {number}
`doc/internal.js`, `line 223`

  get the height of the drawing area.

  ##### Returns:

  number - the height of the drawing area.

#### inner TextXY(x, y, text, fg, bg)
`doc/internal.js`, `line 396`

  Draw a text with the default font.

  ##### Parameters:

  Name | Type | Description
  --- | --- | ---
  `x` | number | x coordinate.
  `y` | number | y coordinate.
  `text` | * | the text to display.
  `fg` | number | foreground color.
  `bg` | number | background color.

#### inner TransparencyEnabled(en)
`doc/internal.js`, `line 428`

  Enable/disable the transparency when drawing.

  ##### Parameters:

  Name | Type | Description
  --- | --- | ---
  `en` | boolean | true to enable transparency when drawing (might slow down drawing).