Main Page | Modules | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | Related Pages | Examples

fgl::FGDrawBuffer Class Reference

#include <base.h>

Inheritance diagram for fgl::FGDrawBuffer:

Inheritance graph
[legend]
Collaboration diagram for fgl::FGDrawBuffer:

Collaboration graph
[legend]
List of all members.

Detailed Description

A base drawing object. This object is used as a parent for the all graphics stuff. You can use this one for in-memory drawing and after drawing complete update the screen with contents of this object.
Examples:

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
FGPixelimage
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


Constructor & Destructor Documentation

fgl::FGDrawBuffer::FGDrawBuffer int  ww = 0,
int  hh = 0,
ObjectType  t = BMP_MEM,
int  color = CBLACK,
FGPixel buf = 0
 

Creates the object with specified size, type, color layout or already existing pixel data.

fgl::FGDrawBuffer::FGDrawBuffer int  ww,
int  hh,
FGPixel buf
 

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.

fgl::FGDrawBuffer::FGDrawBuffer FGDrawBuffer  ) 
 

Makes the deep copy of object.

fgl::FGDrawBuffer::~FGDrawBuffer  )  [virtual]
 

Release object's members.


Member Function Documentation

int __fastcall fgl::FGDrawBuffer::arc int  x,
int  y,
double  ang1,
double  ang2,
int  r,
unsigned  color = UNDEFINED_COLOR
 

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.

Parameters:
x x coordinate of the arc centre
y y coordinate of the arc centre
ang1 starting angle
ang2 ending angle
r radius in pixels
color color

int __fastcall fgl::FGDrawBuffer::arc2 int  x,
int  y,
int  ang1,
int  ang2,
int  r,
unsigned  color = UNDEFINED_COLOR
 

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.

Parameters:
x x coordinate of the arc centre
y y coordinate of the arc centre
ang1 starting angle
ang2 ending angle
r radius in pixels
color color

int __fastcall fgl::FGDrawBuffer::bitblit int  xdst,
int  ydst,
int  xsrc,
int  ysrc,
int  ww,
int  hh,
class FGDrawBuffer src,
int  opcia = BITBLIT_COPY
 

Performs image rectangle copy from one FGDrawBuffer object to other with specified ROP and clipping.

Returns:
false if no drawing was performed, or true if all ran OK.
Parameters:
xdst x coord into the destination block
ydst y coord into the destination block
xsrc x coord into the source block
ysrc y coord into the source block
ww a width of copied block (maybe bigger than src or dest block)
hh a height of copied block (maybe bigger than src or dest block)
src a source object that will be copied
opcia a bit oriented value that describes the operational mode of procedure:
  • BITBLIT_COPY - copy only
  • BITBLIT_WITH_OPERATOR - copy with operator
  • BITBLIT_WITH_ALPHA - use the source alpha value
  • BITBLIT_WITH_CLIPPING - perform clipping before
  • BITBLIT_WITH_DECREMENT - for use with overlapping blocks
See also:
Global defines for more about one.

int __fastcall fgl::FGDrawBuffer::box int  x,
int  y,
int  ww,
int  hh,
unsigned  color = UNDEFINED_COLOR
 

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.

FGPixel* __fastcall fgl::FGDrawBuffer::CalcAddr int  x,
int  y
[inline]
 

Calculate the absolute address of [x:y] pixel. There are no relative offsets used.

int __fastcall fgl::FGDrawBuffer::charwidth int  c  )  [inline]
 

Returns a width of the character 'c' in pixels for current font.

int __fastcall fgl::FGDrawBuffer::circle int  xs,
int  ys,
int  r,
unsigned  color = UNDEFINED_COLOR
 

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.

void __fastcall fgl::FGDrawBuffer::clear int  color  )  [inline]
 

Clear the entire object image with this color.

int __fastcall fgl::FGDrawBuffer::clip int &  xr,
int &  yr,
int &  wr,
int &  hr
[inline, protected]
 

Clip coordinates and size to the client space.

int __fastcall fgl::FGDrawBuffer::ellipse int  x,
int  y,
int  rx,
int  ry,
unsigned  color = UNDEFINED_COLOR
 

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.

int __fastcall fgl::FGDrawBuffer::fcircle int  xs,
int  ys,
int  r,
unsigned  color = UNDEFINED_COLOR
 

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.

