3
// TGBitmap<TGBitmapIndexX, TGBitmapIndexY, TGBitmapItem>
4
{$DEFINE TGMatrixIndexX := TGBitmapIndexX}
5
{$DEFINE TGMatrixIndexY := TGBitmapIndexY}
6
{$DEFINE TGMatrixItem := TGBitmapItem}
7
{$DEFINE TGMatrixIndex := TGBitmapIndex}
8
{$DEFINE TGMatrixRow := TGBitmapRow}
9
{$DEFINE TGMatrix := TGBitmapMatrix}
11
{$I 'GenericMatrix.inc'}
13
// TGBitmap<TGBitmapIndex, TGBitmapIndex, TGBitmapItem> = class
14
TGBitmap = class(TGMatrix)
16
function GetWidth: TGBitmapIndexX;
17
function GetHeight: TGBitmapIndexX;
18
procedure SetWidth(Value: TGBitmapIndexX);
19
procedure SetHeight(Value: TGBitmapIndexY);
21
property Pixels[X: TGBitmapIndexX; Y: TGBitmapIndexY]: TGBitmapItem
22
read GetItemXY write PutItemXY;
23
property Width: TGBitmapIndexX read GetWidth write SetWidth;
24
property Height: TGBitmapIndexY read GetHeight write SetHeight;
30
{$IFDEF IMPLEMENTATION_USES}
32
{$DEFINE IMPLEMENTATION_USES}
33
{$I 'GenericMatrix.inc'}
35
{$UNDEF IMPLEMENTATION_USES}
38
{$IFDEF IMPLEMENTATION}
40
// TGBitmap<TGBitmapIndexX, TGBitmapIndexY, TGBitmapItem>
41
{$DEFINE TGMatrixIndexX := TGBitmapIndexX}
42
{$DEFINE TGMatrixIndexY := TGBitmapIndexY}
43
{$DEFINE TGMatrixItem := TGBitmapItem}
44
{$DEFINE TGMatrixIndex := TGBitmapIndex}
45
{$DEFINE TGMatrixRow := TGBitmapRow}
46
{$DEFINE TGMatrix := TGBitmapMatrix}
47
{$DEFINE IMPLEMENTATION}
48
{$I 'GenericMatrix.inc'}
50
function TGBitmap.GetWidth: TGBitmapIndexX;
55
function TGBitmap.GetHeight: TGBitmapIndexX;
60
procedure TGBitmap.SetWidth(Value: TGBitmapIndexX);
62
Count := CreateIndex(Value, Count.Y);
65
procedure TGBitmap.SetHeight(Value: TGBitmapIndexY);
67
Count := CreateIndex(Count.X, Value);
70
{$UNDEF IMPLEMENTATION}