i use PrintPreview 5.14, Delphi 7 and Windows XP.
In my Program the Datas/Text will be printing as follow:
At any pageline is an image, a graphical line and then the text.
All is correct until line 27, after this line no image appears. Why that?
- Code: Select all
y := r.Top ;
r.Bottom := r.Bottom - canvas.TextHeight('X');
groesse := ConvertX(256,mmhimetrics ,units ); // 2
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 );