Control Name | Unit | Class |
RX Picture Clip | PicClip | TPicClip |
Description:
The TPicClip component provide you the functionality of
the PICCLIP.VBX control which ships with Visual Basic
Professional. This control allows you to extract portions of a
matrix of pictures and assign the "cell picture" to
another picture control.
To accomplish this, you might use GraphicCell[Index:
Integer] property which extracted a portion of a picture and
assigned it to another picture property.
To determine how source picture separate by cells, use Cols and
Rows properties. The TPicClip object retrieving "cell
picture" via their Index within the range 0 to (Cols * Rows)
- 1.
To draw the "cell picture" on a canvas, call the Draw method of a TPicClip object, passing the Canvas as a parameter. The Masked property specifies whether the background of the image obscures objects below the image object when "cell picture" is drawn by the Draw method. MaskColor determines which color of the image is to be transparent when the "cell picture" is drawn.
Property
Cols
Declaration:
Cols: Integer;
Cols is the number of columns in the matrix of pictures.
Property GraphicCell[Index: Integer]
Declaration:
GraphicCell[Index: Integer]: TBitmap;
GraphicCell returns the image ("cell picture") specified by the Index parameter as a TBitmap object. You don't need to free this object later. The TPicClip object retrieving "cell picture" via their Index within the range 0 to (Cols * Rows) - 1, with left-to-right and top-to-bottom direction.
Property
MaskColor
Declaration:
MaskColor: TColor;
MaskColor determines which color of the "cell picture" is to be transparent when the bitmap is drawn by calling the Draw method and Masked property is True. Use MaskColor to determine how to draw the picture transparently.
Property
Masked
Declaration:
Masked: Boolean;
Masked specifies whether the background of the "cell picture" obscures objects below the image object when the image is drawn by the Draw method. Default value is True. Set Masked to True to allow objects behind the TPicClip object to show through the background of the bitmap. Set Masked to False to make the background of the "cell picture" opaque.
Property
Rows
Declaration:
Rows: Integer;
Rows is the number of rows in the matrix of pictures.
Method
Draw
Declaration:
procedure Draw(Canvas: TCanvas; X, Y, Index: Integer);
Draw renders the "cell picture" specified by the Index parameter on the Canvas at the location given by the coordinates (X, Y). If Masked property is True the MaskColor property determines which color of the "cell picture" is to be transparent when the image is drawn by calling the Draw method.
Method
LoadBitmapRes
Declaration:
procedure LoadBitmapRes(Instance: THandle; ResID: PChar);
LoadBitmapRes loads the specified bitmap resource along with palette information from a module's executable file or DLL specified by Instance parameter into then TPicClip object. Specify the resource to be loaded as the value of ResID.
Index Page | About | Download
Creation Date: 4 Feb 1998 | Last Update: 16 Mar 2000