wx_BGI_Graphics
Classic BGI-compatible graphics API with modern OpenGL extension API
Loading...
Searching...
No Matches
wx_bgi.h
Go to the documentation of this file.
1#pragma once
2
3#include "bgi_types.h"
4
16BGI_API void BGI_CALL arc(int x, int y, int stangle, int endangle, int radius);
18BGI_API void BGI_CALL bar(int left, int top, int right, int bottom);
20BGI_API void BGI_CALL bar3d(int left, int top, int right, int bottom, int depth, int topflag);
22BGI_API void BGI_CALL circle(int x, int y, int radius);
30BGI_API void BGI_CALL delay(int millisec);
32BGI_API void BGI_CALL detectgraph(int *graphdriver, int *graphmode);
34BGI_API void BGI_CALL drawpoly(int numpoints, const int *polypoints);
36BGI_API void BGI_CALL ellipse(int x, int y, int stangle, int endangle, int xradius, int yradius);
38BGI_API void BGI_CALL fillellipse(int x, int y, int xradius, int yradius);
40BGI_API void BGI_CALL fillpoly(int numpoints, const int *polypoints);
42BGI_API void BGI_CALL floodfill(int x, int y, int border);
48BGI_API void BGI_CALL getaspectratio(int *xasp, int *yasp);
58BGI_API void BGI_CALL getfillpattern(char *pattern);
64BGI_API void BGI_CALL getimage(int left, int top, int right, int bottom, void *bitmap);
80BGI_API char *BGI_CALL getmodename(int mode_number);
82BGI_API void BGI_CALL getmoderange(int graphdriver, int *lomode, int *himode);
88BGI_API int BGI_CALL getpixel(int x, int y);
106BGI_API char *BGI_CALL grapherrormsg(int errorcode);
110BGI_API unsigned BGI_CALL imagesize(int left, int top, int right, int bottom);
112BGI_API void BGI_CALL initgraph(int *graphdriver, int *graphmode, char *pathtodriver);
114BGI_API int BGI_CALL initwindow(int width, int height, const char *title, int left, int top, int dbflag, int closeflag);
116BGI_API int BGI_CALL installuserdriver(char *name, void *detect);
120BGI_API void BGI_CALL line(int x1, int y1, int x2, int y2);
122BGI_API void BGI_CALL linerel(int dx, int dy);
124BGI_API void BGI_CALL lineto(int x, int y);
126BGI_API void BGI_CALL moverel(int dx, int dy);
128BGI_API void BGI_CALL moveto(int x, int y);
130BGI_API void BGI_CALL outtext(char *textstring);
132BGI_API void BGI_CALL outtextxy(int x, int y, char *textstring);
134BGI_API void BGI_CALL pieslice(int x, int y, int stangle, int endangle, int radius);
136BGI_API void BGI_CALL putimage(int left, int top, void *bitmap, int op);
138BGI_API void BGI_CALL putpixel(int x, int y, int color);
140BGI_API void BGI_CALL rectangle(int left, int top, int right, int bottom);
142BGI_API int BGI_CALL registerbgidriver(void (*driver)(void));
144BGI_API int BGI_CALL registerbgifont(void (*font)(void));
148BGI_API void BGI_CALL sector(int x, int y, int stangle, int endangle, int xradius, int yradius);
154BGI_API void BGI_CALL setaspectratio(int xasp, int yasp);
158BGI_API void BGI_CALL setcolor(int color);
160BGI_API void BGI_CALL setfillpattern(char *upattern, int color);
162BGI_API void BGI_CALL setfillstyle(int pattern, int color);
164BGI_API unsigned BGI_CALL setgraphbufsize(unsigned bufsize);
168BGI_API void BGI_CALL setlinestyle(int linestyle, unsigned upattern, int thickness);
170BGI_API void BGI_CALL setpalette(int colornum, int color);
172BGI_API void BGI_CALL setrgbpalette(int colornum, int red, int green, int blue);
174BGI_API void BGI_CALL settextjustify(int horiz, int vert);
176BGI_API void BGI_CALL settextstyle(int font, int direction, int charsize);
178BGI_API void BGI_CALL setusercharsize(int multx, int divx, int multy, int divy);
180BGI_API void BGI_CALL setviewport(int left, int top, int right, int bottom, int clip);
188BGI_API int BGI_CALL textheight(char *textstring);
190BGI_API int BGI_CALL textwidth(char *textstring);
191
#define BGI_CALL
Definition bgi_types.h:20
#define BGI_API
Definition bgi_types.h:14
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 unsigned BGI_CALL setgraphbufsize(unsigned bufsize)
Sets internal graph buffer size hint and returns previous value.
BGI_API void BGI_CALL setpalette(int colornum, int color)
Maps a palette slot to a BGI color index.
BGI_API int BGI_CALL registerbgidriver(void(*driver)(void))
Compatibility registration for a BGI driver callback.
BGI_API char *BGI_CALL grapherrormsg(int errorcode)
Returns a text message for a graph subsystem error code.
BGI_API void BGI_CALL gettextsettings(bgi::textsettingstype *texttypeinfo)
Retrieves current text font, direction, size, and justification settings.
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 setcolor(int color)
Sets active drawing color index.
BGI_API void BGI_CALL setwritemode(int mode)
Sets pixel write mode (copy/xor/or/and/not).
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 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 getfillsettings(bgi::fillsettingstype *fillinfo)
Retrieves current fill pattern id and fill color.
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 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 setvisualpage(int page)
Selects which page is displayed by flush/swap operations.
BGI_API int BGI_CALL getmaxy(void)
Returns the maximum y coordinate in the current viewport.
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 circle(int x, int y, int radius)
Draws a circle outline.
BGI_API void BGI_CALL getpalette(bgi::palettetype *palette)
Retrieves the currently active palette mapping.
BGI_API int BGI_CALL installuserdriver(char *name, void *detect)
Compatibility hook for installing a user graphics driver.
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 int BGI_CALL getcolor(void)
Returns the current drawing color index.
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 getarccoords(bgi::arccoordstype *arccoords)
Retrieves cached arc endpoint coordinates from the last arc-like call.
BGI_API int BGI_CALL getmaxcolor(void)
Returns the highest valid palette color index.
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 setrgbpalette(int colornum, int red, int green, int blue)
Sets true RGB value for a palette slot.
BGI_API void BGI_CALL getfillpattern(char *pattern)
Copies the current 8x8 fill pattern mask into pattern.
BGI_API void BGI_CALL detectgraph(int *graphdriver, int *graphmode)
Detects/initializes default graph driver and mode values.
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 int BGI_CALL getpalettesize(void)
Returns the number of entries in the active palette.
BGI_API int BGI_CALL getmaxmode(void)
Returns the highest valid graphics mode identifier.
BGI_API int BGI_CALL graphresult(void)
Returns the most recent graph subsystem status code.
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 setviewport(int left, int top, int right, int bottom, int clip)
Sets viewport bounds and optional clipping behavior.
BGI_API int BGI_CALL textwidth(char *textstring)
Returns text width in pixels for current text settings.
BGI_API int BGI_CALL getmaxwidth(void)
Returns the maximum window width supported by current mode.
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 rectangle(int left, int top, int right, int bottom)
Draws a rectangle outline.
BGI_API int BGI_CALL swapbuffers(void)
Swaps active and visual pages for double-buffer style drawing.
BGI_API void BGI_CALL setbkcolor(int color)
Sets background color index used by clear operations.
BGI_API void BGI_CALL getlinesettings(bgi::linesettingstype *lineinfo)
Retrieves current line style, user pattern, and thickness.
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 getviewsettings(bgi::viewporttype *viewport)
Returns the current viewport bounds and clip mode.
BGI_API int BGI_CALL getwindowwidth(void)
Returns current graphics window width.
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 int BGI_CALL getx(void)
Returns current pen x position.
BGI_API void BGI_CALL clearviewport(void)
Clears only the active viewport region to background color.
BGI_API void BGI_CALL setallpalette(const bgi::palettetype *palette)
Replaces entire palette mapping from a supplied palette structure.
BGI_API int BGI_CALL getmaxx(void)
Returns the maximum x coordinate in the current viewport.
BGI_API void BGI_CALL outtext(char *textstring)
Renders text at current pen position and advances the pen.
BGI_API int BGI_CALL gety(void)
Returns current pen y position.
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 textheight(char *textstring)
Returns text height in pixels for current text settings.
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 setgraphmode(int mode)
Sets active graph mode identifier.
BGI_API void BGI_CALL moverel(int dx, int dy)
Moves pen position by relative delta without drawing.
BGI_API bgi::palettetype *BGI_CALL getdefaultpalette(void)
Returns a pointer to the default palette mapping.
BGI_API void BGI_CALL restorecrtmode(void)
Restores text/console mode by closing graphics resources.
BGI_API int BGI_CALL getgraphmode(void)
Returns the current graph mode id.
BGI_API int BGI_CALL registerbgifont(void(*font)(void))
Compatibility registration for a BGI font callback.
BGI_API void BGI_CALL settextjustify(int horiz, int vert)
Sets horizontal/vertical text justification mode.
BGI_API char *BGI_CALL getmodename(int mode_number)
Returns a human-readable mode name for mode_number.
BGI_API void BGI_CALL graphdefaults(void)
Resets drawing state to BGI defaults while keeping the window open.
BGI_API void BGI_CALL getaspectratio(int *xasp, int *yasp)
Returns current aspect ratio numerators for x/y scaling.
BGI_API char *BGI_CALL getdrivername(void)
Returns the active graphics driver name string.
BGI_API void BGI_CALL closegraph(void)
Closes graphics window/context and releases associated resources.
BGI_API int BGI_CALL getbkcolor(void)
Returns the current background color index.
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 delay(int millisec)
Sleeps for the requested duration in milliseconds.
BGI_API int BGI_CALL installuserfont(char *name)
Compatibility hook for installing a user font.
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 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 moveto(int x, int y)
Moves pen position to absolute coordinates without drawing.
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 line(int x1, int y1, int x2, int y2)
Draws a line between two points.
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 void BGI_CALL setactivepage(int page)
Selects which page receives drawing commands.
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 int BGI_CALL getwindowheight(void)
Returns current graphics window height.
BGI_API void BGI_CALL outtextxy(int x, int y, char *textstring)
Renders text at explicit x/y coordinates.
BGI_API void BGI_CALL setfillstyle(int pattern, int color)
Sets predefined fill pattern and fill color.
BGI_API void BGI_CALL settextstyle(int font, int direction, int charsize)
Sets text font family, direction, and character size.
BGI_API int BGI_CALL getvisualpage(void)
Returns the currently selected visual page index.
BGI_API int BGI_CALL getmaxheight(void)
Returns the maximum window height supported by current mode.
BGI_API void BGI_CALL cleardevice(void)
Clears the full active drawing page to background color.
Definition bgi_types.h:251
Definition bgi_types.h:261
Definition bgi_types.h:267
Definition bgi_types.h:274
Definition bgi_types.h:280
Definition bgi_types.h:289