int __fastcall fgl::FGDrawBuffer::fellipse int  x,
int  y,
int  rx,
int  ry,
unsigned  color = UNDEFINED_COLOR
 

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.

FGRect __fastcall fgl::FGDrawBuffer::fpolygon const FGPointArray vertices,
unsigned  color = UNDEFINED_COLOR
 

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.

FGRect __fastcall fgl::FGDrawBuffer::ftriangle int  x1,
int  y1,
int  x2,
int  y2,
int  x3,
int  y3,
unsigned  color = UNDEFINED_COLOR
 

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.

Parameters:
x1 x position of first vertice
y1 y position of first vertice
x2 x position of second vertice
y2 y position of second vertice
x3 x position of third vertice
y3 y position of third vertice
color foreground color

void __fastcall fgl::FGDrawBuffer::get_clip_rect int &  x,
int &  y,
int &  w,
int &  h
[inline]
 

Returns current values of the client space of the object.

int __fastcall fgl::FGDrawBuffer::get_font void   )  [inline]
 

Returns a current object's font ID.

unsigned __fastcall fgl::FGDrawBuffer::GetAlpha void   )  const [inline]
 

Returns an ALPHA (transparency) value of the object.

FGPixel* __fastcall fgl::FGDrawBuffer::GetArray void   )  const [inline]
 

Returns the address of pixel data storage. There are pixels, from right to left, line by line.

Examples:
mandel.cpp.

unsigned __fastcall fgl::FGDrawBuffer::GetColorKey void   )  const [inline]
 

Returns the COLOR_KEY of the object (i.e. color that is used as transparent).

int __fastcall fgl::FGDrawBuffer::GetFontH void   )  [inline]
 

Returns a height of one character for current font if one is fixed-size.

int __fastcall fgl::FGDrawBuffer::GetFontW void   )  [inline]
 

Returns a width of one character for current font if one is fixed-size.

int __fastcall fgl::FGDrawBuffer::GetH void   )  const [inline]
 

Returns a height of the object.

Examples:
mandel.cpp.

int __fastcall fgl::FGDrawBuffer::GetHW void   )  const [inline]
 

Returns a client space height of the object.

int __fastcall fgl::FGDrawBuffer::GetId void   )  const [inline]
 

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();

Examples:
bgroup.cpp.

FGPixel __fastcall fgl::FGDrawBuffer::GetInk void   )  const [inline]
 

Returns a foreground color of the object.

Reimplemented in fgl::FGBaseGui.

char* __fastcall fgl::FGDrawBuffer::GetName void   )  const [inline]
 

Returns the name of the object.

Examples:
bgroup.cpp, rad_main.cpp, and radio.cpp.

FGPixel __fastcall fgl::FGDrawBuffer::GetPaper void   )  const [inline]
 

Returns a background color of the object.

Reimplemented in fgl::FGBaseGui.

int __fastcall fgl::FGDrawBuffer::getpixel int  x,
int  y
[inline]
 

Returns the value of color at the position [x:y] of the object or (-1) if coordinates are out of range.

long __fastcall fgl::FGDrawBuffer::GetStatus void   )  const [inline]
 

Returns the status of object.

enum ObjectType __fastcall fgl::FGDrawBuffer::GetType void   )  const [inline]
 

Returns the type of the object (WINDOW, PUSHBUTTON ..).

int __fastcall fgl::FGDrawBuffer::GetW void   )  const [inline]
 

Returns a width of the object.

Examples:
mandel.cpp.

int __fastcall fgl::FGDrawBuffer::GetWW void   )  const [inline]
 

Returns a client space width of the object.

int __fastcall fgl::FGDrawBuffer::GetXW void   )  const [inline]
 

Returns the X coordinate of the client space of the object.

int __fastcall fgl::FGDrawBuffer::GetYW void   )  const [inline]
 

Returns the Y coordinate of the client space of the object.

int __fastcall fgl::FGDrawBuffer::hline int  x,
int  y,
int  c,
FGPixel  ink
 

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.

int __fastcall fgl::FGDrawBuffer::line int  x,
int  y,
int  a,
int  b,
unsigned  color = UNDEFINED_COLOR
 

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.

int __fastcall fgl::FGDrawBuffer::lineto int  x,
int  y,
unsigned  color = UNDEFINED_COLOR
 

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.

void __fastcall fgl::FGDrawBuffer::moveto int  x,
int  y
[inline]
 

