Autor Beitrag
ImbaPanda
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 98

Windows XP/Vista
Delphi 7 Professional/ Rad Studio 2009
BeitragVerfasst: Fr 14.12.07 16:32 
Weiß jemand zufällig wie ich die Zeichenfläche einer Paintbox oder einer Listbox drucken kann?

Gruß ImbaPanda
jakobwenzel
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 1889
Erhaltene Danke: 1

XP home, ubuntu
BDS 2006 Prof
BeitragVerfasst: Fr 14.12.07 16:36 
Guck dir mal das Objekt printer aus der Unit printers an.

_________________
I thought what I'd do was, I'd pretend I was one of those deaf-mutes.
ImbaPanda Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 98

Windows XP/Vista
Delphi 7 Professional/ Rad Studio 2009
BeitragVerfasst: Fr 14.12.07 18:04 
Also ich hab mir das ganze mal angeguckt und soweit auch verstanden. Nur mein Problemm liegt jetzt darin, dass ich ja keinen Text drucken, sondern eine Zeichenfläche ( Canvas von einer Paintbox ). Und einen Befehl wie Canvas.PaintTo gibts nicht in der Art.
jakobwenzel
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 1889
Erhaltene Danke: 1

XP home, ubuntu
BDS 2006 Prof
BeitragVerfasst: Fr 14.12.07 18:33 
Aber Canvas.CopyRect.
Oder Canvas.Draw.

_________________
I thought what I'd do was, I'd pretend I was one of those deaf-mutes.
ImbaPanda Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 98

Windows XP/Vista
Delphi 7 Professional/ Rad Studio 2009
BeitragVerfasst: Fr 14.12.07 19:14 
Nur bei Canvas.Draw gibt der immer ne Fehlermeldung
Inkompatible Typen: 'TGraphic' und 'TCanvas'
Biergeneral
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 35

WIN XP
Delphi 7 Ent., Delphi 2007 Ent., C/C++ (Eclipse)
BeitragVerfasst: Fr 14.12.07 20:24 
Canvas.Draw ist auch nur für das übertragen einer TGraphic auf ein Canvas.

Wenn du von einem Canvas auf ein Canvas zeichnen willst musst du mit copyRect arbeiten.

ausblenden Delphi-Quelltext
1:
  printer.canvas.CopyRect(ListBox.Canvas.ClipRect, ListBox.Canvas, printer.canvas.ClipRect);					


Da wo jetzt das printer.canvas.ClipRect steht, müsstest du ein entsprechend skaliertes Recteck angeben, sonst ist das bild total verzerrt