Virtual U.org
Get Personal Training on VU Today
    
Top shadow
 
 register/help
User Name:

Password:

Vga class Reference
Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Namespace Members   Compound Members   File Members  

Vga Class Reference

VGA manipulation functions (Direct Draw version). More...

#include <OVGA.H>

List of all members.

Public Methods

 Vga ()
 ~Vga ()
BOOL init ()
BOOL init_dd ()
BOOL set_mode (int width, int height)
void deinit ()
char is_inited ()
BOOL load_pal (char *fileName)
void init_gray_remap_table ()
void activate_pal (VgaBuf *)
void release_pal ()
void d3_panel_up (int x1, int y1, int x2, int y2, int vgaFrontOnly=0, int drawBorderOnly=0)
void d3_panel_down (int x1, int y1, int x2, int y2, int vgaFrontOnly=0, int drawBorderOnly=0)
void d3_panel2_up (int x1, int y1, int x2, int y2, int vgaFrontOnly=0, int drawBorderOnly=0)
void d3_panel2_down (int x1, int y1, int x2, int y2, int vgaFrontOnly=0, int drawBorderOnly=0)
void separator (int x1, int y1, int x2, int y2)
void adjust_brightness (int changeValue)
void use_front ()
void use_back ()
BOOL blt_buf (int x1, int y1, int x2, int y2, int putMouseCursor=1)
void disp_image_file (char *fileName, int x1=0, int y1=0)
void finish_disp_image_file ()
int translate_color (unsigned char c)
int make_pixel (BYTE red, BYTE green, BYTE blue)
int make_pixel (RGBColor *)
void decode_pixel (int, RGBColor *)

Public Attributes

LPDIRECTDRAW4 dd_obj
LPDIRECTDRAWPALETTE dd_pal
PALETTEENTRY pal_entry_buf [256]
ColorTablevga_color_table
unsigned char gray_remap_table [256]
int pixel_format_flag
short * default_remap_table
VgaCustomPaletteback_up_pal
char dont_blt

Static Public Attributes

VgaBufactive_buf = &vga_front
char use_back_buf = 0
char opaque_flag = 0


Detailed Description

VGA manipulation functions (Direct Draw version).

Definition at line 44 of file OVGA.H.


Constructor & Destructor Documentation

Vga::Vga  
 

Definition at line 41 of file ovga.cpp.

References dont_blt, and vga_color_table.

Vga::~Vga  
 

Definition at line 54 of file ovga.cpp.

References back_up_pal, deinit(), err_when, and vga_color_table.


Member Function Documentation

void Vga::activate_pal VgaBuf   vgaBufPtr
 

we are getting the palette focus, select our palette

Definition at line 385 of file ovga.cpp.

void Vga::adjust_brightness int    changeValue
 

<int> changeValue - the value to add to the RGB values of all the colors in the palette. the value can be from -255 to 255.

<int> preserveContrast - whether preserve the constrast or not

Definition at line 399 of file ovga.cpp.

BOOL Vga::blt_buf int    x1,
int    y1,
int    x2,
int    y2,
int    putBackCursor = 1
 

Blt the back buffer to the front buffer.

<int> x1, y1, x2, y2 - the coordinations of the area to be blit [int] putBackCursor - whether put a mouse cursor onto the back buffer before blitting. (default: 0)

Definition at line 439 of file ovga.cpp.

References VgaBuf::dd_buf, err_when, BitmapW::size(), VgaBuf::temp_restore_lock(), and VgaBuf::temp_unlock().

void Vga::d3_panel2_down int    x1,
int    y1,
int    x2,
int    y2,
int    vgaFrontOnly = 0,
int    drawBorderOnly = 0
 

<int> x1,y1,x2,y2 = the four vertex of the panel [int] vgaFrontOnly = do all the bitmap processing on the front buffer only (default: 0) [int] drawBorderOnly = draw border only, do not brighten the center area (default: 0)

Definition at line 696 of file ovga.cpp.

References IF_DOWN_BRIGHTNESS_ADJUST, VGA_HEIGHT, and VGA_WIDTH.

