mdc.dll

Classes:

Functions:

Index

Common index


Class BGColor : MHandle

#module root.graph
The BGColor class represents a brush (background filling color) as 
the system resource.
It is designed to be used by the MDC class (for more information see 
the MDC::SelectObject method). As the brush creation is a time 
consuming operation (takes considerable time of the operating system) 
then for drawing an image that contains different brushes it is more 
efficient to have the predefined set of brushes in advance and then 
just select them in the MDC by the SelectObject method than 
dynamically create them by the MDC::SetBGColor method. 
The BGColor class does not have fields that are visible from Pluk level.
class BGColor { };

Methods:


BGColor::BGColor(copy)

param srcColor;

This constructor creates the copy of the brush specified via the 
srcColor parameter.

BGColor::BGColor(number, number, number)

param Red, Green, Blue;

This constructor creates a solid brush (without pattern) with the 
color specified via the (Red, Green, Blue) triplet. 

BGColor::BGColor(refer object ColorRef)

param Color;

This constructor creates a solid brush (without pattern) with the 
color specified via the Color parameter. 

BGColor::BGColor(refer object ColorRef, int)

param Color, Attr;

This constructor creates a brush with the color specified via the 
Color parameter. Brush pattern is specified via the Attr parameter. 
Available values of the Attr parameter are enumerated in the BG_ group 
constants.

BGColor::BGColor(refer object ColorRef, refer object ColorRef, int)

param Color1, Color2, Pattern;

This constructor creates a brush with the two-colored texture 
specified via the Color1/Color2 parameters.
Brush pattern is determined by the texture specified via the Pattern 
parameter. 

BGColor::BGColor(void)

This constructor creates a brush that corresponds 
to the system brush ("default" brush).

BGColor::GetAttr(void)

Returns an integer number that represents the brush pattern. 
Available returned values are enumerated in the BG_ group constants.

BGColor::GetColor(void)

Returns an object of the ColorRef class that represents the brush color.

BGColor::Reset(void)

Nulls the old brush content and converts it to the solid black brush.

BGColor::SetAttr(int)

param Attr;



BGColor::SetBGColor(refer object ColorRef)

param Color;

Sets a new brush color.

BGColor::SetBGColor(refer object ColorRef, int)

param Color, Attr;

Changes the brush color to the color specified via the Color parameter 
and the brush attribute (pattern) to the attribute specified via 
the Attr parameter. 
Available values of the Attr parameter are enumerated in the BG_ group 
constants.

BGColor::SetBGColor(refer object ColorRef, refer object ColorRef, int)

param Color1, Color2, Pattern;

Changes the brush colors to the colors specified via the Color1 and 
Color2 parameters.
Brush pattern is determined by the texture specified via the Pattern 
parameter. 

BGColor::SetColor(refer object ColorRef)

param Color;

Changes the brush color to the color specified via the Color 
parameter.

BGColor::~BGColor(void)

This destructor releases system resources.

Class ColorRef

#module root.graph
The ColorRef class represents an RGB (Red Green Blue) color. 
The class itself has the following specification:
class ColorRef {
	clrf;       // 32 digit number that contains 3 bytes
			//for RGB and one byte is reserved
	};

Methods:


ColorRef::ColorRef(int)

param Color;

This constructor creates an object with the color specified 
via the 32 digit value specified via the Color parameter.

ColorRef::ColorRef(number, number, number)

param Red, Green, Blue;

This constructor creates an object with the color 
specified via the Red, Green, Blue triplet. 

ColorRef::ColorRef(void)

This constructor creates an object of the black color.

ColorRef::Filter(number, number, number)

param r, g, b;

Passes a color through the filter with the components specified via 
the r, g, b parameters.
These parameters are the values in the 0.0 .. 1.0 interval.

ColorRef::GetB(void)

This method returns the blue component of the ColorRef object.

ColorRef::GetG(void)

This method returns the green component of the ColorRef object.

ColorRef::GetR(void)

This method returns the red component of the ColorRef object.

ColorRef::SetB(number)

param Blue;

This method sets the blue component of the ColorRef object.

ColorRef::SetG(number)

param Green;

This method sets the green component of the ColorRef object.

ColorRef::SetR(number)

param Red;

This method sets the red component of the ColorRef object.

ColorRef::SetRGB(number, number, number)

param Red, Green, Blue;

This method sets the object color according to the Red, Green, Blue triplet.

Class FGColor : MHandle

#module root.graph
The FGColor class represents a pen (line drawing color) as the system resource.
It is designed to be used by the MDC class (for more information see 
the MDC::SelectObject method). As the pen creation is a time 
consuming operation (takes considerable time of the operating system) 
then for drawing an image that contains different pens (line colors) 
it is more efficient to have the predefined set of pens in advance and 
then just select them in the MDC by the SelectObject method than 
dynamically create them by the MDC::SetFGColor method. 
The FGColor class does not have fields that are visible from Pluk level.
class FGColor { };
The FGColor class has the following defined methods:

Methods:


FGColor::FGColor(copy)

param srcColor;

This constructor creates the copy of the pen specified via the 
srcColor parameter.

FGColor::FGColor(number, number, number)

param Red, Green, Blue;

This constructor creates a solid brush of the unit width with the 
color specified via the (Red, Green, Blue) triplet. 

FGColor::FGColor(refer object ColorRef)

param Color;

This constructor creates a solid pen of the unit width with the 
color specified via the Color parameter. 

FGColor::FGColor(refer object ColorRef, int, int)

param Color, Width, Attr;

This constructor creates a pen with the color specified via the 
Color parameter, with the width specified via the Width parameter, 
with the attribute specified via the Attr parameter. 
Available values of the Attr parameter are enumerated in the FG_ group 
constants.

FGColor::FGColor(void)

This constructor creates a color (pen) that corresponds to the system 
color ("default" color).

FGColor::GetAttr(void)

Returns an integer number that represents the pen attribute. 
Available returned values are enumerated in the FG_ group constants.

FGColor::GetColor(void)

Returns an object of the ColorRef class that represents the pen color.

FGColor::GetWidth(void)

Returns the pen width.

FGColor::Reset(void)

Nulls the old pen content and converts it to the solid black pen.

FGColor::SetAttr(int)

param Color, Width, Attr;

Sets the pen attribute to the attribute specified via the Attr parameter. 
Available values of the pen attribute are enumerated in the FG_ group 
constants.

FGColor::SetColor(refer object ColorRef)

param Color;

Changes the pen color to the color specified via the Color 
parameter.

FGColor::SetFGColor(refer object ColorRef, int, int)

param Color, Width, Attr;

Changes the pen color to the color specified via the Color parameter, 
the pen width to the width specified via the Width parameter and sets 
the pen attribute to the attribute specified via the Attr parameter. 
Available values of the pen attribute are enumerated in the FG_ group 
constants.

FGColor::SetWidth(number)

param Width;

Sets the pen width equal to the Width parameter.

FGColor::~FGColor(void)

This destructor releases system resources.

Class MBmp : MPicture

#module root.graph
The MBmp class represents an interface to work with bitmaps.  
The bitmap selection in the MDC is not necessary for performing 
read/write operations (the MBmp::Load... methods), 
settings (the MBmp::Set... methods), parameters access 
(the MBmp::Get... methods) and displaying into another device 
(the MDC::Show or MDC::Stretch methods).
This class does not have members that can be accessed from Pluk level.
class MBmp { };
Note:
It is accepted in the Windows operating system that the bitmap size 
should be divisible by 4 for the x axis. Violation of this condition 
may cause unpredictable consequences. Depending on the VGA driver the 
bitmap may not be displayed on screen or cause the GPF (General 
Protection Fault) in the driver code. As this feature is 
the peculiarity of the Windows 3.xx, authors did not implement 
special protection methods against wrong bitmap size. 
It is assumed that a user should support the Microsoft agreement.

Methods:


MBmp::ClipboardToMBmp(void)

Copies the Windows Clipboard contents to the bitmap.
Returns TRUE if succeeded, otherwise FALSE.

MBmp::Copy(refer object MBmp)

param srcBmp;

Copies the bitmap specified via the srcBmp parameter to the bitmap 
that receives message. The old content of the receiver is destroyed. 

MBmp::CopyWinRect(int, refer object RECT)

param wndHandler, rect;

