mdc.dll
Classes:
Functions:
- Byte2ToByte(refer object String, int)
- Byte3ToByte(refer object String, int)
- ByteToByte2(refer object String, int)
- ByteToByte3(refer object String)
- ByteToByte3Ex(refer object String, int)
- CreateNewBgPattern(refer object Vector)
- LoadMCursors(object String)
- LoadMCursorsFromBuffer(object String)
- LoadMIcons(object String)
- LoadMIconsFromBuffer(object String)
- MPalette::SetDefaultPalette
- QStretch_Byte(refer object String, number, number, refer object String, number, number)
- QStretch_RGB(refer object String, number, number, refer object String, number, number)
- QStretch_Word(refer object String, number, number, refer object String, number, number)
- SaveMCursors(refer object Vector, object String)
- SaveMIcons(refer object Vector, object String)
- Stretch2To1_Byte(refer object String, int, int)
- Stretch2To1_RGB(refer object String, int, int)
- Stretch2To1_Word(refer object String, int, int)
- Stretch2To21_Byte(refer object String, int, int)
- Stretch2To21_RGB(refer object String, int, int)
- Stretch2To21_Word(refer object String, int, int)
- Stretch_Byte(refer object String, number, number, refer object String, number, number)
- Stretch_RGB(refer object String, number, number, refer object String, number, number)
- Stretch_Word(refer object String, number, number, refer object String, number, number)
- WordToWord2(refer object String, int)
#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:
param srcColor;
This constructor creates the copy of the brush specified via the
srcColor parameter.
param Red, Green, Blue;
This constructor creates a solid brush (without pattern) with the
color specified via the (Red, Green, Blue) triplet.
param Color;
This constructor creates a solid brush (without pattern) with the
color specified via the Color parameter.
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.
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.
This constructor creates a brush that corresponds
to the system brush ("default" brush).
Returns an integer number that represents the brush pattern.
Available returned values are enumerated in the BG_ group constants.
Returns an object of the ColorRef class that represents the brush color.
Nulls the old brush content and converts it to the solid black brush.
param Attr;
param Color;
Sets a new brush color.
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.
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.
param Color;
Changes the brush color to the color specified via the Color
parameter.
This destructor releases system resources.
#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:
param Color;
This constructor creates an object with the color specified
via the 32 digit value specified via the Color parameter.
param Red, Green, Blue;
This constructor creates an object with the color
specified via the Red, Green, Blue triplet.
This constructor creates an object of the black color.
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.
This method returns the blue component of the ColorRef object.
This method returns the green component of the ColorRef object.
This method returns the red component of the ColorRef object.
param Blue;
This method sets the blue component of the ColorRef object.
param Green;
This method sets the green component of the ColorRef object.
param Red;
This method sets the red component of the ColorRef object.
param Red, Green, Blue;
This method sets the object color according to the Red, Green, Blue triplet.
#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:
param srcColor;
This constructor creates the copy of the pen specified via the
srcColor parameter.
param Red, Green, Blue;
This constructor creates a solid brush of the unit width with the
color specified via the (Red, Green, Blue) triplet.
param Color;
This constructor creates a solid pen of the unit width with the
color specified via the Color parameter.
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.
This constructor creates a color (pen) that corresponds to the system
color ("default" color).
Returns an integer number that represents the pen attribute.
Available returned values are enumerated in the FG_ group constants.
Returns an object of the ColorRef class that represents the pen color.
Returns the pen width.
Nulls the old pen content and converts it to the solid black pen.
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.
param Color;
Changes the pen color to the color specified via the Color
parameter.
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.
param Width;
Sets the pen width equal to the Width parameter.
This destructor releases system resources.
#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:
- ClipboardToMBmp(void)
- Copy(refer object MBmp)
- CopyWinRect(int, refer object RECT)
- CopyWinRect(refer object GWnd, refer object RECT)
- Flip(number, number, number, number)
- GetBitmapBits(void)
- GetDIBits(void)
- GetHeight(void)
- GetNumColors(void)
- GetRGBPalette(void)
- GetWidth(void)
- IsRGBBitmap(void)
- Load(refer object Palette, refer object String, int, int)
- Load(refer object String)
- Load(refer object String, int, int)
- LoadFromFile(refer object BaseString)
- LoadGIF(refer object BaseString)
- LoadGIFString(refer object String)
- LoadRaw(refer object String, int, int)
- MBmp(copy)
- MBmp(number, number)
- MBmp(number, number, refer object MPalette)
- MBmp(object Vector)
- MBmp(refer object BaseString)
- MBmp(refer object Palette, refer object String, int, int)
- MBmp(refer object String, int, int)
- MBmp(void)
- MBmpToClipboard(void)
- Rotate(number)
- Rotate(number, number, number)
- Rotate(number, object RECT, number, number)
- SaveByPalette(refer object BaseString)
- SaveGIF(refer object BaseString)
- SaveToFile(refer object BaseString)
- SetBitmapBits(refer object String)
- SetInverse(boolean)
- SetRGBPalette(refer object Palette)
- SetRGBPalette(refer object Vector)
- Show(refer any)
- Show(void)
- ~MBmp(void)
Copies the Windows Clipboard contents to the bitmap.
Returns TRUE if succeeded, otherwise FALSE.
param srcBmp;
Copies the bitmap specified via the srcBmp parameter to the bitmap
that receives message. The old content of the receiver is destroyed.
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.
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.
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).
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.
Returns an object of the String type that contains the bitmap bits in
the Windows DIB (Device Independent Bitmap) form.
Returns the bitmap height.
Returns the number of colors in the bitmap palette.
Returns a vector that consists of the ColorRef type objects that
represent the bitmap palette colors.
Returns the bitmap width.
Returns FALSE if the bitmap has the palette, otherwise TRUE.
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.
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).
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.
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.
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.
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.
param srcBmp;
This constructor creates the graphic object which represent
the copy of the object specified via the srcBmp parameter.
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.
param width, height, paltte;
This creates a bitmap with the palette and size specified via the
(width x height) parameters.
param FileName;
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.
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.
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.
Copies the bitmap contents to the Windows Clipboard.
Returns TRUE if succeeded, otherwise FALSE.
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).
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.
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.
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.
param FileName;
Writes a bitmap to the file specified via the FileName parameter using
the GIF87a format.
Returns TRUE if succeeded, otherwise FALSE.
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.
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.
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.
param Palette;
The palette specified via the Palette parameter is set as the bitmap
palette.
Returns TRUE if succeeded, otherwise FALSE.
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.
Открывает окно, в котором визуализируется
изображение self.
Открывает окно, в котором визуализируется
изображение self.
Destructor. Releases the allocated memory for bit and palette.
Releases a bitmap as the operating system resource.
#module root.graph
Methods:
Returns a monochrome bitmap (mask)
Returns icon height
Returns icon width
X coordinate cursor position
Returns a bitmap EXCLUSIVE OR icon mask
Y coordinate cursor position
param filenam;
Load an icon from the file
param src;
This constructor creates a graphic object which is the copy of the
object specified via the src parameter.
param src;
This constructor creates a graphic object which is the copy of the
object specified via the src parameter.
This constructor creates an empty icon
param filename;
Saves an icon to the file
param andBmp, xorBmp;
Creates an icon according to masks
param X, Y;
Sets the Y coordinate of the cursor position
#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:
- Arc(refer object RECT, refer object POINT, refer object POINT)
- Bar(number, number, number, number)
- Bar(refer object RECT)
- BitmapRasterOp(int)
- BorderedBar(number, number, number, number)
- BorderedBar(refer object RECT)
- ClipRect(refer object RECT)
- ClipRegion(refer object Region)
- CloseDC(void)
- CloseMBmp(void)
- CloseMetaFile(void)
- ClosePrinter(void)
- ColorRasterOp(int)
- DlgPageSetup(void)
- Ellipse(number, number, number, number)
- Ellipse(refer object RECT)
- EndPage(void)
- EnumPrinters(void)
- ExcludeClipRect(refer object RECT)
- Fill(number, number, refer object ColorRef)
- Fill(number, number, refer object ColorRef, boolean)
- FillArc(refer object RECT, refer object POINT, refer object POINT)
- FillChord(refer object RECT, refer object POINT, refer object POINT)
- FillEllipse(number, number, number, number)
- FillEllipse(refer object RECT)
- FillPolygon(refer object Vector)
- FillRegion(refer object Region)
- FrameRegion(refer object Region)
- GetBgAttr(void)
- GetBgColor(void)
- GetClientRect(void)
- GetClipRect(void)
- GetColorRasterOp(void)
- GetDCType(void)
- GetFgAttr(void)
- GetFgColor(void)
- GetFontAngle(void)
- GetFontAttr(void)
- GetFontCharSet(void)
- GetFontName(void)
- GetFontSize(void)
- GetLineWidth(void)
- GetLogicalUnitSize(void)
- GetPageOrient(void)
- GetPaintRect(void)
- GetPixel(number, number)
- GetStringRect(refer object BaseString)
- GetStringRect(refer object BaseString, int)
- GetTextColor(void)
- IntersectClipRect(refer object RECT)
- IsOpenDC(void)
- IsRectVisible(refer object RECT)
- IsRunPage(void)
- IsWindowDC(void)
- Line(number, number, number, number)
- Line5D(number, number, number, number, number, number, number, number, number, number)
- Line5D(number, number, number, number, refer object ColorRef, refer object ColorRef)
- MDC(copy)
- MDC(int)
- MDC(refer object GWnd)
- MDC(void)
- OpenDC(boolean)
- OpenDC(void)
- OpenMBmp(refer object MBmp)
- OpenMetaFile(refer object MetaFile)
- OpenPrinter(int)
- OpenPrinter(int, boolean)
- OpenPrinter(int, refer object GWnd)
- OpenPrinter(refer object String, int)
- OpenPrinter(void)
- OutText(number, number, number, number, refer object BaseString, int)
- OutText(number, number, refer object BaseString)
- OutText(refer object RECT, refer object BaseString, int)
- PatBlt(refer object RECT, int)
- Play(refer object MetaFile)
- PolyLine(refer object Vector)
- PolyLine5D(refer object Vector)
- Rect(number, number, number, number)
- Rect(refer object RECT)
- ResetDC(void)
- ResetMFont(void)
- ResetTools(void)
- ScaleFont(int)
- SelectObject(refer object MHandle)
- SetBgAttr(int)
- SetBgColor(number, number, number)
- SetBgColor(refer object ColorRef)
- SetBkColor(number, number, number)
- SetBkColor(refer object ColorRef)
- SetBkMode(int)
- SetBrush(refer object ColorRef, int)
- SetFgAttr(int)
- SetFgColor(number, number, number)
- SetFgColor(refer object ColorRef)
- SetLineWidth(number)
- SetLogicalUnitSize(number)
- SetMFont(refer object String, number, int)
- SetMFont(refer object String, number, int, int)
- SetMFont(refer object String, number, int, int, int)
- SetPageSize(int, int)
- SetPen(refer object ColorRef, number, int)
- SetPixel(number, number, number, number, number)
- SetPixel(number, number, refer object ColorRef)
- SetTextColor(number, number, number)
- SetTextColor(refer object ColorRef)
- Show(refer object MBmp, number, number)
- Show(refer object MBmp, number, number, boolean)
- Show(refer object MBmp, number, number, boolean, refer object RECT)
- Show(refer object MBmp, refer object RECT)
- Show(refer object MBmp, refer object RECT, boolean)
- Show(refer object MBmp, refer object RECT, boolean, refer object RECT)
- Show(refer object MetaFile, number, number)
- StartPage(void)
- Stretch(refer object MBmp, refer object RECT)
- Stretch(refer object MBmp, refer object RECT, boolean)
- Stretch(refer object MBmp, refer object RECT, boolean, refer object RECT)
- Stretch(refer object MetaFile, refer object RECT)
- UnClip(void)
- UnSelectObject(refer object MHandle)
- ~MDC(void)
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.
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.
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.
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
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.
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.
param Rect;
Sets the clip region equal to the Rect parameter.
param Reg;
Sets the graphic clip region according to the region specified via the
Reg parameter.
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.
Closes MDC for drawing into the bitmap.
The bitmap is released and can be destroyed.
Closes MDC for drawing into the metafile.
The metafile is released and can be destroyed.
Closes the printer.
Returns TRUE if the operation was successful. Otherwise - FALSE.
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
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.
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.
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.
param Rect;
Excludes the rectangle specified via the Rect parameter from the
drawing region.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
Returns the ColorRef object that contains the brush color which is
selected in the MDC for background filling.
Returns an object of the RECT type that contains the region (its size)
into which the current MDC can draw.
Returns an object of the RECT class that defines the graphic clip region.
The methods of setting graphic device parameters.
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
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.
Returns the ColorRef object that contains the pen color which is
selected in the MDC for drawing.
Returns font turning angle in degrees.
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.
Returns an integer number that determines font language.
Returns an object of the String type that contains text
representation of the name of the font selected in the MDC.
Returns an integer number that determines the size of the
font selected in the MDC.
Returns pen width.
Returns an object of the RECT type that contains the region that must
be redrawn according to the operating system demand.
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.
param String;
Returns the RECT object whose size allows allocating text passed
by the String parameter when using the selected font size.
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.
Returns the ColorRef object that contains the color which is used for
text output within the graphic device.
param Rect;
Sets the drawing region as the intersection of the existing drawing
region with the rectangle specified via the Rect parameter
Returns TRUE if graphic device is opened, otherwise - FALSE
param Rect;
Returns TRUE if at least a part of the Rect rectangle is visible.
Otherwise returns FALSE.
Indicates whether the page in the printer closed or not.
Returns TRUE if it is opened, otherwise - FALSE.
Returns TRUE if graphic device was created for a window.
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.
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.
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.
param srcMDC;
This constructor creates a graphic object which is the copy of the
object specified via the srcMDC parameter.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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)
param MetaFile;
'Plays over' the metafile specified via the MetaFile parameter to the
graphical device.
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.
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.
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.
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.
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.
Restores in the MDC the font that was set before calling the SetMFont method.
Sets all the resources selected in MDC (fonts, brushes, pens) to the
state they had when the MDC object was created.
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.
param Attr;
Sets the brush attribute equal to the Attr parameter.
Available values of the Attr parameter are described
by the BG_ group constants.
param Red, Green, Blue;
Sets the brush color according to the Red, Green, Blue parameters.
paran Color;
Sets the brush color (background filling color) equal
to the Color parameter.
param Red, Green, Blue;
Sets the color of the background under the printed
text according to the Red, Green, Blue parameters.
param Color;
Sets the color of the background under the printed
text equal to the Color parameter.
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.
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.
param Attr;
Sets the pen attribute equal to the Attr parameter.
Available values of the Attr parameter are described
by the FG_ group constants.
param Red, Green, Blue;
Sets the pen color according to the Red, Green, Blue parameters.
paran Color;
Sets the pen color equal to the Color parameter.
param Width;
Sets the pen width equal to the Width parameter.
param UnitSize;
Sets the number of millimeters in one logical unit when performing
information printout.
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.
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).
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).
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.
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.
param x, y, Color;
Draws a point using the color specified via the Color parameter
with the coordinates specified via the (x,y) coordinates.
param Red, Green, Blue;
Sets the print color according to the Red, Green, Blue parameters.
param Color;
Sets the print color equal to the Color parameter.
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.
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.
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.
param Bmp, DestinationRect;
Outputs the bitmap specified via the Bmp parameter to the rectangle
specified via the DestinationRect parameter with clipping.
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.
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.
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.
Opens a new printer page.
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).
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.
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.
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).
Disables the window drawing region clipping.
param Object;
Releases the graphical resource that was previously selected in
the MDC by the SelectObject method.
This destructor closes all opened devices and releases all captured
resources.
Methods:
- CopyToBitmapBits(refer object Buffer)
- CopyToBitmapBits(refer object Buffer, int, int)
- CopyToBitmapBits(refer object String)
- CopyToBitmapBits(refer object String, int, int)
- GetBitmapBits(void)
- Load(int, int)
- Load(refer object Palette, int, int)
- MDirectBmp(void)
#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:
Returns turning angle in degrees.
Returns an integer number that represents the font attribute.
The list of possible attribute values is enumerated in the
FT_ group constants.
Returns an integer number that represents the font language.
Returns the font name.
Returns the font size.
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.
param srcFont;
This constructor creates the copy of the font specified via the
srcFont parameter.
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.
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).
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).
This constructor creates the system font.
Converts font size according to the parameters presetted for fonts
in the system.
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.
This destructor deletes a font and releases the system resources.
#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:
This is the only defined method. This constructor raises
an error when the attempt of the abstract class object creation is made.
#module root.graph
Methods:
Returns a monochrome bitmap (mask)
Returns icon height
Returns icon width
Returns a bitmap EXCLUSIVE OR icon mask
param filenam;
Load an icon from the file
param src;
This constructor creates a graphic object which is the copy of the
object specified via the src parameter.
param src;
This constructor creates a graphic object which is the copy of the
object specified via the src parameter.
This constructor creates an empty icon
param filename;
Saves an icon to the file
param andBmp, xorBmp;
Creates an icon according to masks
#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:
param Color;
Returns the index of the color specified via the Color parameter in
the palette.
Returns the number of colors in the palette.
param Index;
Returns the ColorRef that corresponds to the appropriate index in the palette.
Returns the ColorRef vector of the palette colors.
param Length;
This constructor creates the gray palette with the number
of colors specified via the Length parameter.
param Palette;
This constructor creates an MPalette object on basis
of the object specified via the Palette parameter.
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.
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.
This constructor creates the standard 256-color palette.
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.
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.
#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:
Copies the Windows Clipboard contents to the metafile.
Returns TRUE if succeeded, otherwise FALSE.
Returns the metafile height.
Returns the metafile width.
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.
param srcMetaFile;
This constructor creates the copy of the metafile specified via the
srcMetaFile parameter.
param width, height;
This constructor creates a metafile with the size specified via the
(width x height) parameters.
param srcMetaFile;
This constructor creates the copy of the metafile specified via the
srcMetaFile parameter.
param FileName;
This constructor creates a metafile and reads data from the file
specified via the FileName parameter using the "Windows Metafile - WMF" format.
Copies the metafile contents to the Windows Clipboard.
Returns TRUE if succeeded, otherwise FALSE.
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.
This destructor deletes a metafile and releases the captured system
resources.
#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:
param index;
This method returns the color (the ColorRef class object) that has
the palette index specified via index parameter.
param Length;
This constructor creates the gray palette with the number of
colors specified via the Length parameter.
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.
This constructor creates the gray palette with 256 colors.
param index, Color;
This method sets the color specified via the Color parameter to the
palette with the index specified via the index parameter.
#module root.graph
Clip region creation
Methods:
param rgn;
Region intersection creation
param rgn;
Region subtraction from the initial region
param rgn;
Regions comparison
param rgn;
Creates the region copy
param rect;
Elliptic region creation
Returns the rectangular (RECT) that bounds the region
param point;
Check whether the point specified via the point parameters is
within the region.
param rect;
Check whether the rectangular specified via the rect parameters is
within the region.
param x, y;
Moves the region origin
param points;
Polygonal region creation
points - a vector of the POINT type objects
param rect;
Rectangular region creation
Copy-constructor
Empty region creation
Resets a region
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.
param rgn;
Region creation with deletion of intersected sections
param rgn;
Regions merging
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.
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.
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.
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.
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)
Reads a cursor from a file
Returns a vector that consists of cursors
Reads a cursor from a buffer
Returns a vector that consists of cursors
Reads icons from a file
Returns a vector that consists of icons
Reads icons from a buffer
Returns a vector that consists of icons
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.
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.
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.
param vCursors, FileName;
Writes a vector that consists of cursors to a file
param vIcons, FileName;
Writes a vector that consists of icons to a file
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.
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.
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.
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.
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.
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.
- &, method of class Region
- -, method of class Region
- ==, method of class Region
- ^, method of class Region
- Arc, method of class MDC
- Bar, method of class MDC
- BGColor, class
- BGColor, method of class BGColor
- BitmapRasterOp, method of class MDC
- BorderedBar, method of class MDC
- Byte2ToByte, function
- Byte3ToByte, function
- ByteToByte2, function
- ByteToByte3, function
- ClipboardToMBmp, method of class MBmp
- ClipboardToMetaFile, method of class MetaFile
- ClipRect, method of class MDC
- ClipRegion, method of class MDC
- CloseDC, method of class MDC
- CloseMBmp, method of class MDC
- CloseMetaFile, method of class MDC
- ClosePrinter, method of class MDC
- ColorRasterOp, method of class MDC
- ColorRef, class
- ColorRef, method of class ColorRef
- Copy, method of class MBmp
- Copy, method of class Region
- CopyWinRect, method of class MBmp
- CreateNewBgPattern, function
- Ellipse, method of class MDC
- Ellipse, method of class Region
- EndPage, method of class MDC
- ExcludeClipRect, method of class MDC
- FGColor, class
- FGColor, method of class FGColor
- Fill, method of class MDC
- FillArc, method of class MDC
- FillChord, method of class MDC
- FillEllipse, method of class MDC
- FillPolygon, method of class MDC
- FillRegion, method of class MDC
- Filter, method of class ColorRef
- Flip, method of class MBmp
- FrameRegion, method of class MDC
- GetANDImage, method of class MCursor
- GetANDImage, method of class MIcon
- GetAngle, method of class MFont
- GetAttr, method of class BGColor
- GetAttr, method of class FGColor
- GetAttr, method of class MFont
- GetB, method of class ColorRef
- GetBgAttr, method of class MDC
- GetBgColor, method of class MDC
- GetBitmapBits, method of class MBmp
- GetCharSet, method of class MFont
- GetClientRect, method of class MDC
- GetClipRect, method of class MDC
- GetColor, method of class BGColor
- GetColor, method of class FGColor
- GetColor, method of class Palette
- GetDCType, method of class MDC
- GetDIBits, method of class MBmp
- GetFgAttr, method of class MDC
- GetFgColor, method of class MDC
- GetFontAngle, method of class MDC
- GetFontAttr, method of class MDC
- GetFontCharSet, method of class MDC
- GetFontName, method of class MDC
- GetFontSize, method of class MDC
- GetG, method of class ColorRef
- GetHeight, method of class MBmp
- GetHeight, method of class MCursor
- GetHeight, method of class MetaFile
- GetHeight, method of class MIcon
- GetIndex, method of class MPalette
- GetLineWidth, method of class MDC
- GetName, method of class MFont
- GetNumColors, method of class MBmp
- GetNumColors, method of class MPalette
- GetPaintRect, method of class MDC
- GetPixel, method of class MDC
- GetR, method of class ColorRef
- GetRect, method of class Region
- GetRGB, method of class MPalette
- GetRGBPalette, method of class MBmp
- GetRGBPalette, method of class MPalette
- GetSize, method of class MFont
- GetSizeForCurrentMode, method of class MFont
- GetStringRect, method of class MDC
- GetTextColor, method of class MDC
- GetWidth, method of class FGColor
- GetWidth, method of class MBmp
- GetWidth, method of class MCursor
- GetWidth, method of class MetaFile
- GetWidth, method of class MIcon
- GetXHot, method of class MCursor
- GetXORImage, method of class MCursor
- GetXORImage, method of class MIcon
- GetYHot, method of class MCursor
- IntersectClipRect, method of class MDC
- IsInRegion, method of class Region
- IsOpenDC, method of class MDC
- IsRectVisible, method of class MDC
- IsRGBBitmap, method of class MBmp
- IsRunPage, method of class MDC
- IsWindowDC, method of class MDC
- Line, method of class MDC
- Line5D, method of class MDC
- Load, method of class MBmp
- Load, method of class MCursor
- Load, method of class MetaFile
- Load, method of class MIcon
- LoadFromFile, method of class MBmp
- LoadGIF, method of class MBmp
- LoadMCursors, function
- LoadMCursorsFromBuffer, function
- LoadMIcons, function
- LoadMIconsFromBuffer, function
- LoadRaw, method of class MBmp
- MBmp, class
- MBmp, method of class MBmp
- MBmpToClipboard, method of class MBmp
- MCursor, class
- MCursor, method of class MCursor
- MDC, class
- MDC, method of class MDC
- MDirectBmp, class
- MetaFile, class
- MetaFile, method of class MetaFile
- MetaFileToClipboard, method of class MetaFile
- MFont, class
- MFont, method of class MFont
- MHandle, class
- MHandle, method of class MHandle
- MIcon, class
- MIcon, method of class MIcon
- MoveTo, method of class Region
- MPalette, class
- MPalette, method of class MPalette
- MPicture, class
- OpenDC, method of class MDC
- OpenMBmp, method of class MDC
- OpenMetaFile, method of class MDC
- OpenPrinter, method of class MDC
- OutText, method of class MDC
- Palette, class
- Palette, method of class Palette
- PatBlt, method of class MDC
- Play, method of class MDC
- Polygon, method of class Region
- PolyLine, method of class MDC
- PolyLine5D, method of class MDC
- QStretch_Byte, function
- QStretch_RGB, function
- QStretch_Word, function
- Rect, method of class MDC
- Rect, method of class Region
- Region, class
- Region, method of class Region
- Reset, method of class BGColor
- Reset, method of class FGColor
- Reset, method of class Region
- ResetDC, method of class MDC
- ResetMFont, method of class MDC
- ResetTools, method of class MDC
- Rotate, method of class MBmp
- Round, method of class Region
- Save, method of class MCursor
- Save, method of class MetaFile
- Save, method of class MIcon
- SaveByPalette, method of class MBmp
- SaveGIF, method of class MBmp
- SaveMCursors, function
- SaveMIcons, function
- SaveToFile, method of class MBmp
- SelectObject, method of class MDC
- SetAttr, method of class BGColor
- SetAttr, method of class FGColor
- SetB, method of class ColorRef
- SetBgAttr, method of class MDC
- SetBGColor, method of class BGColor
- SetBgColor, method of class MDC
- SetBitmapBits, method of class MBmp
- SetBkColor, method of class MDC
- SetBkMode, method of class MDC
- SetBrush, method of class MDC
- SetColor, method of class BGColor
- SetColor, method of class FGColor
- SetColor, method of class Palette
- SetColors, method of class MPalette
- SetFgAttr, method of class MDC
- SetFGColor, method of class FGColor
- SetFgColor, method of class MDC
- SetG, method of class ColorRef
- SetImage, method of class MCursor
- SetImage, method of class MIcon
- SetInverse, method of class MBmp
- SetLineWidth, method of class MDC
- SetLogicalUnitSize, method of class MDC
- SetMFont, method of class MDC
- SetPen, method of class MDC
- SetPixel, method of class MDC
- SetR, method of class ColorRef
- SetRGB, method of class ColorRef
- SetRGBPalette, method of class MBmp
- SetSystemMode, method of class MFont
- SetTextColor, method of class MDC
- SetWidth, method of class FGColor
- SetXYHot, method of class MCursor
- Show, method of class MBmp
- Show, method of class MDC
- StartPage, method of class MDC
- Stretch, method of class MDC
- Stretch2To1_Byte, function
- Stretch2To1_RGB, function
- Stretch2To1_Word, function
- Stretch_Byte, function
- Stretch_RGB, function
- Stretch_Word, function
- ToCurrentMode, method of class MFont
- UnClip, method of class MDC
- UnSelectObject, method of class MDC
- |, method of class Region
- ~BGColor, method of class BGColor
- ~FGColor, method of class FGColor
- ~MBmp, method of class MBmp
- ~MDC, method of class MDC
- ~MetaFile, method of class MetaFile
- ~MFont, method of class MFont