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呢?
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呢?