Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- procedure DrawMatrixBitmap(bitmap: Integer; matrix: T2DIntegerArray);
- var
- x, y, w, h: Integer;
- begin
- h := High(matrix);
- for y := 0 to (h - 1) do
- begin
- w := High(matrix[y]);
- for x := 0 to (w - 1) do
- FastSetPixel(bitmap, x, y, matrix[y][x]);
- end;
- end;
- procedure DebugBitmap(bmp: Integer);
- var
- w, h: Integer;
- begin
- GetBitmapSize(bmp, w, h);
- DisplayDebugImgWindow(w, h);
- DrawBitmapDebugImg(bmp);
- end;
- var
- colors: T2DIntegerArray;
- bmp: Integer;
- begin
- bmp := CreateBitmap(10, 5);
- SetLength(colors, 5);
- colors[0] := [255, 255, 0, 0, 65535, 65535, 0, 0, 255, 255];
- colors[1] := [255, 255, 0, 0, 65535, 65535, 0, 0, 255, 255];
- colors[2] := [255, 255, 0, 0, 65535, 65535, 0, 0, 255, 255];
- colors[3] := [255, 255, 0, 0, 65535, 65535, 0, 0, 255, 255];
- colors[4] := [255, 255, 0, 0, 65535, 65535, 0, 0, 255, 255];
- DrawMatrixBitmap(bmp, colors);
- DebugBitmap(bmp);
- FreeBitmap(bmp);
- end.
Advertisement
Add Comment
Please, Sign In to add comment