|
wx_BGI_Graphics
Classic BGI-compatible graphics API with modern OpenGL extension API
|
Borland-style graphics compatibility entry points. More...
Functions | |
| BGI_API void BGI_CALL | arc (int x, int y, int stangle, int endangle, int radius) |
| Draws a circular arc. | |
| BGI_API void BGI_CALL | bar (int left, int top, int right, int bottom) |
| Draws a filled rectangle using the active fill style/color. | |
| BGI_API void BGI_CALL | bar3d (int left, int top, int right, int bottom, int depth, int topflag) |
| Draws a pseudo-3D filled rectangle. | |
| BGI_API void BGI_CALL | circle (int x, int y, int radius) |
| Draws a circle outline. | |
| BGI_API void BGI_CALL | cleardevice (void) |
| Clears the full active drawing page to background color. | |
| BGI_API void BGI_CALL | clearviewport (void) |
| Clears only the active viewport region to background color. | |
| BGI_API void BGI_CALL | closegraph (void) |
| Closes graphics window/context and releases associated resources. | |
| BGI_API void BGI_CALL | delay (int millisec) |
| Sleeps for the requested duration in milliseconds. | |
| BGI_API void BGI_CALL | detectgraph (int *graphdriver, int *graphmode) |
| Detects/initializes default graph driver and mode values. | |
| BGI_API void BGI_CALL | drawpoly (int numpoints, const int *polypoints) |
| Draws a polygon outline from an array of x/y point pairs. | |
| BGI_API void BGI_CALL | ellipse (int x, int y, int stangle, int endangle, int xradius, int yradius) |
| Draws an elliptical arc between start and end angles. | |
| BGI_API void BGI_CALL | fillellipse (int x, int y, int xradius, int yradius) |
| Draws and fills an ellipse using current fill settings. | |
| BGI_API void BGI_CALL | fillpoly (int numpoints, const int *polypoints) |
| Fills a polygon interior from an array of x/y point pairs. | |
| BGI_API void BGI_CALL | floodfill (int x, int y, int border) |
| Flood-fills a region until the border color is reached. | |
| BGI_API int BGI_CALL | getactivepage (void) |
| Returns the currently selected active page index. | |
| BGI_API void BGI_CALL | getarccoords (bgi::arccoordstype *arccoords) |
| Retrieves cached arc endpoint coordinates from the last arc-like call. | |
| BGI_API void BGI_CALL | getaspectratio (int *xasp, int *yasp) |
| Returns current aspect ratio numerators for x/y scaling. | |
| BGI_API int BGI_CALL | getbkcolor (void) |
| Returns the current background color index. | |
| BGI_API int BGI_CALL | getcolor (void) |
| Returns the current drawing color index. | |
| BGI_API bgi::palettetype *BGI_CALL | getdefaultpalette (void) |
| Returns a pointer to the default palette mapping. | |
| BGI_API char *BGI_CALL | getdrivername (void) |
| Returns the active graphics driver name string. | |
| BGI_API void BGI_CALL | getfillpattern (char *pattern) |
Copies the current 8x8 fill pattern mask into pattern. | |
| BGI_API void BGI_CALL | getfillsettings (bgi::fillsettingstype *fillinfo) |
| Retrieves current fill pattern id and fill color. | |
| BGI_API int BGI_CALL | getgraphmode (void) |
| Returns the current graph mode id. | |
| BGI_API void BGI_CALL | getimage (int left, int top, int right, int bottom, void *bitmap) |
| Captures a rectangular image into a BGI image buffer. | |
| BGI_API void BGI_CALL | getlinesettings (bgi::linesettingstype *lineinfo) |
| Retrieves current line style, user pattern, and thickness. | |
| BGI_API int BGI_CALL | getmaxcolor (void) |
| Returns the highest valid palette color index. | |
| BGI_API int BGI_CALL | getmaxheight (void) |
| Returns the maximum window height supported by current mode. | |
| BGI_API int BGI_CALL | getmaxmode (void) |
| Returns the highest valid graphics mode identifier. | |
| BGI_API int BGI_CALL | getmaxwidth (void) |
| Returns the maximum window width supported by current mode. | |
| BGI_API int BGI_CALL | getmaxx (void) |
| Returns the maximum x coordinate in the current viewport. | |
| BGI_API int BGI_CALL | getmaxy (void) |
| Returns the maximum y coordinate in the current viewport. | |
| BGI_API char *BGI_CALL | getmodename (int mode_number) |
Returns a human-readable mode name for mode_number. | |
| BGI_API void BGI_CALL | getmoderange (int graphdriver, int *lomode, int *himode) |
| Returns the valid mode range for a given driver. | |
| BGI_API void BGI_CALL | getpalette (bgi::palettetype *palette) |
| Retrieves the currently active palette mapping. | |
| BGI_API int BGI_CALL | getpalettesize (void) |
| Returns the number of entries in the active palette. | |
| BGI_API int BGI_CALL | getpixel (int x, int y) |
| Returns the color index of a pixel in viewport coordinates. | |
| BGI_API void BGI_CALL | gettextsettings (bgi::textsettingstype *texttypeinfo) |
| Retrieves current text font, direction, size, and justification settings. | |
| BGI_API void BGI_CALL | getviewsettings (bgi::viewporttype *viewport) |
| Returns the current viewport bounds and clip mode. | |
| BGI_API int BGI_CALL | getvisualpage (void) |
| Returns the currently selected visual page index. | |
| BGI_API int BGI_CALL | getwindowheight (void) |
| Returns current graphics window height. | |
| BGI_API int BGI_CALL | getwindowwidth (void) |
| Returns current graphics window width. | |
| BGI_API int BGI_CALL | getx (void) |
| Returns current pen x position. | |
| BGI_API int BGI_CALL | gety (void) |
| Returns current pen y position. | |
| BGI_API void BGI_CALL | graphdefaults (void) |
| Resets drawing state to BGI defaults while keeping the window open. | |
| BGI_API char *BGI_CALL | grapherrormsg (int errorcode) |
| Returns a text message for a graph subsystem error code. | |
| BGI_API int BGI_CALL | graphresult (void) |
| Returns the most recent graph subsystem status code. | |
| BGI_API unsigned BGI_CALL | imagesize (int left, int top, int right, int bottom) |
| Returns the required byte size for a BGI image buffer region. | |
| BGI_API void BGI_CALL | initgraph (int *graphdriver, int *graphmode, char *pathtodriver) |
| Initializes graphics using driver/mode pointers and optional driver path. | |
| BGI_API int BGI_CALL | initwindow (int width, int height, const char *title, int left, int top, int dbflag, int closeflag) |
| Creates and initializes a graphics window and context. | |
| BGI_API int BGI_CALL | installuserdriver (char *name, void *detect) |
| Compatibility hook for installing a user graphics driver. | |
| BGI_API int BGI_CALL | installuserfont (char *name) |
| Compatibility hook for installing a user font. | |
| BGI_API void BGI_CALL | line (int x1, int y1, int x2, int y2) |
| Draws a line between two points. | |
| BGI_API void BGI_CALL | linerel (int dx, int dy) |
| Draws a line relative to current pen position and updates pen. | |
| BGI_API void BGI_CALL | lineto (int x, int y) |
| Draws a line to absolute coordinates from current pen position. | |
| BGI_API void BGI_CALL | moverel (int dx, int dy) |
| Moves pen position by relative delta without drawing. | |
| BGI_API void BGI_CALL | moveto (int x, int y) |
| Moves pen position to absolute coordinates without drawing. | |
| BGI_API void BGI_CALL | outtext (char *textstring) |
| Renders text at current pen position and advances the pen. | |
| BGI_API void BGI_CALL | outtextxy (int x, int y, char *textstring) |
| Renders text at explicit x/y coordinates. | |
| BGI_API void BGI_CALL | pieslice (int x, int y, int stangle, int endangle, int radius) |
| Draws and fills a pie-slice sector. | |
| BGI_API void BGI_CALL | putimage (int left, int top, void *bitmap, int op) |
| Draws an encoded BGI image buffer onto the active page. | |
| BGI_API void BGI_CALL | putpixel (int x, int y, int color) |
| Writes one pixel using current write mode semantics. | |
| BGI_API void BGI_CALL | rectangle (int left, int top, int right, int bottom) |
| Draws a rectangle outline. | |
| BGI_API int BGI_CALL | registerbgidriver (void(*driver)(void)) |
| Compatibility registration for a BGI driver callback. | |
| BGI_API int BGI_CALL | registerbgifont (void(*font)(void)) |
| Compatibility registration for a BGI font callback. | |
| BGI_API void BGI_CALL | restorecrtmode (void) |
| Restores text/console mode by closing graphics resources. | |
| BGI_API void BGI_CALL | sector (int x, int y, int stangle, int endangle, int xradius, int yradius) |
| Draws and fills an elliptical sector. | |
| BGI_API void BGI_CALL | setactivepage (int page) |
| Selects which page receives drawing commands. | |
| BGI_API void BGI_CALL | setallpalette (const bgi::palettetype *palette) |
| Replaces entire palette mapping from a supplied palette structure. | |
| BGI_API void BGI_CALL | setaspectratio (int xasp, int yasp) |
| Sets aspect ratio numerators used by BGI geometry/text scaling. | |
| BGI_API void BGI_CALL | setbkcolor (int color) |
| Sets background color index used by clear operations. | |
| BGI_API void BGI_CALL | setcolor (int color) |
| Sets active drawing color index. | |
| BGI_API void BGI_CALL | setfillpattern (char *upattern, int color) |
| Installs a custom 8x8 fill pattern and associated fill color. | |
| BGI_API void BGI_CALL | setfillstyle (int pattern, int color) |
| Sets predefined fill pattern and fill color. | |
| BGI_API unsigned BGI_CALL | setgraphbufsize (unsigned bufsize) |
| Sets internal graph buffer size hint and returns previous value. | |
| BGI_API void BGI_CALL | setgraphmode (int mode) |
| Sets active graph mode identifier. | |
| BGI_API void BGI_CALL | setlinestyle (int linestyle, unsigned upattern, int thickness) |
| Sets line style, user bit pattern, and thickness. | |
| BGI_API void BGI_CALL | setpalette (int colornum, int color) |
| Maps a palette slot to a BGI color index. | |
| BGI_API void BGI_CALL | setrgbpalette (int colornum, int red, int green, int blue) |
| Sets true RGB value for a palette slot. | |
| BGI_API void BGI_CALL | settextjustify (int horiz, int vert) |
| Sets horizontal/vertical text justification mode. | |
| BGI_API void BGI_CALL | settextstyle (int font, int direction, int charsize) |
| Sets text font family, direction, and character size. | |
| BGI_API void BGI_CALL | setusercharsize (int multx, int divx, int multy, int divy) |
| Sets user character scaling fractions for x/y text axes. | |
| BGI_API void BGI_CALL | setviewport (int left, int top, int right, int bottom, int clip) |
| Sets viewport bounds and optional clipping behavior. | |
| BGI_API void BGI_CALL | setvisualpage (int page) |
| Selects which page is displayed by flush/swap operations. | |
| BGI_API void BGI_CALL | setwritemode (int mode) |
| Sets pixel write mode (copy/xor/or/and/not). | |
| BGI_API int BGI_CALL | swapbuffers (void) |
| Swaps active and visual pages for double-buffer style drawing. | |
| BGI_API int BGI_CALL | textheight (char *textstring) |
| Returns text height in pixels for current text settings. | |
| BGI_API int BGI_CALL | textwidth (char *textstring) |
| Returns text width in pixels for current text settings. | |
Borland-style graphics compatibility entry points.
Draws a circular arc.
Draws a filled rectangle using the active fill style/color.
Draws a pseudo-3D filled rectangle.
Clears only the active viewport region to background color.
Closes graphics window/context and releases associated resources.
Detects/initializes default graph driver and mode values.
Draws a polygon outline from an array of x/y point pairs.
Draws an elliptical arc between start and end angles.
Draws and fills an ellipse using current fill settings.
Fills a polygon interior from an array of x/y point pairs.
Flood-fills a region until the border color is reached.
| BGI_API void BGI_CALL getarccoords | ( | bgi::arccoordstype * | arccoords | ) |
Retrieves cached arc endpoint coordinates from the last arc-like call.
Returns current aspect ratio numerators for x/y scaling.
| BGI_API bgi::palettetype *BGI_CALL getdefaultpalette | ( | void | ) |
Returns a pointer to the default palette mapping.
Copies the current 8x8 fill pattern mask into pattern.
| BGI_API void BGI_CALL getfillsettings | ( | bgi::fillsettingstype * | fillinfo | ) |
Retrieves current fill pattern id and fill color.
Captures a rectangular image into a BGI image buffer.
| BGI_API void BGI_CALL getlinesettings | ( | bgi::linesettingstype * | lineinfo | ) |
Retrieves current line style, user pattern, and thickness.
Returns the maximum window height supported by current mode.
Returns the maximum window width supported by current mode.
Returns a human-readable mode name for mode_number.
Returns the valid mode range for a given driver.
| BGI_API void BGI_CALL getpalette | ( | bgi::palettetype * | palette | ) |
Retrieves the currently active palette mapping.
Returns the color index of a pixel in viewport coordinates.
| BGI_API void BGI_CALL gettextsettings | ( | bgi::textsettingstype * | texttypeinfo | ) |
Retrieves current text font, direction, size, and justification settings.
| BGI_API void BGI_CALL getviewsettings | ( | bgi::viewporttype * | viewport | ) |
Returns the current viewport bounds and clip mode.
Resets drawing state to BGI defaults while keeping the window open.
Returns a text message for a graph subsystem error code.
Returns the required byte size for a BGI image buffer region.
Initializes graphics using driver/mode pointers and optional driver path.
| BGI_API int BGI_CALL initwindow | ( | int | width, |
| int | height, | ||
| const char * | title, | ||
| int | left, | ||
| int | top, | ||
| int | dbflag, | ||
| int | closeflag | ||
| ) |
Creates and initializes a graphics window and context.
Compatibility hook for installing a user graphics driver.
Draws a line relative to current pen position and updates pen.
Draws a line to absolute coordinates from current pen position.
Moves pen position by relative delta without drawing.
Moves pen position to absolute coordinates without drawing.
Renders text at current pen position and advances the pen.
Renders text at explicit x/y coordinates.
Draws and fills a pie-slice sector.
Draws an encoded BGI image buffer onto the active page.
Writes one pixel using current write mode semantics.
Draws a rectangle outline.
Compatibility registration for a BGI driver callback.
Compatibility registration for a BGI font callback.
Restores text/console mode by closing graphics resources.
Draws and fills an elliptical sector.
| BGI_API void BGI_CALL setallpalette | ( | const bgi::palettetype * | palette | ) |
Replaces entire palette mapping from a supplied palette structure.
Sets aspect ratio numerators used by BGI geometry/text scaling.
Installs a custom 8x8 fill pattern and associated fill color.
Sets predefined fill pattern and fill color.
Sets internal graph buffer size hint and returns previous value.
Sets line style, user bit pattern, and thickness.
Maps a palette slot to a BGI color index.
Sets true RGB value for a palette slot.
Sets horizontal/vertical text justification mode.
Sets text font family, direction, and character size.
Sets user character scaling fractions for x/y text axes.
Sets viewport bounds and optional clipping behavior.
Selects which page is displayed by flush/swap operations.
Swaps active and visual pages for double-buffer style drawing.
Returns text height in pixels for current text settings.