void Vga::d3_panel2_up int    x1,
int    y1,
int    x2,
int    y2,
int    vgaFrontOnly = 0,
int    drawBorderOnly = 0
 

<int> x1,y1,x2,y2 = the four vertex of the panel [int] vgaFrontOnly = do all the bitmap processing on the front buffer only (default: 0) [int] drawBorderOnly = draw border only, do not brighten the center area (default: 0)

Definition at line 634 of file ovga.cpp.

References IF_UP_BRIGHTNESS_ADJUST, VGA_HEIGHT, and VGA_WIDTH.

void Vga::d3_panel_down int    x1,
int    y1,
int    x2,
int    y2,
int    vgaFrontOnly = 0,
int    drawBorderOnly = 0
 

<int> x1,y1,x2,y2 = the four vertex of the panel [int] vgaFrontOnly = do all the bitmap processing on the front buffer only (default: 0) [int] drawBorderOnly = draw border only, do not brighten the center area (default: 0)

Definition at line 578 of file ovga.cpp.

References DOWN_OPAQUE_COLOR, IF_DOWN_BRIGHTNESS_ADJUST, VGA_HEIGHT, and VGA_WIDTH.

void Vga::d3_panel_up int    x1,
int    y1,
int    x2,
int    y2,
int    vgaFrontOnly = 0,
int    drawBorderOnly = 0
 

<int> x1,y1,x2,y2 = the four vertex of the panel [int] vgaFrontOnly = do all the bitmap processing on the front buffer only (default: 0) [int] drawBorderOnly = draw border only, do not brighten the center area (default: 0)

Definition at line 522 of file ovga.cpp.

References IF_UP_BRIGHTNESS_ADJUST, UP_OPAQUE_COLOR, VGA_HEIGHT, and VGA_WIDTH.

void Vga::decode_pixel int   ,
RGBColor  
 

Definition at line 818 of file ovga.cpp.

References IMGdecodePixel().

void Vga::deinit  
 

Definition at line 289 of file ovga.cpp.

References dd_obj, DEBUG_LOG, NULL, and release_pal().

Referenced by ~Vga().

void Vga::disp_image_file char *    fileName,
int    x1 = 0,
int    y1 = 0
 

<char*> fileName - file name of the image [int] x1, y1 - the top left display position of the image (default: 0)

Definition at line 17 of file OVGA2.CPP.

References NULL.

void Vga::finish_disp_image_file  
 

Definition at line 67 of file OVGA2.CPP.

References NULL, VGA_HEIGHT, and VGA_WIDTH.

BOOL Vga::init  
 

Definition at line 66 of file ovga.cpp.

References dd_obj, init_dd(), low_video_memory_flag, set_mode(), VGA_BPP, VGA_HEIGHT, and VGA_WIDTH.

BOOL Vga::init_dd  
 

Definition at line 122 of file ovga.cpp.

References dd_obj, DEBUG_LOG, and NULL.

Referenced by init().

void Vga::init_gray_remap_table  
 

Initialize a gray remap table for VgaBuf::convert_gray to use.

Definition at line 776 of file ovga.cpp.

Referenced by load_pal().

char Vga::is_inited   [inline]
 

Definition at line 73 of file OVGA.H.

References dd_obj, and NULL.

BOOL Vga::load_pal char *    fileName
 

Definition at line 320 of file ovga.cpp.

References dd_obj, dd_pal, File::file_close(), File::file_open(), File::file_read(), File::file_seek(), init_gray_remap_table(), NULL, pal_entry_buf, translate_color(), TRANSPARENT_CODE, and transparent_code_w.

int Vga::make_pixel RGBColor  
 

Definition at line 812 of file ovga.cpp.

References IMGmakePixel().

int Vga::make_pixel BYTE    red,
BYTE    green,
BYTE    blue
 

Definition at line 808 of file ovga.cpp.

References IMGmakePixel().

void Vga::release_pal  
 

Definition at line 370 of file ovga.cpp.

References dd_pal, and NULL.

