Forum: GUI-Design mit VCL / FireMonkey / Common Controls
Delphi
by Andreas L.,
7. Jul 2011
Danke für deine Hilfe :-D Das war anscheinend das Problem. Jetzt wird die Linie mit korrekter Breite gezeichnet. Hatte es auch schon mit (Width, 0) versucht, aber irgendwie ging das vorhin nicht :gruebel:
Jetzt wo ich die Linie in der Mitte der PaintBox zeichne ist mir ein neues Problem aufgefallen: Die Linie wird links und rechts abgerundet gezeichnet (siehe Screenshot). Ist das normal?
...
Forum: GUI-Design mit VCL / FireMonkey / Common Controls
Delphi
by Andreas L.,
7. Jul 2011
Hallo,
ich möchte in einer PaintBox eine Linie zeichnen. Solange ich als Breite 1 Pixel angebe, funktioniert auch alles.
PaintBox1.Canvas.Pen.Color := clBlack;
PaintBox1.Canvas.Pen.Width := SpinEdit1.Value;
PaintBox1.Canvas.MoveTo(0, 0);
PaintBox1.Canvas.LineTo(PaintBox1.Width, 1);