![]() |
Bitmap drucken mit stretchdraw
Liste der Anhänge anzeigen (Anzahl: 1)
Hallo,
ich programmiere mit Delphi 7 Die Daten in meinem Programm werden wie folgt ausgedruckt: jede zeile beginnt mit einem image ,einer grafischen Linie und dann folgt der Text. Alles funktioniert wie gewollt, bis zeile 28. Ab dieser Zeile erscheint kein Image mehr. WARUM, woran liegt das?
Delphi-Quellcode:
y := r.Top ; r.Bottom := r.Bottom - canvas.TextHeight('X'); line := 1; repeat line := line+1; Canvas.Pen.Mode := pmcopy; Canvas.Pen.Width := 0; Canvas.Pen.Style := psSolid; Canvas.Pen.Color := clBlack; canvas.CopyMode := cmSrcCopy; bitmaprect.Left := r.Left +((canvas.TextWidth('X')-groesse) div 2); bitmaprect.Right := bitmaprect.Left+groesse; bitmaprect.Top := y+((canvas.TextHeight('X')-groesse) div 2); bitmaprect.Bottom := bitmaprect.Top+groesse; if (line mod 2 = 0) then // expand begin canvas.StretchDraw(bitmaprect,BitBtn1.glyph); end else begin // canvas.Draw(bitmaprect.Left ,bitmaprect.Top ,ButtonzuEin.glyph); canvas.StretchDraw(bitmaprect,bitbtn2.glyph ); Canvas.MoveTo(bitmaprect.left+(groesse div 2), bitmaprect. Bottom); Canvas.LineTo(bitmaprect.left+(groesse div 2), Y+canvas. TextHeight('X')); end; Canvas.MoveTo(bitmaprect.Right, y+(canvas.TextHeight('X') div 2)); Canvas.LineTo(bitmaprect.Right+canvas.TextWidth('X'), Y+ (canvas.TextHeight('X') div 2)); canvas.TextOut(r.Left+canvas.TextWidth('XXX'),y,inttostr(line)+ ' y='+inttostr(y)); y := y+Canvas.TextHeight('X'); until (y > r.Bottom ); |
Alle Zeitangaben in WEZ +1. Es ist jetzt 09:22 Uhr. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO © 2011, Crawlability, Inc.
Delphi-PRAXiS (c) 2002 - 2023 by Daniel R. Wolf, 2024-2025 by Thomas Breitkreuz