Autor Beitrag
JRegier
ontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic starofftopic star
Beiträge: 1268

Win XP Home, Prof, 2003 Server
D6 Enterprise
BeitragVerfasst: Fr 23.09.05 15:24 
Hi, ich lasse on DragOver eines Images eine Treppenartige Linie zeichnen und jedesmal wenn bewegt wird
überzeichne ich wo die Linie vorher war mit der Hintergrundfarbe und danach mit Roter Farbe
bis zur aktuellen Mausposition, aber warum Flackert wohl das ganze Bild?
delfiphan
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 2684
Erhaltene Danke: 32



BeitragVerfasst: Fr 23.09.05 15:29 
Worauf zeichnest du? Source?
AXMD
ontopic starontopic starontopic starontopic starontopic starontopic starofftopic starofftopic star
Beiträge: 4006
Erhaltene Danke: 7

Windows 10 64 bit
C# (Visual Studio 2019 Express)
BeitragVerfasst: Fr 23.09.05 15:30 
Fängst du WM_PAINT ab, verwendest du DoubleBuffering? Code wäre - wie delfiphan schon gesagt hat - äußerst nett ;)

AXMD
JRegier Threadstarter
ontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic starofftopic star
Beiträge: 1268

Win XP Home, Prof, 2003 Server
D6 Enterprise
BeitragVerfasst: Fr 23.09.05 16:06 
Ich habe das Image worauf ich zeichne DoubleBuffered auf True gesetzt
und zeichne mit LineTo(..);

also

ausblenden Delphi-Quelltext
1:
2:
3:
4:
5:
6:
7:
8:
BackgroundImage.DoubleBuffered := True;

with BackgroundImage.Canvas do
begin
 LineTo(X1, Y1);  
 LineTo(X2, Y2);  //etc..
 ..   
end;


Das Image liegt in der ScrollBox und bei der ScrollBox fange ich das WindowProc ab WM_HSCROLL WM_VSCROLL um
das Hintergrundbild neuzuzechnen wenn gescrollt wird!