Sets the start position for first time used lineto().

int __fastcall fgl::FGDrawBuffer::pline int  a1,
int  b1,
int  a2,
int  b2,
FGPattern pat
 

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.

void __fastcall fgl::FGDrawBuffer::polygon const FGPointArray vertices,
unsigned  color = UNDEFINED_COLOR
 

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.

int fgl::FGDrawBuffer::printf int  xx,
int  yy,
const char *  format,
  ...
 

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.

Examples:
radio.cpp.

int __fastcall fgl::FGDrawBuffer::putpixel int  x,
int  y,
unsigned  color = UNDEFINED_COLOR
 

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.

int __fastcall fgl::FGDrawBuffer::rect int  x,
int  y,
int  w,
int  h,
unsigned  color = UNDEFINED_COLOR
 

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.

void __fastcall fgl::FGDrawBuffer::Resize int  dx,
int  dy
 

Resizes the buffer by relative sizes.

void fgl::FGDrawBuffer::restore_state void   )  [inline]
 

Restore the state saved by save_state().

void __fastcall fgl::FGDrawBuffer::rotate ENUM_ROTATE_DIRECTION  direction  ) 
 

Rotates image to apropriate direction.

void fgl::FGDrawBuffer::save_state void   )  [inline]
 

Save the internal state of object described by struct internal_state (ink, paper, font, alpha, colorkey anf ppop).

Note:
the state is not stacked, i.e. you can call this methotd only once before restore_state().

void __fastcall fgl::FGDrawBuffer::set_bcolor FGPixel  val  )  [inline]
 

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.

bool __fastcall fgl::FGDrawBuffer::set_clip_rect int  xx,
int  yy,
int  ww,
int  hh
[inline]
 

Set position and size of the client space for the object (ww & hh are size).

void __fastcall fgl::FGDrawBuffer::set_colors FGPixel  i,
FGPixel  p
[inline]
 

Set the foreground (ink) and the background (paper) color for drawing operations.

void __fastcall fgl::FGDrawBuffer::set_fcolor FGPixel  val  )  [inline]
 

Set the foreground color for drawing operations. This color will be used when you choose function that don't uses color as parameter immediatelly.

Examples:
rad_main.cpp.

void __fastcall fgl::FGDrawBuffer::set_font int  font_id  )  [inline]
 

Try get the font image and set requested font ID if success for the object as current.

Examples:
calc.cpp, and font.cpp.

unsigned __fastcall fgl::FGDrawBuffer::set_ppop unsigned  op  )  [inline]
 

Set the ROP for all drawing operations used with the object. See enum ENUM_PPOP for more details.

void __fastcall fgl::FGDrawBuffer::SetAlpha unsigned  a  )  [inline]
 

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.

void __fastcall fgl::FGDrawBuffer::SetColorKey unsigned  ck  )  [inline]
 

Set the COLOR_KEY of the object (i.e. color that will be transparent when bitblit operation will be performed with this object).

void __fastcall fgl::FGDrawBuffer::SetName const char *  s  ) 
 

Change the name of the object.

Reimplemented in fgl::FGControl, and fgl::FGWindow.

void __fastcall fgl::FGDrawBuffer::spline FGPoint  points[4],
unsigned  color = UNDEFINED_COLOR
 

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.

void __fastcall fgl::FGDrawBuffer::stretch double  rx,
double  ry
 

Resize the image with ratio 'rx' and 'ry'.

void __fastcall fgl::FGDrawBuffer::stretch int  _w,
int  _h
 

Resize the image to the new size.

int __fastcall fgl::FGDrawBuffer::text int  x,
int  y,
const char *  txt,
unsigned  i = UNDEFINED_COLOR,
unsigned  p = UNDEFINED_COLOR
 

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.

int __fastcall fgl::FGDrawBuffer::textwidth char *  txt,
int  cnt
[inline]
 

Returns a width for the first 'cnt' characters of the 'text' in pixels for current font.

int __fastcall fgl::FGDrawBuffer::textwidth const char *  text  )  [inline]
 

Returns a width of the 'text' in pixels for current font.

int __fastcall fgl::FGDrawBuffer::vline int  x,
int  y,
int  c,
FGPixel  ink
 

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.


Generated on Wed Feb 9 11:31:38 2005 for OpenGUI by  doxygen 1.4.0