Code: Select all
procedure TfrmMain.flash2FlashPaint(ASender: TObject; pPixels: Pointer);
pixel: PCardinal; // unsigned 32-bit (longword)
// pointer holds ARGB in bottomright-topleft ordering
for y := 50 to (flash2.Height-1)-100 do begin
pixel := PCardinal(pPixels);
//Inc(pixel, flash2.Height*flash2.Width-1); // move pointer to topleft (0,0)
//Dec(pixel, (y+1)*flash2.Width); // move to start of Y row
//Inc(pixel, 50); // move to start of X row index
// previous steps combined, turtle moved to topleft origo
for x := 50 to (flash2.Width-1)-100 do begin
pixel^:= $640000FF; // ARGB pixel
whome wrote:- proper cast to ARGB pixels or whatever is byte ordering?
whome wrote:- pointer address is never changed at runtime?
whome wrote:- if I want to save argb pixels somewhere I must copy entire buffer because of next frame reuses same memory space?
whome wrote:- width and height of pixel buffer if player is smaller than animation clip, or what properties should be used as a buffer dimensions?
whome wrote:Do you have a proof of concept example foreach loop to manipulate pixels?
Users browsing this forum: No registered users and 2 guests