Autor Beitrag
Tigu
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 93

XP
Delphi 7
BeitragVerfasst: Mo 03.04.06 17:17 
Hallo!
Programiere Rechtecke. Dieses funktioniert auch, aber ich weiss nicht warum.
ausblenden Delphi-Quelltext
1:
image1.Canvas.Rectangle(0,image1.Height,b*i,Image1.Height-b);					


image1.Height ist doch die Höhe des Images, wieso wird dann bei dieser Programierung, y zweimal anders bestimmt, trotzdem ein Rechteck gezeichnet, was nur 1/5 es Images ausmacht. :gruebel:

Danke für die Hilfe
Tigu


Moderiert von user profile iconGausi: Topic aus Delphi Language (Object-Pascal) / CLX verschoben am Mo 03.04.2006 um 18:20
Danniolo
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 693



BeitragVerfasst: Mo 03.04.06 17:20 
das kommt auf das "b" an, wenn das halt 4/5 des Bildes ausmacht, dann is dein Rechteck auch nur 1/5 des Images hoch :roll:
Gausi
ontopic starontopic starontopic starontopic starontopic starontopic starofftopic starofftopic star
Beiträge: 8554
Erhaltene Danke: 481

Windows 7, Windows 10
D7 PE, Delphi XE3 Prof, Delphi 10.3 CE
BeitragVerfasst: Mo 03.04.06 17:22 
ausblenden Delphi-Quelltext
1:
2:
3:
4:
image1.Canvas.Rectangle(
0,image1.Height, // Die Ecke links unten im Bild
b*i,Image1.Height-b // der Punkt liegt b*i Pixel nach rechts, und b Pixel nach oben
);

Wie groß ist denn b?

_________________
We are, we were and will not be.