Delphi:    image1.Canvas.LineTo(265,237);

I want to access the image/canvas from assembler, any ideas?

Something like:

        mov ebx,265
        mov ecx,237
        mov edi,image1.canvas   ; or something??
mul ecx      
add eax,ebx       ;
mov dword ptr ,0FFFF00h ; Set Pixel to Yellow

I found one solution. (dunno if its the best?)

  APointer : Pointer;
  ABitmap : HBITMAP;

  ABitmap := CreateDIBSection(a,b,c, APointer, 0, 0);
mov  edi, APointer

Posted on 2008-02-06 06:11:11 by sittingduck
It's been too many years since I've messed with Delphi... Trying to access "image1.canvas" from assembly is generally the wrong way to go about things, you'll want to check if the Canvas object has a method for getting at it's pixel data... if not, you'll be in a world of workaround hurt.
Posted on 2008-02-06 19:09:24 by f0dder
oh, thanks.  :thumbsup:
Posted on 2008-02-07 02:25:28 by sittingduck