Copies to a bitmap from the rectangle specified via the rect parameter 
(in relative coordinates) from the window specified by the wndHandler 
index in the list of the operating system resources. The palette is 
created on basis of the palette used by the window. The old content of 
the bitmap is destroyed (released).
Returns TRUE if succeeded, otherwise FALSE.

MBmp::CopyWinRect(refer object GWnd, refer object RECT)

param wnd, rect;

Copies to a bitmap from the rectangle specified via the rect parameter 
(in relative coordinates) from the window specified via the wnd 
parameter. The palette is created on basis of the palette used by the 
window. The old content of the bitmap is destroyed (released).
Returns TRUE if succeeded, otherwise FALSE.

MBmp::Flip(number, number, number, number)

param x1, y1, x2, y2;

Returns the bitmap which is obtained from the initial bitmap by mirror 
relatively to the line with the following coordinates (x1, y1), (x2, y2).

MBmp::GetBitmapBits(void)

Returns an object of the String type that contains the bitmap bits in 
the current internal form.
Note:
In the 256-color or less mode the bitmap bits depends on the current 
operating system palette.
That is why data which is read twice may not be the same.

MBmp::GetDIBits(void)

Returns an object of the String type that contains the bitmap bits in 
the Windows DIB (Device Independent Bitmap) form.

MBmp::GetHeight(void)

Returns the bitmap height.

MBmp::GetNumColors(void)

Returns the number of colors in the bitmap palette.

MBmp::GetRGBPalette(void)

Returns a vector that consists of the ColorRef type objects that 
represent the bitmap palette colors.

MBmp::GetWidth(void)

Returns the bitmap width.

MBmp::IsRGBBitmap(void)

Returns FALSE if the bitmap has the palette, otherwise TRUE.

MBmp::Load(refer object Palette, refer object String, int, int)

param Palette, Data, width, height;

Reads a bitmap with the palette specified via the Palette parameter 
and size specified via the (width x height) parameters.
Data in the buffer specified via the Data parameter is interpreted 
according to the number of colors in the palette. 
The following ratios are available:
2 colors - 1 bit per pixel 
up to 16 colors - 4 bits per pixel 
up to 256 colors - 8 bits per pixel 
more than 256 colors - palette bitmaps are not supported, RGB format 
is used.
Returns TRUE if succeeded, otherwise FALSE.

MBmp::Load(refer object String)

param Buffer;

Reads a bitmap from the memory buffer specified via the Buffer 
parameter using the 'Windows bitmap - BMP' format to the bitmap.
The old content of the bitmap is destroyed (released).

MBmp::Load(refer object String, int, int)

param Data, width, height;

Reads a bitmap in the RGB format with the size specified by the 
(width x height) parameters.
The buffer size should be equal to (width x height x 3) bytes.
Returns TRUE if succeeded, otherwise FALSE.

MBmp::LoadFromFile(refer object BaseString)

param FileName;

Reads a bitmap from the file specified via the FileName parameter 
using the 'Windows bitmap - BMP' format to the bitmap.
The old content of the bitmap is destroyed (released).
Returns TRUE if succeeded, otherwise FALSE.

MBmp::LoadGIF(refer object BaseString)

param FileName;

Reads a bitmap from the file specified via the FileName parameter 
using the GIF format to the bitmap.
The old content of the bitmap is destroyed (released).
Returns TRUE if succeeded, otherwise FALSE.

MBmp::LoadRaw(refer object String, int, int)

param buffer, width, height;

Loads the RGB bitmap. It is assumed that bytes are added to the bitmap 
strings in order to align according to the 4-byte bound.

MBmp::MBmp(copy)

param srcBmp;

This constructor creates the graphic object which represent 
the copy of the object specified via the srcBmp parameter.

MBmp::MBmp(number, number)

param width, height;

This constructor creates a bitmap with the size specified via the 
(width x height) parameters.
The number of colors in the palette is determined by the display driver.

MBmp::MBmp(number, number, refer object MPalette)

param width, height, paltte;

This creates a bitmap with the palette and size specified via the
(width x height) parameters.

MBmp::MBmp(refer object BaseString)

param FileName;



MBmp::MBmp(refer object Palette, refer object String, int, int)

param Palette, Data, width, height;

This constructor creates a bitmap with the palette specified 
via the Palette parameter and size specified via the 
(width x height) parameters.
Data in the buffer specified via the Data parameter is interpreted 
according to the number of colors in the palette. 
The following ratios are available:
2 colors - 1 bit per pixel 
up to 16 colors - 4 bits per pixel 
up to 256 colors - 8 bits per pixel 
more than 256 colors - palette bitmaps are not supported, RGB format 
is used.

MBmp::MBmp(refer object String, int, int)

param Data, width, height;

This creates a bitmap according to data in the RGB format with the 
size specified via the (width x height) parameters.
The buffer size should be (width x height x 3)bytes.

MBmp::MBmp(void)

This constructor creates an empty bitmap without size and memory.
Actually this is the blank for data reading-out from a file or 
copying from a window, for instance.

MBmp::MBmpToClipboard(void)

Copies the bitmap contents to the Windows Clipboard.
Returns TRUE if succeeded, otherwise FALSE.

MBmp::Rotate(number)

param Angle;

Returns the bitmap which is rotated on the angle specified via 
the Angle parameter.
The returned bitmap size is the same as the initial bitmap size 
(corners are cut when rotated).

MBmp::Rotate(number, number, number)

param Angle, Offset_X, Offset_Y;

Returns the bitmap which is rotated relatively to the (Offset_X, 
Offset_Y) point of the initial bitmap on the angle specified via the 
Angle parameter.
At that the bitmap is enlarged so that the rotation point is in the 
center of the bitmap and then the rotation is performed.
The returned bitmap has the sufficient size in order to contain the 
rotated and enlarged bitmap without any losses.

MBmp::Rotate(number, object RECT, number, number)

param Angle, Rect, Offset_X,

Offset_Y;
Returns the bitmap which is obtained via the rotation of the rectangle 
selected from the bitmap. The rectangle is specified via the Rect 
parameter. The rotation is performed relatively to the point with the 
(Offset_X, Offset_Y) coordinates on the angle specified via the 
Angle parameter. The offset (Offset_X, Offset_Y) is counted from the 
top-left corner of the rectangle is specified via the Rect parameter.
At that the bitmap is enlarged so that the rotation point is in the 
center of the bitmap and then the rotation is performed.
The returned bitmap has the sufficient size in order to contain the 
rotated and enlarged bitmap without any losses.

MBmp::SaveByPalette(refer object BaseString)

param FileName;

Writes a bitmap with a palette to the file specified via the FileName 
parameter using the 'Windows bitmap - BMP' format.
Returns TRUE if succeeded, otherwise FALSE.

MBmp::SaveGIF(refer object BaseString)

param FileName;

Writes a bitmap to the file specified via the FileName parameter using 
the GIF87a format.
Returns TRUE if succeeded, otherwise FALSE.

MBmp::SaveToFile(refer object BaseString)

param FileName;

Writes a bitmap to the file specified via the FileName parameter using 
the 'Windows bitmap - BMP' format.
Returns TRUE if succeeded, otherwise FALSE.

MBmp::SetBitmapBits(refer object String)

param Buffer;

Sets bits in the bit map from the buffer specified via the Buffer 
parameter. It is assumed that bits corresponds to the operating system 
internal form.

MBmp::SetInverse(boolean)

param Inverse;

Changes work modes of the MBmp::GetDIBits(void) and
MBmp::Load(refer object String, int, int) methods.
If the Inverse parameter is set to TRUE then the
MBmp::GetDIBits(void) method returns the data string 
which is obtained by reading the initial image strings 
bottom-up, otherwise the image is copied top-down.
Similarly the MBmp::Load(refer object String, int, int) method
interprets data passed via the first parameter
in top-down or bottom-up order.

MBmp::SetRGBPalette(refer object Palette)

param Palette;

The palette specified via the Palette parameter is set as the bitmap 
palette.
Returns TRUE if succeeded, otherwise FALSE.

MBmp::SetRGBPalette(refer object Vector)

param Colors;

The Colors parameter represents a vector that consists of the ColorRef 
type objects. On basis if this vector bitmap palette is created and 
set.
Returns TRUE if succeeded, otherwise FALSE.

MBmp::Show(refer any)

  Открывает окно, в котором визуализируется
