Clear

From ZDoom Wiki
Jump to navigation Jump to search
Note: This feature is for ZScript only.


Screen

native static void Clear(int left, int top, int right, int bottom, Color color, int palcolor = -1)

Usage

Completely fills the specified bounding box with the color provided. If alpha blending is desired then Dim should be used instead. Coordinates are absolute and start from the top left of the screen with positive x values shifting to the right and positive y values shifting downward. bottom - top will give the real pixel height of the box and right - left will give the real pixel width of the box.

Warning: This can only be called from within functions that are specifically designed to draw HUD elements (e.g. BaseStatusBar's Draw or EventHandler's RenderOverlay).

Parameters

  • left - The furthest left point of the box to draw in
  • top - The highest point of the box to draw in
  • right - The furthest right point of the box to draw in
  • bottom - The lowest point of the box to draw in
  • color - The color to fill the area of the box with
  • palcolor - Default is -1. The index for a palette color to make use of instead of a gamma corrected one. Only used if color is not provided (i.e. a value of 0 is passed to it)

Examples

Nuvolachalk.png Note: This article lists no examples. If you make use of this feature in your own project(s) or know of any basic examples that could be shared, please add them. This will make it easier to understand for future authors seeking assistance. Your contributions are greatly appreciated.