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 x := 0 to h do
- begin
- w := High(matrix[y]);
- for y := 0 to w do
- FastSetPixel(bitmap, x, y, matrix[x][y]);
- 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, X, Y: Integer;
- begin
- SetLength(colors, 6);
- X := 16777215;
- Y := 0;
- colors[0] := [Y, Y, Y, Y, Y, Y, Y, Y, Y, Y, Y, Y, Y, Y, Y, Y];
- colors[1] := [Y, Y, Y, X, Y, X, X, X, Y, X, Y, Y, X, Y, X, Y];
- colors[2] := [Y, Y, Y, X, Y, X, Y, X, Y, X, X, Y, X, Y, X, Y];
- colors[3] := [Y, Y, Y, X, Y, X, X, X, Y, X, Y, X, X, Y, X, Y];
- colors[4] := [Y, X, X, X, Y, X, Y, X, Y, X, Y, Y, X, Y, X, Y];
- colors[5] := [Y, Y, Y, Y, Y, Y, Y, Y, Y, Y, Y, Y, Y, Y, Y, Y];
- bmp := CreateBitmap(Length(colors[0]), Length(colors));
- DrawMatrixBitmap(bmp, colors);
- DebugBitmap(bmp);
- FreeBitmap(bmp);
- end.
Advertisement
Add Comment
Please, Sign In to add comment