изображение self.

MBmp::Show(void)

  Открывает окно, в котором визуализируется
изображение self.

MBmp::~MBmp(void)

Destructor. Releases the allocated memory for bit and palette.
Releases a bitmap as the operating system resource.

Class MCursor : MHandle

#module root.graph

Methods:


MCursor::GetANDImage(void)

Returns a monochrome bitmap (mask)

MCursor::GetHeight(void)

Returns icon height

MCursor::GetWidth(void)

Returns icon width

MCursor::GetXHot(void)

X coordinate cursor position

MCursor::GetXORImage(void)

Returns a bitmap EXCLUSIVE OR icon mask

MCursor::GetYHot(void)

Y coordinate cursor position

MCursor::Load(object String)

param filenam;

Load an icon from the file

MCursor::MCursor(copy)

param src;

This constructor creates a graphic object which is the copy of the 
object specified via the src parameter.

MCursor::MCursor(refer object MCursor)

param src;

This constructor creates a graphic object which is the copy of the 
object specified via the src parameter.

MCursor::MCursor(void)

This constructor creates an empty icon

MCursor::Save(object String)

param filename;

Saves an icon to the file

MCursor::SetImage(refer object MBmp, refer object MBmp)

param andBmp, xorBmp;

Creates an icon according to masks

MCursor::SetXYHot(number, number)

param X, Y;

Sets the Y coordinate of the cursor position

Class MDC : MHandle

#module root.graph
The MDC class represents a graphic device into which the application 
perform drawing. It can be a window, a bitmap in memory, a metafile 
(in terms of MS Windows) or a printer depending on the open method.
When the device is opened then work with it does not depend on the 
actual object into which the drawing is performed (except printer, 
because it is necessary to change pages). 
The normal cycle of working with MDC requires:
1. MDC object creating,
2. device for drawing opening,
3. drawing itself,
4. device for drawing closing (the last stage is necessary because sometimes 
the limited resources of the operating system are used when drawing).
5. MDC object deleting.
If the created object is local and it is deleted when exiting function 
then stage 4 can be omitted - in this case the opened device is closed 
automatically be the MDC destructor.
The MDC class does not have members that are visible from Pluk.
class MDC { };

Methods:


MDC::Arc(refer object RECT, refer object POINT, refer object POINT)

param Rect, StartLine, EndLine;

Draws an ellipse arc.
The Rect parameter represents a rectangle that bounds the ellipse. 
The points specified via the StartLine and EndLine parameters 
determines the endpoints of the segment that clips the ellipse arc. 
The drawing is performed using the pen which is currently selected 
in the MDC. 

MDC::Bar(number, number, number, number)

param left, top, right, bottom;

Draws a filled rectangle with boundaries specified by 
the left, top, right, bottom parameters using the brush 
which is currently selected in the MDC.

MDC::Bar(refer object RECT)

param Rect;

Draws a filled rectangle with boundaries defined by the object 
specified via the Rect parameter using the brush which is currently 
selected in the MDC.

MDC::BitmapRasterOp(int)

param Attr;

Sets parameters of raster operations for bitmaps copying. Available 
values of the Attr parameter are described by the BM_ group constants.
BM_SRCCOPY	0x00CC0020	copy source to destination 
BM_SRCPAINT	0x00EE0086	join source and destination bitmaps using the 
				OR boolean operation
BM_SRCAND	0x008800C6	join source and destination bitmaps with the 
				help of the AND boolean operation 
BM_SRCINVERT	0x00660046	join source and destination bitmaps 
				using the EXCLUSIVE OR boolean operation 
BM_SRCERASE	0x00440328	invert source bitmap and join with destination 
				bitmap using the AND boolean operation 
BM_NOTSRCCOPY	0x00330008	copy the inverted source bitmap to destination 
BM_NOTSRCERASE	0x001100A6	invert the result of source and 
				destination bitmaps combination using 
				the OR boolean operation 
BM_MERGECOPY	0x00C000CA	join source and destination bitmaps 
				using the AND boolean operation 
BM_MERGEPAINT	0x00BB0226	join the inverted source bitmap and 
				destination bitmap using the OR boolean 
				operation 
BM_PATCOPY	0x00F00021	copy brush to source
BM_PATPAINT	0x00FB0A09	join the inverted source bitmap with a brush 
				using the OR boolean operation; join the 
				result with the destination bitmap using the 
				OR boolean operation
BM_PATINVERT	0x005A0049	join brush with destination using the 
				EXCLUSIVE OR boolean operation 
BM_DSTINVERT	0x00550009	invert bitmap in the destination
BM_BLACKNESS	0x00000042	fill bitmap in the source with black 
BM_WHITENESS	0x00FF0062	fill bitmap in the destination with 
white
 

MDC::BorderedBar(number, number, number, number)

param left, top, right, bottom;

Draws a filled rectangle with boundaries specified by the left, top, 
right, bottom parameters.
At that the rectangle boundaries are drawn with the pen which is 
currently selected in the MDC and the inside is drawn with the 
appropriate brush.

MDC::BorderedBar(refer object RECT)

param Rect;

Draws a filled rectangle with boundaries defined by the object 
specified via the Rect parameter.
At that the rectangle boundaries are drawn with the pen which is 
currently selected in the MDC and the inside is drawn with the 
appropriate brush.

MDC::ClipRect(refer object RECT)

param Rect;

Sets the clip region equal to the Rect parameter.

MDC::ClipRegion(refer object Region)

param Reg;

Sets the graphic clip region according to the region specified via the 
Reg parameter.

MDC::CloseDC(void)

Closes the device used for drawing. There are two types of closing the 
device for drawing methods in the MS Windows operating system 
ReleaseDC and EndPaint. 
The CloseDC method selects the appropriate method automatically. 
All captured resources are released at that.

MDC::CloseMBmp(void)

Closes MDC for drawing into the bitmap. 
The bitmap is released and can be destroyed. 

MDC::CloseMetaFile(void)

Closes MDC for drawing into the metafile. 
The metafile is released and can be destroyed. 

MDC::ClosePrinter(void)

Closes the printer. 
Returns TRUE if the operation was successful. Otherwise - FALSE.

MDC::ColorRasterOp(int)

param Attr;

Sets parameters of raster operations for binary raster operations 
(line drawing, for instance). Available values of the Attr parameter 
are described by the R2_ group constants.
R2_BLACK	1	point is always black
R2_NOTMERGEPEN	2	point is the inversion of the color 
			R2_MERGEPEN: color = ~(pen color | screen color)
R2_MASKNOTPEN	3	point is a combination, common for the screen 
			color and the inverted pen color: 
			color = (~pen color) & screen color 
R2_NOTCOPYPEN	4	point is painted with the inverted pen color 
R2_MASKPENNOT	5	point is a combination, common for the pen color 
			and the inverted screen color: 
			color = (~screen color) & pen color 
R2_NOT		6	point is painted with the color which is 
			inverted relatively to screen 
R2_XORPEN	7	point is a combination of colors that can be found in 
			pen or screen but not in both simultaneously:	
			color = pen color ^ screen color
R2_NOTMASKPEN	8	point is the inversion of the color 
			R2_MASKPEN: color = ~(pen color & screen color)
R2_MASKPEN	9	point is the combination, common for the pen color and 
			the screen color: color = pen color & screen color
R2_NOTXORPEN	10	point is the inversion of the color R2_XORPEN: 
			color = ~(pen color ^ screen color)
R2_NOP		11	point is not changed
R2_MERGENOTPEN	12 	point is the combination of the pen color and 
			the inverted screen color: 
			color = (~screen color) | pen color
R2_COPYPEN	13	point is painted with the pen color
R2_MERGEPENNOT	14	point is the combination of the screen color and 
			the inverted pen color: 
			color = (~pen color) | screen color 
R2_MERGEPEN	15	point is the combination of the pen color and the 
			screen color:  color = pen color | screen color
R2_WHITE	16	point is always white
 

MDC::Ellipse(number, number, number, number)

param left, top, right, bottom;

Draws an ellipse which is inscribed into the rectangle specified via 
the (left, top, right, bottom) parameters using the pen which is 
currently selected in the MDC. 

MDC::Ellipse(refer object RECT)

param Rect;

Draws an ellipse which is inscribed into the rectangle specified via 
the Rect parameter using the pen which is currently selected in the MDC. 

