
Zitat von
Nils_13:
Delphi-Quellcode:
for i := 0 to LKanal do
p.Width := p.Width + 1;
// DrawGradient
for i := 0 to RKanal do
p2.Width := p2.Width + 1;
Optimierungsvorschlag: Statt es in einer Schleife jedes mal um eins zu erhöhen...
Delphi-Quellcode:
inc(p.Width, LKanal + 1); //analog für rechts
//oder (falls Width ein Property ist)
p.Width := LKanal + 1 + p.Width; //analog für rechts
Ich weiß nicht, was p und p2 sein sollen??? Eventuell liegt da auch noch Optimierungsansatz.
//edit: schließenden quote-tag ergänzt