hi again
could some one correct me , i've tryed to make a procedure that plot a given pixel ( x ,y , color) into TBitmap class
Code:
procedure SetScanLinePixel(x,y,c : integer; var _bmp : TBitmap);
type
pRGBTripleArray = ^TRGBTripleArray;
TRGBTripleArray = array[0..32768-1] of TRGBTriple;
var
raw : pRGBTripleArray;
begin
raw := _bmp.ScanLine[y];
raw[x].rgbtBlue := ( c and $ff);
raw[x].rgbtGreen := ( c shl 8 ) and $ff;
raw[x].rgbtRed:= ( c shl 16) and $ff; //error :constant expression violates subrange bounds
end;
i don't understand the last compiler error ,
Bookmarks