MDC::EndPage(void)

Indicates that page drawing is completed. In order to continue drawing 
on the next page the StartPage method should be called.
Returns TRUE if the operation was successful. Otherwise - FALSE.

MDC::ExcludeClipRect(refer object RECT)

param Rect;

Excludes the rectangle specified via the Rect parameter from the 
drawing region.

MDC::Fill(number, number, refer object ColorRef)

param x, y, Color;

Fills a region with the color specified via the Color parameter.
The x and y parameters determine the initial coordinates for filling.

MDC::Fill(number, number, refer object ColorRef, boolean)

param x, y, Color, Flg;

Fills a region with the color specified via the Color parameter.
The x and y parameters determine the initial coordinates for filling.
If the Flg parameter is equal to TRUE then the region is filled with a 
color from the current palette.

MDC::FillArc(refer object RECT, refer object POINT, refer object POINT)

param Rect, StartLine, EndLine;

Draws an arc and the appropriate ellipse part which is filled.
The Rect parameter represents a rectangle that bounds the ellipse. 
The points specified via the StartLine and EndLine parameters 
determines the endpoints of the segment that clips the ellipse arc. 
The interior is filled with the brush which is currently selected in 
the MDC. 
The boundaries are drawn with the appropriate pen.

MDC::FillChord(refer object RECT, refer object POINT, refer object POINT)

param Rect, StartLine, EndLine;

Draws a chord and the appropriate ellipse part which is filled.
The Rect parameter represents a rectangle that bounds the ellipse. 
The points specified via the StartLine and EndLine parameters 
determines the endpoints of the segment that clips the ellipse chord. 
The interior is filled with the brush which is currently selected in 
the MDC.
The boundaries are drawn with the appropriate pen.

MDC::FillEllipse(number, number, number, number)

param left, top, right, bottom;

Draws a filled ellipse which is inscribed into the rectangle 
specified via the (left, top, right, bottom) parameters using the 
brush which is currently selected in the MDC. 
The ellipse boundaries are drawn with the appropriate pen.

MDC::FillEllipse(refer object RECT)

param Rect;

Draws a filled ellipse which is inscribed into the rectangle 
specified via the Rect parameter using the brush which is 
currently selected in the MDC. 
The ellipse boundaries are drawn with the appropriate pen.

MDC::FillPolygon(refer object Vector)

param Vect;

Draws a filled rectangle.
	Vect - represents the vector which contains objects of the POINT 
		class and describes the polygon corners;
		or the vector whose elements contain two numbers 
		<<x, y>> which describe the polygon corners.
The interior is filled with the brush which is currently selected in 
the MDC. 
The boundaries are drawn with the appropriate pen.
	Note:
		The vector specified via the Vect parameter can not 
		contain the mix of POINT objects and <<x, y>> pair-vectors.

MDC::FillRegion(refer object Region)

param Reg;

Draws the filled region which is specified via the Reg object using 
the brush which is currently selected in the MDC. 
The region boundaries are drawn with the appropriate pen.

MDC::FrameRegion(refer object Region)

param Reg;

Draws the boundaries of the region which is specified via the 
Reg object using the brush which is currently selected in the MDC. 
The drawing is performed with the help of the pen which is currently 
selected in the MDC.
	

MDC::GetBgAttr(void)

Returns the integer number object that represents the attribute of the 
background color (brush) which is selected in the MDC for drawing. The 
list of possible attribute values is defined in the BG_ constants.

MDC::GetBgColor(void)

Returns the ColorRef object that contains the brush color which is 
selected in the MDC for background filling.

MDC::GetClientRect(void)

Returns an object of the RECT type that contains the region (its size) 
into which the current MDC can draw.

MDC::GetClipRect(void)

Returns an object of the RECT class that defines the graphic clip region. 
The methods of setting graphic device parameters.

MDC::GetDCType(void)

Returns the constant that determines the type of device used for 
drawing.
Available values include:
		DC_NONE
		DC_PAINT
		DC_BITMAP
		DC_PRINTER
		DC_METAFILE

MDC::GetFgAttr(void)

Returns the integer number object that represents the attribute of the 
drawing color (pen) which is selected in the MDC for drawing. The list 
of possible attribute values is defined in the FG_ constants.

MDC::GetFgColor(void)

Returns the ColorRef object that contains the pen color which is 
selected in the MDC for drawing.

MDC::GetFontAngle(void)

Returns font turning angle in degrees.

MDC::GetFontAttr(void)

Returns an integer number that determines the attribute of the 
font selected in the MDC. Available attribute values are defined in 
the constants of the FT_ group.

MDC::GetFontCharSet(void)

Returns an integer number that determines font language.

MDC::GetFontName(void)

Returns an object of the String type that contains text 
representation of the name of the font selected in the MDC.

MDC::GetFontSize(void)

Returns an integer number that determines the size of the 
font selected in the MDC.

MDC::GetLineWidth(void)

Returns pen width.

MDC::GetPaintRect(void)

Returns an object of the RECT type that contains the region that must 
be redrawn according to the operating system demand.

MDC::GetPixel(number, number)

param x, y;

Returns an object of the ColorRef class that corresponds to the color 
of the point that has the coordinates specified via the (x,y) parameters.

MDC::GetStringRect(refer object BaseString)

param String;

Returns the RECT object whose size allows allocating text passed 
by the String parameter when using the selected font size.

MDC::GetStringRect(refer object BaseString, int)

param String, len;

Returns the RECT object whose size allows allocating the first 
symbols (their number is specified via the len parameter) passed 
by the String parameter when using the selected font size.

MDC::GetTextColor(void)

Returns the ColorRef object that contains the color which is used for 
text output within the graphic device.

MDC::IntersectClipRect(refer object RECT)

param Rect;

Sets the drawing region as the  intersection  of the existing drawing 
region with the rectangle specified via the Rect parameter 

MDC::IsOpenDC(void)

Returns TRUE if graphic device is opened, otherwise - FALSE

MDC::IsRectVisible(refer object RECT)

param Rect;

Returns TRUE if at least a part of the Rect rectangle is visible. 
Otherwise returns FALSE.

MDC::IsRunPage(void)

Indicates whether the page in the printer closed or not.
Returns TRUE if it is opened, otherwise - FALSE.

MDC::IsWindowDC(void)

Returns TRUE if graphic device was created for a window.

MDC::Line(number, number, number, number)

param x1, y1, x2, y2;

Draws a straight line from the point with the coordinates specified 
via the (x1, y1) parameters to the point with the coordinates 
specified via the (x2, y2) parameters using the pen which is currently 
selected in the MDC.

MDC::Line5D(number, number, number, number, number, number, number, number, number, number)

param x1, y1, x2, y2, red1, green1,

blue1, red2, green2, blue2;
Draws a straight line from the point with the coordinates specified 
via the (x1, y1) parameters to the point with the coordinates 
specified via the (x2, y2) parameters using the color which changes 
from the color specified via the (red1, green1, blue1) parameter to 
the color specified via the (red2, green2, blue2) parameter.

MDC::Line5D(number, number, number, number, refer object ColorRef, refer object ColorRef)

param x1, y1, x2, y2, Color1, Color2;

Draws a straight line from the point with the coordinates specified 
via the (x1, y1) parameters to the point with the coordinates 
specified via the (x2, y2) parameters using the color which changes 
from the color specified via the Color1 parameter to the color 
specified via the Color2 parameter.

MDC::MDC(copy)

param srcMDC;

This constructor creates a graphic object which is the copy of the 
object specified via the srcMDC parameter.

MDC::MDC(int)

param handle;

This constructor creates a graphic object which is compatible with the 
characteristics of the window with the operating system descriptor 
specified via the handle parameter and associated with this window.
Destructor.

MDC::MDC(refer object GWnd)

param Wnd;

This constructor creates a graphic object which is compatible with the 
window specified via the Wnd parameter characteristics (for more 
information see the GUI library description) and associated with this 
window.

MDC::OpenDC(boolean)

param flg;

Opens a device to draw into the window associated with the MDC object 
while creating. There are two types of opening the device for drawing 
methods in the MS Windows operating system GetDC and BeginPaint. The 
OpenDC method selects method according to the flg parameter.
If the flg parameter == FALSE - automatically determines the 
appropriate method.
If the flg parameter == TRUE then the GetDC method is always called.

MDC::OpenDC(void)