Referenced by deinit().

void Vga::separator int    x1,
int    y1,
int    x2,
int    y2
 

Definition at line 757 of file ovga.cpp.

References VgaBuf::adjust_brightness(), err_when, IF_DOWN_BRIGHTNESS_ADJUST, IF_UP_BRIGHTNESS_ADJUST, VGA_HEIGHT, and VGA_WIDTH.

BOOL Vga::set_mode int    width,
int    height
 

Definition at line 198 of file ovga.cpp.

References dd_obj, DEBUG_LOG, INITbright(), INITeffect(), NULL, pixel_format_flag, PIXFORM_BGR_555, PIXFORM_BGR_565, PIXFORM_RGB_555, PIXFORM_RGB_565, VGA_BPP, VGA_HEIGHT, VGA_WIDTH, and WIN_TITLE.

Referenced by init().

int Vga::translate_color unsigned char    c [inline]
 

Definition at line 97 of file OVGA.H.

References default_remap_table.

Referenced by load_pal().

void Vga::use_back   [inline]
 

Definition at line 90 of file OVGA.H.

References use_back_buf.

void Vga::use_front   [inline]
 

Definition at line 89 of file OVGA.H.

References use_back_buf.


Member Data Documentation

VgaBuf * Vga::active_buf = &vga_front [static]
 

Definition at line 29 of file ovga.cpp.

Referenced by VgaBuf::bar(), VBrowse::close(), VBrowse98::close(), Button::create(), VBrowse::disp_all(), VBrowse::disp_one(), Button::hide(), PieChart::init(), GraphSpecialYear::init(), GraphSpecialTrimester::init(), GraphSpecialMonth::init(), GraphNonFinancialYear::init(), GraphNonFinancialTrimester::init(), GraphNonFinancialMonth::init(), GraphYear::init(), GraphTrimester::init(), GraphMonth::init(), GraphPerformanceIndicatorYear::init(), GraphPerformanceIndicatorTrimester::init(), GraphPerformanceIndicatorMonth::init(), GraphDoubleBarYear::init(), GraphDoubleBarMonth::init(), GraphDoubleBar::init(), GraphArea::init(), GraphArea2::init(), ValueSlider::init_target(), VBrowse::paint(), ScrollBar::paint(), Button::paint(), Font::put(), Font::put_char(), Font::put_paragraph(), and Slider::refresh().

VgaCustomPalette* Vga::back_up_pal
 

Definition at line 56 of file OVGA.H.

Referenced by ~Vga().

LPDIRECTDRAW4 Vga::dd_obj
 

Definition at line 46 of file OVGA.H.

Referenced by deinit(), init(), init_dd(), is_inited(), load_pal(), and set_mode().

LPDIRECTDRAWPALETTE Vga::dd_pal
 

Definition at line 47 of file OVGA.H.

Referenced by load_pal(), and release_pal().

short* Vga::default_remap_table
 

Definition at line 54 of file OVGA.H.

Referenced by translate_color().

char Vga::dont_blt
 

Definition at line 66 of file OVGA.H.

Referenced by Vga().

unsigned char Vga::gray_remap_table[256]
 

Definition at line 52 of file OVGA.H.

char Vga::opaque_flag = 0 [static]
 

Definition at line 28 of file ovga.cpp.

PALETTEENTRY Vga::pal_entry_buf[256]
 

Definition at line 49 of file OVGA.H.

Referenced by load_pal().

int Vga::pixel_format_flag
 

Definition at line 53 of file OVGA.H.

Referenced by set_mode().

char Vga::use_back_buf = 0 [static]
 

Definition at line 27 of file ovga.cpp.

Referenced by Font::center_put(), GetA::paint(), Font::put(), Font::put_paragraph(), use_back(), and use_front().

ColorTable* Vga::vga_color_table
 

Definition at line 51 of file OVGA.H.

Referenced by Vga(), and ~Vga().


The documentation for this class was generated from the following files:
Generated on Fri Aug 23 01:39:42 2002 for VirtualU by doxygen1.2.17