在timage控件上画好的图案怎么把他打印出来(0分)

  • 主题发起人 一阵风
  • 开始时间

一阵风

Unregistered / Unconfirmed
GUEST, unregistred user!
在timage控件上画好的图案怎么把他打印出来
 
我也想知道是怎么回事
 
procedure TMainForm.printimage1245;//打印四个image上的bitmap,
var
i,flag:integer;
strect,strect1,strect2,strect3:Trect;
temhi,temhi1,temhi2,temwd,temwd1,temwd2:integer;


begin
MainForm.ToolButton25.Down:=FALSE;
flag:=0;
for i:=0 to DesignFormNumber-1 do
begin
if MainForm.ActiveMDIChild=DesignForm then
begin
flag:=1;
break;
end;
end;
if flag=1 then
begin
if printdialog1.execute then
begin
temhi:=DesignForm.Image5.picture.Bitmap.Height;
temwd:=DesignForm.image5.picture.Bitmap.Width;

DesignForm.image2.picture.Bitmap.HandleType:=BMDIB;
DesignForm.image4.picture.Bitmap.HandleType:=BMDIB;
DesignForm.image5.picture.Bitmap.HandleType:=BMDIB;
DesignForm.image1.picture.Bitmap.HandleType:=BMDIB;
while (temhi<printer.pageheight div 2)and (temwd<printer.pagewidth div 2) do
begin
temhi:=temhi+temhi;
temwd:=temwd+temwd;
end;
temhi1:=trunc(temhi*DesignForm.Image2.Height/DesignForm.Image5.Height);
temwd1:=temwd;
temwd2:=round(temwd*DesignForm.Image4.Width/DesignForm.Image2.Width) ;
with strect do
begin
left:=(printer.pagewidth -temwd) div 2;
top:=(printer.pageheight-temhi) div 2;
right:=left+temwd;
bottom:=top+temhi;
end;
with strect1 do
begin
left:=strect.Left;
right:=left+temwd;
top:=1500;
bottom:=top+temhi1 ;
end;
with strect2 do
begin
left:=strect.Right+50;
right:=left+temwd2 ;
top:=(printer.pageheight-temhi) div 2;
bottom:=top+temhi;
end;
with strect3 do
begin
left:=strect2.Left;
right:=strect2.Right+100;
top:=strect1.Top-100;
bottom:=strect1.Bottom;
end;
with Printer do
begin
begindoc;
// newpage;
font.Size:=18;
// canvas.TextOut(strect.Left,150,'×é&amp;Ouml;&amp;macr;&amp;Iacute;&amp;frac14;&amp;iexcl;&amp;cent;&amp;acute;&amp;copy;×&amp;Ucirc;&amp;Iacute;&amp;frac14;&amp;iexcl;&amp;cent;&amp;Icirc;&amp;AElig;°&amp;aring;&amp;Iacute;&amp;frac14;&amp;acute;ò&amp;Oacute;&amp;iexcl;');
canvas.stretchdraw(strect,DesignForm.image5.picture.bitmap);
canvas.stretchdraw(strect1,DesignForm.image2.picture.bitmap);
canvas.stretchdraw(strect2,DesignForm.image4.picture.bitmap);
canvas.stretchdraw(strect3,DesignForm.image1.picture.bitmap);
enddoc;
end;
end;
end;
end;
 
接受答案了.
 
顶部