Opens a device to draw into the window associated with the MDC object 
while creating. There are two types of opening the device for drawing 
methods in the MS Windows operating system GetDC and BeginPaint. The 
OpenDC method selects the appropriate method automatically.

MDC::OpenMBmp(refer object MBmp)

param Bmp;

Opens MDC for drawing into the MBmp bitmap. A user is responsible for 
not destroying the object specified via the Bmp parameter before 
drawing completion. 
Upon the drawing completion the bitmap is released by calling the 
CloseMBmp method.

MDC::OpenMetaFile(refer object MetaFile)

param MetaFile;

Opens MDC for drawing into the MetaFile metafile. A user is 
responsible for not destroying the object specified via the MetaFile 
parameter before drawing completion. Upon the drawing completion the 
bitmap is released by calling the CloseMetaFile method.

MDC::OpenPrinter(int)

param orient;

Opens a printer for drawing. The orient parameter determines the 
drawing orientation on paper. See the constants of the PR_ group to 
learn the list of possible values. To begin printing it is necessary 
to call the StartPage method after opening the printer. Upon the 
printing completion the printer is released by calling the 
ClosePrinter method.
Returns TRUE if the operation was successful. Otherwise - FALSE.

MDC::OpenPrinter(int, boolean)

param orient, UsePrinterDialog;

Opens a printer for drawing. 
The orient parameter determines the drawing orientation on paper. 
See the constants of the PR_ group to learn the list of possible 
values. 
If the UsePrinterDialog parameter == TRUE then the standard dialog of 
printer setup is invoked.
To begin printing it is necessary to call the StartPage method 
after opening the printer. 
Upon the printing completion the printer is released by calling 
the ClosePrinter method.
Returns TRUE if the operation was successful. Otherwise - FALSE.

MDC::OpenPrinter(void)

Opens a printer for drawing. To begin printing it is necessary to call 
the StartPage method after opening the printer. Upon the printing 
completion the printer is released by calling the ClosePrinter method.
Returns TRUE if the operation was successful. Otherwise - FALSE.

MDC::OutText(number, number, number, number, refer object BaseString, int)

param left, top, right, bottom, Text, align;

Outputs the text specified via the Text parameter to the rectangle 
with the coordinates specified via the following parameters: 
(left, top, right, bottom).
The part of the text that is not within the rectangle is cut.
The align parameter specifies the text alignment within this 
rectangle. Available values of the align parameter are described 
by the MAT_ group constants.

MDC::OutText(number, number, refer object BaseString)

param x, y, Text;

Outputs the text specified via the Text parameter to the position that 
has the coordinates specified via the (x,y) parameters.

MDC::OutText(refer object RECT, refer object BaseString, int)

param rect, Text,

align;
Outputs the text specified via the Text parameter to the rectangle 
specified via the rect parameter.
The part of the text that is not within the rectangle is cut.
The align parameter specifies the text alignment within this 
rectangle. Available values of the align parameter are described 
by the MAT_ group constants.

MDC::PatBlt(refer object RECT, int)

param Rect, PatBltCode;

	Fills a rectangle with the color specified via the BGColor 
parameter. The PatBltCode parameter specifies bit operation between 
the color specified via the BGColor parameter and the destination bitmap. 
Available constant values are defined by the PBLT_ group:
	PBLT_BLACKNESS		- black filling
	PBLT_WHITENESS		- white filling 
	PBLT_D_OR_P		- Destination OR Pattern
	PBLT_NOT_D_OR_P		- NOT (Destination OR Pattern)
	PBLT_D_AND_NOT_P	- Destination AND (NOT Pattern)
	PBLT_NOT_P			- NOT Pattern
	PBLT_P_AND_NOT_D	- Pattern AND (NOT Destination)
	PBLT_NOT_D			- NOT Destination
	PBLT_D_XOR_P		- Destination XOR Pattern
	PBLT_NOT_D_AND_P	- NOT (Destination AND Pattern)
	PBLT_D_AND_P		- Destination AND Pattern
	PBLT_NOT_P_XOR_D	- NOT (Pattern XOR Destination)
	PBLT_D				- Destination
	PBLT_D_OR_NOT_P		- Destination OR (NOT Patternt)
	PBLT_P				- Pattern
	PBLT_P_OR_NOT_D		- Pattern OR (NOT Destination)

MDC::Play(refer object MetaFile)

param MetaFile;

'Plays over' the metafile specified via the MetaFile parameter to the 
graphical device.

MDC::PolyLine(refer object Vector)

param Vect;

Draws the series of segments whose endpoints are determined by the 
vector specified via the Vect parameter.
	Vect - represents the vector which contains objects of the POINT 
		class and describes the polygon corners;
		or the vector whose elements contain two numbers 
		<<x, y>> which describe the appropriate points.
The drawing is performed with the pen which is currently selected in 
the MDC. 
	Note:
		The vector specified via the Vect parameter can not 
		contain the mix of POINT objects and <<x, y>> pair-vectors.

MDC::PolyLine5D(refer object Vector)

param Vect;

Draws the series of segments whose endpoints are determined by the 
vector specified via the Vect parameter.
	Vect - 	the elements of the vector specified via 
		the Vect parameter represent in turn the vectors 
		that may contain either three numbers and an object 
		of the ColorRef class
				<<x, y, Color>>,
			or six numbers:
				<<x, y, red, green, blue>>,
			that describe the appropriate points.
The drawing is performed similarly to Line3D.

MDC::Rect(number, number, number, number)

param left, top, right, bottom;

Draws a hollow rectangle with boundaries specified by 
the left, top, right, bottom parameters using the pen 
which is currently selected in the MDC.

MDC::Rect(refer object RECT)

param Rect;

Draws a hollow rectangle with boundaries defined by the object 
specified via the Rect parameter using the pen which is currently 
selected in the MDC.

MDC::ResetDC(void)

If the device was opened then it is closed and reopened.
If the device was closed this method does nothing.
This method is designed for application hag up prevention when working 
under debugging in the MS Windows operating system because it stops 
WM_PAINT message stream.

MDC::ResetMFont(void)

Restores in the MDC the font that was set before calling the SetMFont method.

MDC::ResetTools(void)

Sets all the resources selected in MDC (fonts, brushes, pens) to the 
state they had when the MDC object was created. 

MDC::SelectObject(refer object MHandle)

param Object;

Selects in the MDC the object specified via the Object parameter that 
describes any system resources. It can be MFont, BGColor or FGColor 
etc.
Actually this method duplicates features provided be methods mentioned 
above. But it allows using the operating system more efficiently. 
For instance, we have to use different fonts for drawing periodically.
Font creation is a time consuming operation in MS Windows (in contrast 
to X Windows). It is more favorable for us to have the predefined set 
of fonts in advance and then just select them in the MDC. 
While the SetMFont method will recreate font every time.

MDC::SetBgAttr(int)

param Attr;

Sets the brush attribute equal to the Attr parameter. 
Available values of the Attr parameter are described 
by the BG_ group constants.

MDC::SetBgColor(number, number, number)

param Red, Green, Blue;

Sets the brush color according to the Red, Green, Blue parameters.

MDC::SetBgColor(refer object ColorRef)

paran Color;
Sets the brush color (background filling color) equal
to the Color parameter.

MDC::SetBkColor(number, number, number)

param Red, Green, Blue;

Sets the color of the background under the printed 
text according to the Red, Green, Blue parameters.

MDC::SetBkColor(refer object ColorRef)

param Color;

Sets the color of the background under the printed 
text equal to the Color parameter.

MDC::SetBkMode(int)

param Attr;

Sets a mode of filling the background under the printed text.
Available values of the Attr parameter are defined by the constants from 
the BK_ group.

MDC::SetBrush(refer object ColorRef, int)

param Color, Attr;

Sets a brush with the color specified with the Color parameter and 
attribute specified with the Attr parameter.
Available values of the Attr parameter are described by the BG_ group 
constants.

MDC::SetFgAttr(int)

param Attr;

Sets the pen attribute equal to the Attr parameter. 
Available values of the Attr parameter are described 
by the FG_ group constants.

MDC::SetFgColor(number, number, number)

param Red, Green, Blue;

Sets the pen color according to the Red, Green, Blue parameters.

MDC::SetFgColor(refer object ColorRef)

paran Color;
Sets the pen color equal to the Color parameter.

