#include <base.h>
Inheritance diagram for fgl::FGDrawBuffer:


alpha.cpp, and mandel.cpp.
Public Types | |
| enum | ObjectType { WINDOW = 0x4000, CHECKBUTTON, PUSHBUTTON, POINTBUTTON, EDITBOX, PROGRESSBAR, BASEMENU, BASEMENUITEM, MENUWINDOW, SLIDEBAR, MULTILINEEDIT, LISTBOX, LABEL, WINDOWPANEL, BMP_FILE, BMP_IMAGE, BMP_MEM, ROOTWINDOW, FGFRAMEBUFFER, COMBOBOX, WINDOWTEXT, WINDOWIMAGE, PUSHBUTTON_IMAGE, BMP_NONE = 0 } |
Public Member Functions | |
| void | save_state (void) |
| void | restore_state (void) |
| FGPixel *__fastcall | CalcAddr (int x, int y) |
| void __fastcall | Resize (int dx, int dy) |
| long __fastcall | GetStatus (void) const |
| void __fastcall | set_font (int font_id) |
| int __fastcall | get_font (void) |
| int __fastcall | textwidth (const char *text) |
| int __fastcall | textwidth (char *txt, int cnt) |
| int __fastcall | charwidth (int c) |
| int __fastcall | GetFontW (void) |
| int __fastcall | GetFontH (void) |
| unsigned __fastcall | set_ppop (unsigned op) |
| void __fastcall | set_fcolor (FGPixel val) |
| void __fastcall | set_bcolor (FGPixel val) |
| void __fastcall | set_colors (FGPixel i, FGPixel p) |
| int __fastcall | GetId (void) const |
| bool __fastcall | set_clip_rect (int xx, int yy, int ww, int hh) |
| void __fastcall | get_clip_rect (int &x, int &y, int &w, int &h) |
| FGDrawBuffer (int ww=0, int hh=0, ObjectType=BMP_MEM, int color=CBLACK, FGPixel *buf=0) | |
| FGDrawBuffer (int ww, int hh, FGPixel *buf) | |
| FGDrawBuffer (FGDrawBuffer &) | |
| virtual | ~FGDrawBuffer () |
| int __fastcall | bitblit (int xdst, int ydst, int xsrc, int ysrc, int ww, int hh, class FGDrawBuffer *src, int opcia=BITBLIT_COPY) |
| int __fastcall | hline (int x, int y, int size, FGPixel color) |
| int __fastcall | vline (int x, int y, int size, FGPixel color) |
| void __fastcall | moveto (int x, int y) |
| int __fastcall | line (int x, int y, int x2, int y2, unsigned color=UNDEFINED_COLOR) |
| int __fastcall | lineto (int x, int y, unsigned color=UNDEFINED_COLOR) |
| int __fastcall | pline (int x1, int y1, int x2, int y2, FGPattern *p) |
| void __fastcall | spline (FGPoint points[4], unsigned color=UNDEFINED_COLOR) |
| int __fastcall | rect (int xdst, int ydst, int ww, int hh, unsigned color=UNDEFINED_COLOR) |
| int __fastcall | box (int xdst, int ydst, int ww, int hh, unsigned color=UNDEFINED_COLOR) |
| int __fastcall | text (int x, int y, const char *txt, unsigned i=UNDEFINED_COLOR, unsigned p=UNDEFINED_COLOR) |
| int | printf (int, int, const char *,...) |
| int __fastcall | putpixel (int x, int y, unsigned color=UNDEFINED_COLOR) |
| int __fastcall | getpixel (int x, int y) |
| void __fastcall | stretch (int _w, int _h) |
| void __fastcall | stretch (double ratiox, double ratioy) |
| int __fastcall | arc (int x, int y, double ang1, double ang2, int r, unsigned color=UNDEFINED_COLOR) |
| int __fastcall | arc2 (int x, int y, int ang1, int ang2, int r, unsigned color=UNDEFINED_COLOR) |
| int __fastcall | ellipse (int x, int y, int rx, int ry, unsigned color=UNDEFINED_COLOR) |
| int __fastcall | fellipse (int x, int y, int rx, int ry, unsigned color=UNDEFINED_COLOR) |
| int __fastcall | circle (int xs, int ys, int r, unsigned color=UNDEFINED_COLOR) |
| int __fastcall | fcircle (int xs, int ys, int r, unsigned color=UNDEFINED_COLOR) |
| void __fastcall | polygon (const FGPointArray &vertices, unsigned color=UNDEFINED_COLOR) |
| FGRect __fastcall | fpolygon (const FGPointArray &vertices, unsigned color=UNDEFINED_COLOR) |
| FGRect __fastcall | ftriangle (int x1, int y1, int x2, int y2, int x3, int y3, unsigned color=UNDEFINED_COLOR) |
| FGPixel *__fastcall | GetArray (void) const |
| unsigned __fastcall | GetAlpha (void) const |
| FGPixel __fastcall | GetInk (void) const |
| FGPixel __fastcall | GetPaper (void) const |
| int __fastcall | GetW (void) const |
| int __fastcall | GetH (void) const |
| int __fastcall | GetXW (void) const |
| int __fastcall | GetYW (void) const |
| int __fastcall | GetWW (void) const |
| int __fastcall | GetHW (void) const |
| enum ObjectType __fastcall | GetType (void) const |
| unsigned __fastcall | GetColorKey (void) const |
| char *__fastcall | GetName (void) const |
| void __fastcall | SetColorKey (unsigned ck) |
| void __fastcall | SetName (const char *s) |
| void __fastcall | SetAlpha (unsigned a) |
| void __fastcall | clear (int color) |
| void __fastcall | rotate (ENUM_ROTATE_DIRECTION direction) |
Protected Member Functions | |
| FGPixel *__fastcall | SetArray (FGPixel *array) |
| FGDrawBuffer (int ww, int hh, const char *nm, ObjectType t, FGPixel i, FGPixel p) | |
| void __fastcall | SetStatus (long s) |
| int __fastcall | clip (int &xr, int &yr, int &wr, int &hr) |
| int __fastcall | clip_shape (int &xr, int &yr, int &wr, int &hr) |
| void __fastcall | modify_point (FGPixel *ptr, FGPixel ink) |
| void | __line (int, int, int, int, unsigned color) |
Static Protected Member Functions | |
| static int __fastcall | GetCounter (void) |
Protected Attributes | |
| int | w |
| int | h |
| int | xoff |
| int | yoff |
| int | wwrk |
| int | hwrk |
| unsigned long | status |
| FGMutex | clip_lock |
| FGPixel * | image |
| char * | name |
| internal_state | state |
| internal_state | state_backup |
| bool | state_saved |
| ObjectType | type |
| int | _asd |
Static Protected Attributes | |
| static const char * | empty_string = "" |
| static int | oldx |
| static int | oldy |
|
||||||||||||||||||||||||
|
Creates the object with specified size, type, color layout or already existing pixel data. |
|
||||||||||||||||
|
Create a DRAWBUFFER object. Parameter 'ww' and 'hh' are width and height of rectangle, 'buf' is pointed to the image data taht will be copied into created object. |
|
|
Makes the deep copy of object.
|
|
|
Release object's members. |
|
||||||||||||||||||||||||||||
|
Draws a circular arc with centre x, y and radius r, in an anticlockwise direction starting from the angle a and ending when it reaches b. These values are specified in radian format, with M_PI*2 equal to a full circle. Zero is to the right of the centre point, and larger values rotate anticlockwise from there.
|
|
||||||||||||||||||||||||||||
|
Draws a circular arc with centre x, y and radius r, in an clockwise direction starting from the angle a and ending when it reaches b. These values are specified in degrees, with 360 equal to a full circle. The zero angle is at the 12 o'clock. Zero is to the right of the centre point, and larger values rotate clockwise from there.
|
|
||||||||||||||||||||||||||||||||||||
|
Performs image rectangle copy from one FGDrawBuffer object to other with specified ROP and clipping.
|
|
||||||||||||||||||||||||
|
Fill a rectangle from position [x:y] with size [w:h] with 'color'. Coordinate [0:0] is top-left corner of the screen. INK is color index in 8-bit videomodes, or absolute color in 16/24 bit modes. Raster Operaration is the current value of ENUM_PPOP. The default is _GSET (i.e. simply copy) See set_ppop() for more details. Coordinate are clipped if needed before drawing. Function return false if no drawing (i.e. object has been clipped-out completelly). The object XY-offset is added before drawing. |
|
||||||||||||
|
Calculate the absolute address of [x:y] pixel. There are no relative offsets used. |
|
|
Returns a width of the character 'c' in pixels for current font.
|
|
||||||||||||||||||||
|
Draw a circle shape at position [x:y] with radius and with 'color'. Coordinate [0:0] is top-left corner of the screen. INK is color index in 8-bit videomodes, or absolute color in 16/24 bit modes. Raster Operaration is the current value of ENUM_PPOP. The default is _GSET (i.e. simply copy) See set_ppop() for more details. Coordinate are clipped if needed before drawing. Function return false if no drawing (i.e. object has been clipped-out completelly). The object XY-offset is added before drawing. |
|
|
Clear the entire object image with this color.
|
|
||||||||||||||||||||
|
Clip coordinates and size to the client space.
|
|
||||||||||||||||||||||||
|
Draw an ellipse shape at position [x:y] with radius 'rx' & 'ry'and with 'color'. Coordinate [0:0] is top-left corner of the screen. INK is color index in 8-bit videomodes, or absolute color in 16/24 bit modes. Raster Operaration is the current value of ENUM_PPOP. The default is _GSET (i.e. simply copy) See set_ppop() for more details. Coordinate are clipped if needed before drawing. Function return false if no drawing (i.e. object has been clipped-out completelly). The object XY-offset is added before drawing. |
|
||||||||||||||||||||
|
Fill a circle shape at position [x:y] with radius and with 'color'. Coordinate [0:0] is top-left corner of the screen. INK is color index in 8-bit videomodes, or absolute color in 16/24 bit modes. Raster Operaration is the current value of ENUM_PPOP. The default is _GSET (i.e. simply copy) See set_ppop() for more details. Coordinate are clipped if needed before drawing. Function return false if no drawing (i.e. object has been clipped-out completelly). The object XY-offset is added before drawing. |
|
||||||||||||||||||||||||
|
Fill an ellipse shape at position [x:y] with radius 'rx' & 'ry'and with 'color'. Coordinate [0:0] is top-left corner of the screen. INK is color index in 8-bit videomodes, or absolute color in 16/24 bit modes. Raster Operaration is the current value of ENUM_PPOP. The default is _GSET (i.e. simply copy) See set_ppop() for more details. Coordinate are clipped if needed before drawing. Function return false if no drawing (i.e. object has been clipped-out completelly). The object XY-offset is added before drawing. |
|
||||||||||||
|
Fill convex polygon with 'n' vertices. The each vertice is a pair of two integers X and Y. Parameter 'pt' is an array of these pairs. FUnction return the Rectangle of the polygon boundary. Coordinate [0:0] is top-left corner of the screen. INK is color index in 8-bit videomodes, or absolute color in 16/24 bit modes. Raster Operaration is the current value of ENUM_PPOP. The default is _GSET (i.e. simply copy) See set_ppop() for more details. Coordinate are clipped if needed before drawing. Function return false if no drawing (i.e. object has been clipped-out completelly). The object XY-offset is added before drawing. |
|
||||||||||||||||||||||||||||||||
|
Fill a triangle with these three vertices. Coordinate [0:0] is top-left corner of the screen. INK is color index in 8-bit videomodes, or absolute color in 16/24 bit modes. Raster Operaration is the current value of ENUM_PPOP. The default is _GSET (i.e. simply copy) See set_ppop() for more details. Coordinate are clipped if needed before drawing. Function returns false if no drawing (i.e. object has been clipped-out completelly). The object XY-offset is added before drawing.
|
|
||||||||||||||||||||
|
Returns current values of the client space of the object.
|
|
|
Returns a current object's font ID.
|
|
|
Returns an ALPHA (transparency) value of the object.
|
|
|
Returns the address of pixel data storage. There are pixels, from right to left, line by line.
|
|
|
Returns the COLOR_KEY of the object (i.e. color that is used as transparent).
|
|
|
Returns a height of one character for current font if one is fixed-size.
|
|
|
Returns a width of one character for current font if one is fixed-size.
|
|
|
Returns a height of the object.
|
|
|
Returns a client space height of the object.
|
|
|
Returns the ID of the object. The all controls have an exclusive ID. This value goes from 0 to .., for each window and its control items. For example: when window contains 5 buttons, then these buttons have local id values from 0 to 4,according to the order of its creating. This is useful for fast and easy testing which button (when you use one call-back procedure for more buttons i.e.) especially with using GetLastActive();
|
|
|
Returns a foreground color of the object.
Reimplemented in fgl::FGBaseGui. |
|
|
Returns the name of the object.
|
|
|
Returns a background color of the object.
Reimplemented in fgl::FGBaseGui. |
|
||||||||||||
|
Returns the value of color at the position [x:y] of the object or (-1) if coordinates are out of range. |
|
|
Returns the status of object. |
|
|
Returns the type of the object (WINDOW, PUSHBUTTON ..).
|
|
|
Returns a width of the object.
|
|
|
Returns a client space width of the object.
|
|
|
Returns the X coordinate of the client space of the object.
|
|
|
Returns the Y coordinate of the client space of the object.
|
|
||||||||||||||||||||
|
Draw a horizontal line from [x:y] with size 'c' and color 'ink'. Coordinate [0:0] is top-left corner of the screen. INK is color index in 8-bit videomodes, or absolute color in 16/24 bit modes. Raster Operaration is the current value of ENUM_PPOP. The default is _GSET (i.e. simply copy) See set_ppop() for more details. Coordinate are clipped if needed before drawing. Function return false if no drawing (i.e. object has been clipped-out completelly). The object XY-offset is added before drawing. |
|
||||||||||||||||||||||||
|
Draw a line from position [x:y] to the position [a:b] with 'color'. Coordinate [0:0] is top-left corner of the screen. INK is color index in 8-bit videomodes, or absolute color in 16/24 bit modes. Raster Operaration is the current value of ENUM_PPOP. The default is _GSET (i.e. simply copy) See set_ppop() for more details. Coordinate are clipped if needed before drawing. Function return false if no drawing (i.e. object has been clipped-out completelly). The object XY-offset is added before drawing. |
|
||||||||||||||||
|
Draw a line from the latest PEN position to the position [x:y] Coordinate [0:0] is top-left corner of the screen. INK is color index in 8-bit videomodes, or absolute color in 16/24 bit modes. Raster Operaration is the current value of ENUM_PPOP. The default is _GSET (i.e. simply copy) See set_ppop() for more details. Coordinate are clipped if needed before drawing. Function return false if no drawing (i.e. object has been clipped-out completelly). The object XY-offset is added before drawing. |
|
||||||||||||
|
Sets the start position for first time used lineto().
|
|
||||||||||||||||||||||||
|
Draw a patterned line from position [a1:b1] to the position [a2:b2]. Coordinate [0:0] is top-left corner of the screen. INK is color index in 8-bit videomodes, or absolute color in 16/24 bit modes. Raster Operaration is the current value of ENUM_PPOP. The default is _GSET (i.e. simply copy) See set_ppop() for more details. Coordinate are clipped if needed before drawing. Function return false if no drawing (i.e. object has been clipped-out completelly). The object XY-offset is added before drawing. |
|
||||||||||||
|
Draw convex polygon with 'n' vertices. The each vertice is a pair of two integers X and Y. Parameter 'pt' is an array of these pairs. Coordinate [0:0] is top-left corner of the screen. INK is color index in 8-bit videomodes, or absolute color in 16/24 bit modes. Raster Operaration is the current value of ENUM_PPOP. The default is _GSET (i.e. simply copy) See set_ppop() for more details. Coordinate are clipped if needed before drawing. Function return false if no drawing (i.e. object has been clipped-out completelly). The object XY-offset is added before drawing. |
|
||||||||||||||||||||
|
Draw a text via standard "C" behaviour with the current object font & colors from the position [x:y]. Coordinate [0:0] is top-left corner of the screen. INK is color index in 8-bit videomodes, or absolute color in 16/24 bit modes. Raster Operaration is the current value of ENUM_PPOP. The default is _GSET (i.e. simply copy) See set_ppop() for more details. Coordinate are clipped if needed before drawing. Function return false if no drawing (i.e. object has been clipped-out completelly). The object XY-offset is added before drawing. Reimplemented in fgl::FGWindow.
|
|
||||||||||||||||
|
Draw a pixel at position [x:y] with 'color'. Coordinate [0:0] is top-left corner of the screen. INK is color index in 8-bit videomodes, or absolute color in 16/24 bit modes. Raster Operaration is the current value of ENUM_PPOP. The default is _GSET (i.e. simply copy) See set_ppop() for more details. Coordinates are clipped if needed before drawing. Function return false if no drawing (i.e. object has been clipped-out completelly). The object XY-offset is added before drawing. |
|
||||||||||||||||||||||||
|
Draw a rectangle from position [x:y] with size [w:h] with 'color'. Coordinate [0:0] is top-left corner of the screen. INK is color index in 8-bit videomodes, or absolute color in 16/24 bit modes. Raster Operaration is the current value of ENUM_PPOP. The default is _GSET (i.e. simply copy) See set_ppop() for more details. Coordinate are clipped if needed before drawing. Function return false if no drawing (i.e. object has been clipped-out completelly). The object XY-offset is added before drawing. |
|
||||||||||||
|
Resizes the buffer by relative sizes. |
|
|
Restore the state saved by save_state().
|
|
|
Rotates image to apropriate direction. |
|
|
Save the internal state of object described by struct internal_state (ink, paper, font, alpha, colorkey anf ppop).
|
|
|
Set the background color for text drawing operations. This color will be used when you choose function that don't uses color as parameter immediatelly. |
|
||||||||||||||||||||
|
Set position and size of the client space for the object (ww & hh are size).
|
|
||||||||||||
|
Set the foreground (ink) and the background (paper) color for drawing operations. |
|
|
Set the foreground color for drawing operations. This color will be used when you choose function that don't uses color as parameter immediatelly.
|
|
|
Try get the font image and set requested font ID if success for the object as current. |
|
|
Set the ROP for all drawing operations used with the object. See enum ENUM_PPOP for more details. |
|
|
Set the level of transparency for the object when bitblit operation will be performed with this object. The level is number from 0 to 255, where 0 is completely transparent and 255 completely opaque. |
|
|
Set the COLOR_KEY of the object (i.e. color that will be transparent when bitblit operation will be performed with this object). |
|
|
Change the name of the object. Reimplemented in fgl::FGControl, and fgl::FGWindow. |
|
||||||||||||
|
Draws a bezier spline using the four control points specified in the points array. Coordinate [0:0] is top-left corner of the screen. INK is color index in 8-bit videomodes, or absolute color in 16/24 bit modes. Raster Operaration is the current value of ENUM_PPOP. The default is _GSET (i.e. simply copy) See set_ppop() for more details. Coordinate are clipped if needed before drawing. Function return false if no drawing (i.e. object has been clipped-out completelly). The object XY-offset is added before drawing. |
|
||||||||||||
|
Resize the image with ratio 'rx' and 'ry'. |
|
||||||||||||
|
Resize the image to the new size. |
|
||||||||||||||||||||||||
|
Draw a text with the current object font, background 'p' and foreground 'i' from the position [x:y]. Coordinate [0:0] is top-left corner of the screen. INK is color index in 8-bit videomodes, or absolute color in 16/24 bit modes. Raster Operaration is the current value of ENUM_PPOP. The default is _GSET (i.e. simply copy) See set_ppop() for more details. Coordinate are clipped if needed before drawing. Function return false if no drawing (i.e. object has been clipped-out completelly). The object XY-offset is added before drawing. |
|
||||||||||||
|
Returns a width for the first 'cnt' characters of the 'text' in pixels for current font. |
|
|
Returns a width of the 'text' in pixels for current font.
|
|
||||||||||||||||||||
|
Draw a vertical line from [x:y] with size 'c' and color 'ink'. Coordinate [0:0] is top-left corner of the screen. INK is color index in 8-bit videomodes, or absolute color in 16/24 bit modes. Raster Operaration is the current value of ENUM_PPOP. The default is _GSET (i.e. simply copy) See set_ppop() for more details. Coordinate are clipped if needed before drawing. Function return false if no drawing (i.e. object has been clipped-out completelly). The object XY-offset is added before drawing. |
1.4.0