ReportBuilder 7.02 ppPrnDev.pas 和 ppViewr.pas 研究(300分)

  • 主题发起人 主题发起人 qdyoung
  • 开始时间 开始时间
Q

qdyoung

Unregistered / Unconfirmed
GUEST, unregistred user!
按照rb帮助:
TppImage、TppDBImage
property DirectDraw: Boolean;
This property indicates whether the image will be sent directly to the printer or to an intermediate bitmap and then
copied to the printer. If you are having difficulty getting an image to print correctly on the printer, try setting this property to True.
如果打印图像出现问题,它建议设置DirectDraw为True,可是看
打印到打印机的ppPrnDev.pas 中
procedure TppPrinterDevice.DrawImage(aDrawImage: TppDrawImage);
begin
...
if aDrawImage.Picture.Graphic is TBitmap then
begin
if aDrawImage.AsBitmap.Monochrome and aDrawImage.DirectDraw then

DirectDrawImage(aDrawImage)
else
DrawBMP(aDrawImage);
end
else
if aDrawImage.DirectDraw then
DirectDrawImage(aDrawImage)
...
打印到屏幕的ppViewr.pas 中
procedure TppScreenDevice.DrawImage(aDrawImage: TppDrawImage);
...
if aDrawImage.DirectDraw then
begin
DirectDrawImage(aDrawImage);
Exit;
end;
...
对DirectDraw支持处理代码明显不同,打印到屏幕的是都支持DirectDraw,
而打印到打印机的如果是Bitmap图像则要特殊处理,只有黑白两色图像才DirectDraw,
这样如果位图图像(通常都是位图,而且不会是黑白的)打印出现问题,实际上设置DirectDraw:=True是没用的
rb为什么打印到打印机不也像打印到屏幕一样不管图像什么格式都直接支持DirectDraw呢?
 
那么繁的代码你研究它有什么意思。
前一段时间使用RB控件出了点问题,我也研究了一番,头现在还疼着
不过谢天谢地问题还是解决了
 
to swei412:
你碰到的什么问题呢?
我碰到的是有时候打印的图像是空白的
 
我打印*.WMF都好好的,会不会是处理TBitbmp文件时,输出
到屏幕与输出到打印机不一样?
 
我碰到的问题是把报表放到dll时,无法在ppPreviewer中预览,显示不出任何东西,但是调用ppPreviewer.Print可以打印出数据。
解决办法是调用窗口的UpdateControlState mothod
 
找不出来原因吗?
 
多人接受答案了。
 

Similar threads

I
回复
0
查看
659
import
I
S
回复
0
查看
3K
SUNSTONE的Delphi笔记
S
S
回复
0
查看
2K
SUNSTONE的Delphi笔记
S
后退
顶部