MDC::SetLineWidth(number)

param Width;

Sets the pen width equal to the Width parameter.

MDC::SetLogicalUnitSize(number)

param UnitSize;

Sets the number of millimeters in one logical unit when performing 
information printout.

MDC::SetMFont(refer object String, number, int)

param FontName, FontSize,

FontAttr;
Selects (creates and sets in the MDC) a font for text output.
Parameters:
FontName - font name in text representation, 
FontSize - font size, 
FontAttr - font attribute.
Available values of the FontAttr parameter are described by 
the FT_ group constants.
 

MDC::SetMFont(refer object String, number, int, int)

param FontName, FontSize,

FontAttr, CharSet;
Selects (creates and sets in the MDC) a font for text output.
Parameters:
FontName - font name in text representation, 
FontSize - font size, 
FontAttr - font attribute.
	Available values of the FontAttr parameter are described 
	by the FT_ group constants.
CharSet  - font language (for more information 
	see the GFontDialog class in the GUI 
	library for Windows 95 and Windows NT).

MDC::SetMFont(refer object String, number, int, int, int)

param FontName, FontSize,

FontAttr, angle, CharSet;
Selects (creates and sets in the MDC) a font for text output.
Parameters:
FontName - font name in text representation, 
FontSize - font size, 
FontAttr - font attribute.
	Available values of the FontAttr parameter are described 
	by the FT_ group constants.
angle - angle in degrees
CharSet  - font language (for more information 
	see the GFontDialog class in the GUI 
	library for Windows 95 and Windows NT).

MDC::SetPen(refer object ColorRef, number, int)

param Color, Width, Attr;

Sets a pen with the color specified with the Color parameter, width 
specified with the Width parameter and attribute specified with the 
Attr parameter.
Available values of the Attr parameter are described by the FG_ group 
constants.

MDC::SetPixel(number, number, number, number, number)

param x, y, Red, Green,

Blue;
Draws a point using the color specified according to the Red, Green, 
Blue parameters with the coordinates specified via the (x,y) 
coordinates.

MDC::SetPixel(number, number, refer object ColorRef)

param x, y, Color;

Draws a point using the color specified via the Color parameter 
with the coordinates specified via the (x,y) coordinates.

MDC::SetTextColor(number, number, number)

param Red, Green, Blue;

Sets the print color according to the Red, Green, Blue parameters.

MDC::SetTextColor(refer object ColorRef)

param Color;

Sets the print color equal to the Color parameter.

MDC::Show(refer object MBmp, number, number)

param Bmp, x, y;

Outputs the bitmap specified via the Bmp parameter to the drawing 
region with the top-left corner offset specified via the (x, y) 
parameters.

MDC::Show(refer object MBmp, number, number, boolean)

param Bmp, x, y,UseBackgroundPalette;

Outputs the bitmap specified via the Bmp parameter to the drawing 
region with the top-left corner offset specified via the (x, y) 
parameters.
If the UseBackgroundPalette parameter == TRUE then the background 
palette is used when drawing the bitmap. Otherwise the primary 
palette is used.
Note:
When in 256-color system it is impossible to solve several queries 
on displaying 256-color bitmaps with different palettes.
That is why the operating system tries to solve a query on the primary 
palette in the best way and uses the best (according to its point of 
view) primary palette approximations for the background palettes.
However, if a user outputs more than one bitmap with the primary 
palette request then he allows the printing system to choose which 
palette will be primary and which palettes will be converted to 
background ones.

MDC::Show(refer object MBmp, number, number, boolean, refer object RECT)

param Bmp, x, y, UseBackgroundPalette, SizeRect;

Outputs the bitmap specified via the Bmp parameter to the drawing 
region with the top-left corner offset specified via the (x, y) 
parameters.
At that the bitmap image is cut according to the size of the rectangle 
specified via the SizeRect parameter that is the drawing is performed 
in the following rectangle: 
(x, y, x + SizeRect.right -SizeRect.left,
					y + SizeRect.bottom - SizeRect.top).
If the UseBackgroundPalette parameter == TRUE then the background 
palette is used when drawing the bitmap. Otherwise the primary palette 
is used.

MDC::Show(refer object MBmp, refer object RECT)

param Bmp, DestinationRect;

Outputs the bitmap specified via the Bmp parameter to the rectangle 
specified via the DestinationRect parameter with clipping.

MDC::Show(refer object MBmp, refer object RECT, boolean)

param Bmp, DestinationRect, UseBackgroundPalette;

Outputs the bitmap specified via the Bmp parameter to the rectangle 
specified via the DestinationRect parameter with clipping.
If the UseBackgroundPalette parameter == TRUE then the background 
palette is used when drawing the bitmap. Otherwise the primary palette 
is used.

MDC::Show(refer object MBmp, refer object RECT, boolean, refer object RECT)

param Bmp, DestinationRect, UseBackgroundPalette, BmpRect;

Outputs the part of the bitmap specified via the Bmp parameter to the 
rectangle specified via the DestinationRect parameter with clipping.
The bitmap part represents the rectangle specified via the BmpRect 
parameter.
If the UseBackgroundPalette parameter == TRUE then the background 
palette is used when drawing the bitmap. Otherwise the primary 
palette is used.

MDC::Show(refer object MetaFile, number, number)

param MetaFile, x, y;

Outputs the metafile specified via the MetaFile parameter to the 
drawing region with the top-left corner offset specified via 
the (x, y) parameters.

MDC::StartPage(void)

Opens a new printer page.

MDC::Stretch(refer object MBmp, refer object RECT)

param Bmp, DestinationRect;

Outputs the bitmap specified via the Bmp parameter to the rectangle 
specified via the DestinationRect parameter with scaling.
(the bitmap is enlarged or shrunken according to the size of the 
rectangle specified via the DestinationRect parameter).

MDC::Stretch(refer object MBmp, refer object RECT, boolean)

param Bmp, DestinationRect, UseBackgroundPalette;

Outputs the bitmap specified via the Bmp parameter to the rectangle 
specified via the DestinationRect parameter with scaling.
(the bitmap is enlarged or shrunken according to the size of the 
rectangle specified via the DestinationRect parameter).
If the UseBackgroundPalette parameter == TRUE then the background 
palette is used when drawing the bitmap. Otherwise the primary 
palette is used.

MDC::Stretch(refer object MBmp, refer object RECT, boolean, refer object RECT)

param Bmp, DestinationRect, UseBackgroundPalette, BmpRect;

Outputs the part of the bitmap specified via the Bmp parameter to the 
rectangle specified via the DestinationRect parameter with scaling.
The bitmap part represents the rectangle specified via the BmpRect 
parameter.
(the bitmap part in the rectangle specified via the BmpRect 
parameter is enlarged or shrunken according to the size of the 
rectangle specified via the DestinationRect parameter).
If the UseBackgroundPalette parameter == TRUE then the background 
palette is used when drawing the bitmap. Otherwise the primary 
palette is used.

MDC::Stretch(refer object MetaFile, refer object RECT)

param MetaFile, DestinationRect;

Outputs the metafile specified via the MetaFile parameter to the 
rectangle specified via the DestinationRect parameter with scaling.
(the metafile is enlarged or shrunken according to the size of the 
rectangle specified via the DestinationRect parameter).

MDC::UnClip(void)

Disables the window drawing region clipping. 

MDC::UnSelectObject(refer object MHandle)

param Object;

Releases the graphical resource that was previously selected in 
the MDC by the SelectObject method.

MDC::~MDC(void)

This destructor closes all opened devices and releases all captured 
resources.

Class MDirectBmp : MBmp

Methods:


Class MFont : MHandle

#module root.graph
The MFont class represents a font as the system resource.
It is designed to be used by the MDC class (for more information see 
the MDC::SelectObject method). As the font creation is a time 
consuming operation (takes considerable time of the operating system) 
then for drawing an image that contains texts written with different 
fonts it is more efficient to have the predefined set of fonts in 
advance and then just select them in the MDC by the SelectObject 
method than dynamically create fonts by the MDC::SetMFont method. 
The MFont class does not have fields that are visible from Pluk level.
class MFont { };

Methods:


MFont::GetAngle(void)

Returns turning angle in degrees.

MFont::GetAttr(void)

Returns an integer number that represents the font attribute. 
The list of possible attribute values is enumerated in the 
FT_ group constants.

MFont::GetCharSet(void)

Returns an integer number that represents the font language. 

MFont::GetName(void)

Returns the font name.

MFont::GetSize(void)

Returns the font size.

MFont::GetSizeForCurrentMode(void)

Returns the font size which corresponds to the font in the current 
mode (large, small...) because the small font is always used in the MFont.

MFont::MFont(copy)

param srcFont;

This constructor creates the copy of the font specified via the 
srcFont parameter.

MFont::MFont(refer object String, number, int)

param FontName, FontSize, FontAttr;

This constructor creates a font with the name specified via the 
FontName parameter, with the font size specified via the FontSize 
parameter and the attribute specified via the FontAttr parameter.
Available values of the FontAttr parameter are enumerated in 
the FT_ group constants.

MFont::MFont(refer object String, number, int, int)

param FontName, FontSize, FontAttr, angle, CharSet;

This constructor creates a font with the name specified via the 
FontName parameter, with the font size specified via the FontSize 
parameter and the attribute specified via the FontAttr parameter.
Available values of the FontAttr parameter are enumerated in 
the FT_ group constants.
angle - angle in degrees
CharSet  - font language (for more information see the GFontDialog 
	class in the GUI library for Windows 95 and Windows NT).

MFont::MFont(refer object String, number, int, int, int)

param FontName, FontSize, FontAttr, angle, CharSet;

This constructor creates a font.
Parameters:
FontName - font name in text representation, 
FontSize - font size, 
FontAttr - font attribute.
Available values of the FontAttr parameter are described by the 
FT_ group constants.
angle - angle in degrees
CharSet  - font language (for more information see the 
	GFontDialog class in the GUI library for Windows 95 and Windows NT).

MFont::MFont(void)

This constructor creates the system font.

MFont::SetSystemMode(void)

Converts font size according to the parameters presetted for fonts 
in the system.

MFont::ToCurrentMode(void)

Converts the font size which corresponds to the font in the current 
mode (large, small...) and changes font to this size because the small 
font is always used in the MFont.

MFont::~MFont(void)

This destructor deletes a font and releases the system resources.

Class MHandle

#module root.graph
The MHandle class is the common ancestor of all subsequent classes 
included in the library. This class is the abstract class that is its 
object creation raises an error. It should not be used at the user 
level.
This class does not have members that are visible from Pluk.
class Mhandle { };

Methods:


MHandle::MHandle(void)

This is the only defined method. This constructor raises 
an error when the attempt of the abstract class object creation is made.

Class MIcon : MPicture

#module root.graph

Methods:


MIcon::GetANDImage(void)

Returns a monochrome bitmap (mask)

MIcon::GetHeight(void)

Returns icon height

MIcon::GetWidth(void)

Returns icon width

MIcon::GetXORImage(void)

Returns a bitmap EXCLUSIVE OR icon mask

MIcon::Load(object String)

param filenam;

Load an icon from the file

MIcon::MIcon(copy)

param src;

This constructor creates a graphic object which is the copy of the 
object specified via the src parameter.

MIcon::MIcon(refer object MIcon)

param src;

This constructor creates a graphic object which is the copy of the 
object specified via the src parameter.

MIcon::MIcon(void)

This constructor creates an empty icon

MIcon::Save(object String)

param filename;

Saves an icon to the file

MIcon::SetImage(refer object MBmp, refer object MBmp)

param andBmp, xorBmp;

Creates an icon according to masks

Class MPalette : MHandle

#module root.graph
The MPalette class is designed for palette creation and manipulation 
when working with devices (bitmaps) that do not have RGB true colors 
and color recalculation is performed according to the limited table - 
palette.
There are from 2 till 256 colors in the palette. 
Standard values are: 2, 16, 256 colors.
The class itself has the following specification:
	class Palette { }; and does not have fields that are visible 
from Pluk level.
The main function of this class is to be used as the object selected 
in the MDC via the SelectObject method.

Methods:


MPalette::GetIndex(refer object ColorRef)

param Color;

Returns the index of the color specified via the Color parameter in 
the palette.

MPalette::GetNumColors(void)

Returns the number of colors in the palette.

MPalette::GetRGB(int)

param Index;

Returns the ColorRef that corresponds to the appropriate index in the palette. 

MPalette::GetRGBPalette(void)

Returns the ColorRef vector of the palette colors.

MPalette::MPalette(int)

param Length;

This constructor creates the gray palette with the number 
of colors specified via the Length parameter.

MPalette::MPalette(refer object Palette)

param Palette;

This constructor creates an MPalette object on basis 
of the object specified via the Palette parameter.

MPalette::MPalette(refer object String, int)

param BytePalette, Length;

This constructor creates a palette according to the binary information 
stored in the string specified via the BytePalette parameter from the 
number of entries specified via the Length parameter. Bytes in the 
string specified via the BytePalette parameter are interpreted as the 
RGB triplets.

MPalette::MPalette(refer object Vector)

param Colors;

This constructor creates a MPalette object on basis of the passed colors.
At that the Colors parameter must contain the vector of ColorRef class 
objects.

MPalette::MPalette(void)

This constructor creates the standard 256-color palette.

MPalette::SetColors(int, refer object ColorRef)

param offest, Color;

Sets the color specified via the Color parameter to the palette with 
the index specified via the offset parameter. 
New color is applied after the next call of the MDC::SelectObject method.

MPalette::SetColors(int, refer object Vector)

param offest, Colors;

Sets colors to the palette beginning with the index specified 
via the offset parameter. At that the Colors parameter must 
contain the vector of ColorRef class objects.
New color is applied after the next call of the MDC::SelectObject method.

Class MPicture : MHandle


Class MetaFile : MPicture

#module root.graph
The MetaFile class represents an interface to work with 
MS Windows 3.xx metafiles. In order to draw into a metafile 
it should be selected as the mapping device for an object of 
the MDC class via which the drawing is performed 
(for more information see the MDC::OpenMetaFile method).
This class does not have members that can be accessed from Pluk level.
class MetaFile { };
The FGColor class has the following defined methods:

Methods:


MetaFile::ClipboardToMetaFile(void)

Copies the Windows Clipboard contents to the metafile.
Returns TRUE if succeeded, otherwise FALSE.

MetaFile::GetHeight(void)

Returns the metafile height.

MetaFile::GetWidth(void)

Returns the metafile width.

MetaFile::Load(refer object String)

param FileName;

Loads a metafile from the file specified via the FileName parameter 
using the "Windows Metafile WMF" format.
Returns TRUE if succeeded, otherwise FALSE.

MetaFile::MetaFile(copy)

param srcMetaFile;

This constructor creates the copy of the metafile specified via the 
srcMetaFile parameter.

MetaFile::MetaFile(number, number)

param width, height;

This constructor creates a metafile with the size specified via the 
(width x height) parameters.

MetaFile::MetaFile(refer object MetaFile)

param srcMetaFile;

This constructor creates the copy of the metafile specified via the 
srcMetaFile parameter.

MetaFile::MetaFile(refer object String)

param FileName;

This constructor creates a metafile and reads data from the file 
specified via the FileName parameter using the "Windows Metafile - WMF" format.

MetaFile::MetaFileToClipboard(void)

Copies the metafile contents to the Windows Clipboard.
Returns TRUE if succeeded, otherwise FALSE.

MetaFile::Save(refer object String)

param FileName;

Saves a metafile to the file specified via the FileName parameter 
using the "Windows Metafile WMF" format.
Returns TRUE if succeeded, otherwise FALSE.

MetaFile::~MetaFile(void)

This destructor deletes a metafile and releases the captured system 
resources.

Class Palette

#module root.graph
The Palette class is designed for palette creation and manipulation 
when working with devices (bitmaps) that do not have RGB true colors 
and color recalculation is performed according to the limited table - 
palette.
There are from 2 till 256 colors in the palette. 
Standard values are: 2, 16, 256 colors.
The class itself has the following specification:
	class Palette { }; and does not have fields 
that are visible from Pluk.
The main function of this class is to pass parameters and 
acquire values from the drawing devices (bitmaps).

Methods:


Palette::GetColor(int)

param index;

This method returns the color (the ColorRef class object) that has 
the palette index specified via index parameter.

Palette::Palette(int)

param Length;

This constructor creates the gray palette with the number of 
colors specified via the Length parameter.

Palette::Palette(refer object String, int)

param BytePalette, Length;

This constructor creates a palette according to the binary information 
stored in the string specified via the BytePalette parameter from the 
number of entries specified via the Length parameter. Bytes in the 
string specified via the BytePalette parameter are interpreted as the 
RGB triplets.

Palette::Palette(void)

This constructor creates the gray palette with 256 colors.

Palette::SetColor(int, refer object ColorRef)

param index, Color;

This method sets the color specified via the Color parameter to the 
palette with the index specified via the index parameter. 

Class Region : MHandle

#module root.graph
Clip region creation

Methods:


Region::&(refer object Region)

param rgn;

Region intersection creation 

Region::-(refer object Region)

param rgn;

Region subtraction from the initial region 

Region::==(refer object Region)

param rgn;

Regions comparison 

Region::Copy(refer object Region)

param rgn;

Creates the region copy

Region::Ellipse(refer object RECT)

param rect;

Elliptic region creation

Region::GetRect(void)

Returns the rectangular (RECT) that bounds the region 

Region::IsInRegion(refer object POINT)

param point;

Check whether the point specified via the point parameters is 
within the region. 

Region::IsInRegion(refer object RECT)

param rect;

Check whether the rectangular specified via the rect parameters is 
within the region. 

Region::MoveTo(number, number)

param x, y;

Moves the region origin

Region::Polygon(refer object Vector)

param points;

Polygonal region creation
points - a vector of the POINT type objects

Region::Rect(refer object RECT)

param rect;

Rectangular region creation 

Region::Region(copy)

Copy-constructor

Region::Region(void)

Empty region creation 

Region::Reset(void)

Resets a region

Region::Round(refer object RECT, number, number)

param rect, x, y;

Creation of a rectangular region with rounded corners 
The x, y parameters specifies the width and height of 
the ellipse used for rounded corners creation.

Region::^(refer object Region)

param rgn;

Region creation with deletion of intersected sections 

Region::|(refer object Region)

param rgn;

Regions merging

Byte2ToByte(refer object String, int)

param bits, byteNum;

Converts a double-byte image into a byte image.
bits		Double-byte image bits.
byteNum	0 - copies even bytes of the initial image 
		to the bytes of the destination image.
		1 - copies odd bytes of the initial image 
		to the bytes of the destination image.
Returns a byte image.

Byte3ToByte(refer object String, int)

param bits, byteNum;

Converts a triple-byte image into a byte image.
bits		Triple-byte image bits.
byteNum	The number of a byte to be copied.
		If this parameter is equal to -1 then 
		arithmetic average of these three bytes 
		is copied
Returns a byte image.

ByteToByte2(refer object String, int)

param bits, byteNum;

Converts a byte image into a double-byte image.
bits		Byte image bits..
byteNum	0 - copies bytes of the initial image to 
		the even bytes of the destination image. 
		1 - copies bytes of the initial image to 
		the odd bytes of the destination image.
Returns a double-byte image.

ByteToByte3(refer object String)

param bits;

Converts a byte image into a triple-byte image 
by coping one byte to three bytes.
bits		Byte image bits.
Returns a triple-byte image.

CreateNewBgPattern(refer object Vector)

param PatternBits;

Creates a texture which is used as the background brush.
The vector that consists of 8 bytes and forms 8x8 bit texture is 
passed as a parameter.
This method returns the number which is the texture index for 
using in the background brush constructor 
	BGColor::BGColor(refer object ColorRef, refer object ColorRef, int); 
and in the background brush color/attribute setting method
	BGColor::SetBGColor(refer object ColorRef, refer object ColorRef, int)

LoadMCursors(object String)

Reads a cursor from a file
Returns a vector that consists of cursors

LoadMCursorsFromBuffer(object String)

Reads a cursor from a buffer
Returns a vector that consists of cursors

LoadMIcons(object String)

Reads icons from a file
Returns a vector that consists of icons

LoadMIconsFromBuffer(object String)

Reads icons from a buffer
Returns a vector that consists of icons

QStretch_Byte(refer object String, number, number, refer object String, number, number)

param dst, dstWidth, dstHeight, src, srcWidth, srcHeight;

Byte image scaling using the qualitative software interpolation.
dst		Scaled image.
dstWidth	Scaled image width.
dstHeight	Scaled image height.
src		Initial image.
srcWidth	Initial image width.
srcHeight	Initial image height.
Comments
Horizontal scaling ratio is equal to dstWidth / srcWidth. 
Vertical scaling ratio is equal to dstHeight / srcHeight.

QStretch_RGB(refer object String, number, number, refer object String, number, number)

param dst, dstWidth, dstHeight, src, srcWidth, srcHeight;

Triple-byte image scaling using the qualitative software interpolation.
dst		Scaled image bits.
dstWidth	Scaled image width.
dstHeight	Scaled image height.
src		Initial image bits.
srcWidth	Initial image width.
srcHeight	Initial image height.
Comments
Horizontal scaling ratio is equal to dstWidth / srcWidth. 
Vertical scaling ratio is equal to dstHeight / srcHeight.

QStretch_Word(refer object String, number, number, refer object String, number, number)

param dst, dstWidth, dstHeight, src, srcWidth, srcHeight;

Double-byte image scaling using the qualitative software interpolation.
dst		Scaled image.
dstWidth	Scaled image width.
dstHeight	Scaled image height.
src		Initial image.
srcWidth	Initial image width.
srcHeight	Initial image height.
Comments
Horizontal scaling ratio is equal to dstWidth / srcWidth. 
Vertical scaling ratio is equal to dstHeight / srcHeight.

SaveMCursors(refer object Vector, object String)

param vCursors, FileName;

Writes a vector that consists of cursors to a file 

SaveMIcons(refer object Vector, object String)

param vIcons, FileName;

Writes a vector that consists of icons to a file 

Stretch2To1_Byte(refer object String, int, int)

param src_dst, srcWidth, srcHeight;

Resamples down a byte image by a factor of two.
src_dst	Initial image. After the completion of this method 
		the first quarter of this string contains the 
		resampled down image.
srcWidth	Initial image width.
srcHeight	Initial image height.

Stretch2To1_RGB(refer object String, int, int)

param src_dst, srcWidth, srcHeight;

Resamples down a triple-byte image by a factor of two.
src_dst		Initial image. After the completion of this method 
			the first quarter of this string contains the 
			resampled down image.
srcWidth	Initial image width.
srcHeight	Initial image height.

Stretch2To1_Word(refer object String, int, int)

param src_dst, srcWidth, srcHeight;

Resamples down a double-byte image by a factor of two.
src_dst		Initial image. After the completion of this method 
			the first quarter of this string contains the 
			resampled down image.
srcWidth	Initial image width.
srcHeight	Initial image height.

Stretch_Byte(refer object String, number, number, refer object String, number, number)

param dst, dstWidth, dstHeight, src, srcWidth, srcHeight;

Byte image scaling using the "nearest point" software algorithm.
dst		Scaled image.
dstWidth	Scaled image width.
dstHeight	Scaled image height.
src		Initial image.
srcWidth	Initial image width.
srcHeight	Initial image height.
Comments
Horizontal scaling ratio is equal to dstWidth / srcWidth. 
Vertical scaling ratio is equal to dstHeight / srcHeight.

Stretch_RGB(refer object String, number, number, refer object String, number, number)

param dst, dstWidth, dstHeight, src, srcWidth, srcHeight;

Triple-byte image scaling using the "nearest point" software algorithm.
dst		Scaled image bits.
dstWidth	Scaled image width.
dstHeight	Scaled image height.
src		Initial image bits.
srcWidth	Initial image width.
srcHeight	Initial image height.
Comments
Horizontal scaling ratio is equal to dstWidth / srcWidth. 
Vertical scaling ratio is equal to dstHeight / srcHeight.

Stretch_Word(refer object String, number, number, refer object String, number, number)

param dst, dstWidth, dstHeight, src, srcWidth, srcHeight;

Double-byte image scaling using the "nearest point" software algorithm.
dst		Scaled image.
dstWidth	Scaled image width.
dstHeight	Scaled image height.
src		Initial image.
srcWidth	Initial image width.
srcHeight	Initial image height.
Comments
Horizontal scaling ratio is equal to dstWidth / srcWidth. 
Vertical scaling ratio is equal to dstHeight / srcHeight.

Index: