亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? preview.pas

?? 為青島一家公司做的條碼打印管理
?? PAS
?? 第 1 頁 / 共 2 頁
字號:
unit Preview;

interface

uses
  Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
  StdCtrls, ExtCtrls, Buttons,printers;

type
  TFrmPreview = class(TForm)
    Image1: TImage;
    BtnPrint: TBitBtn;
    BtnClose: TBitBtn;
    procedure FormShow(Sender: TObject);
    procedure BtnPrintClick(Sender: TObject);
    procedure BitBtn2Click(Sender: TObject);
  private
    { Private declarations }
  public
    procedure PrintPreview(var Bmp:TBitmap);
  end;

var
  FrmPreview: TFrmPreview;

implementation

{$R *.DFM}

uses mTm;

type
  PPalEntriesArray = ^TPalEntriesArray; {for palette re-construction}
  TPalEntriesArray = array[0..0] of TPaletteEntry;
procedure BltTBitmapAsDib(DestDc : hdc; {Handle of where to blt}
                          x : word; {Bit at x}
                          y : word; {Blt at y}
                          Width : word; {Width to stretch}
                          Height : word; {Height to stretch}
                          bm : TBitmap); {the TBitmap to Blt}
var
  OriginalWidth :LongInt; {width of BM}
  dc : hdc; {screen dc}
  IsPaletteDevice : bool; {if the device uses palettes}
  IsDestPaletteDevice : bool; {if the device uses palettes}
  BitmapInfoSize : integer; {sizeof the bitmapinfoheader}
  lpBitmapInfo : PBitmapInfo; {the bitmap info header}
  hBm : hBitmap; {handle to the bitmap}
  hPal : hPalette; {handle to the palette}
  OldPal : hPalette; {temp palette}
  hBits : THandle; {handle to the DIB bits}
  pBits : pointer; {pointer to the DIB bits}
  lPPalEntriesArray : PPalEntriesArray; {palette entry array}
  NumPalEntries : integer; {number of palette entries}
  i : integer; {looping variable}
begin
  {If range checking is on - lets turn it off for now}
  {we will remember if range checking was on by defining}
  {a define called CKRANGE if range checking is on.}
  {We do this to access array members past the arrays}
  {defined index range without causing a range check}
  {error at runtime. To satisfy the compiler, we must}
  {also access the indexes with a variable. ie: if we}
  {have an array defined as a: array[0..0] of byte,}
  {and an integer i, we can now access a[3] by setting}
  {i := 3; and then accessing a[i] without error}
  {$IFOPT R+}
  {$DEFINE CKRANGE}
  {$R-}
  {$ENDIF}

  {Save the original width of the bitmap}
  OriginalWidth := bm.Width;

  {Get the screen's dc to use since memory dc's are not reliable}
  dc := GetDc(0);
  {Are we a palette device?}
  IsPaletteDevice :=
  GetDeviceCaps(dc, RASTERCAPS) and RC_PALETTE = RC_PALETTE;
  {Give back the screen dc}
  dc := ReleaseDc(0, dc);

  {Allocate the BitmapInfo structure}
  if IsPaletteDevice then BitmapInfoSize := sizeof(TBitmapInfo) + (sizeof(TRGBQUAD) * 255)
  else BitmapInfoSize := sizeof(TBitmapInfo);
  GetMem(lpBitmapInfo, BitmapInfoSize);

  {Zero out the BitmapInfo structure}
  FillChar(lpBitmapInfo^, BitmapInfoSize, #0);

  {Fill in the BitmapInfo structure}
  lpBitmapInfo^.bmiHeader.biSize := sizeof(TBitmapInfoHeader);
  lpBitmapInfo^.bmiHeader.biWidth := OriginalWidth;
  lpBitmapInfo^.bmiHeader.biHeight := bm.Height;
  lpBitmapInfo^.bmiHeader.biPlanes := 1;
  if IsPaletteDevice then lpBitmapInfo^.bmiHeader.biBitCount := 8
  else lpBitmapInfo^.bmiHeader.biBitCount := 24;
  lpBitmapInfo^.bmiHeader.biCompression := BI_RGB;
  lpBitmapInfo^.bmiHeader.biSizeImage :=((lpBitmapInfo^.bmiHeader.biWidth *
                                          longint(lpBitmapInfo^.bmiHeader.biBitCount)) div 8) *
                                          lpBitmapInfo^.bmiHeader.biHeight;
  lpBitmapInfo^.bmiHeader.biXPelsPerMeter := 0;
  lpBitmapInfo^.bmiHeader.biYPelsPerMeter := 0;
  if IsPaletteDevice then begin
    lpBitmapInfo^.bmiHeader.biClrUsed := 256;
    lpBitmapInfo^.bmiHeader.biClrImportant := 256;
  end else begin
    lpBitmapInfo^.bmiHeader.biClrUsed := 0;
    lpBitmapInfo^.bmiHeader.biClrImportant := 0;
  end;

  {Take ownership of the bitmap handle and palette}
  hBm := bm.ReleaseHandle;
  hPal := bm.ReleasePalette;

  {Get the screen's dc to use since memory dc's are not reliable}
  dc := GetDc(0);

  if IsPaletteDevice then begin
    {If we are using a palette, it must be}
    {selected into the dc during the conversion}
    OldPal := SelectPalette(dc, hPal, TRUE);
    {Realize the palette}
    RealizePalette(dc);
  end;
  {Tell GetDiBits to fill in the rest of the bitmap info structure}
  GetDiBits(dc,hBm,0,lpBitmapInfo^.bmiHeader.biHeight,nil,TBitmapInfo(lpBitmapInfo^),DIB_RGB_COLORS);

  {Allocate memory for the Bits}
  hBits := GlobalAlloc(GMEM_MOVEABLE,
  lpBitmapInfo^.bmiHeader.biSizeImage);
  pBits := GlobalLock(hBits);
  {Get the bits}
  GetDiBits(dc,hBm,0,lpBitmapInfo^.bmiHeader.biHeight,pBits,TBitmapInfo(lpBitmapInfo^),DIB_RGB_COLORS);
  if IsPaletteDevice then begin
    {Lets fix up the color table for buggy video drivers}
    GetMem(lPPalEntriesArray, sizeof(TPaletteEntry) * 256);
    {$IFDEF VER100}
    NumPalEntries := GetPaletteEntries(hPal,0,256,lPPalEntriesArray^);
    {$ELSE}
    NumPalEntries := GetSystemPaletteEntries(dc,0,256,lPPalEntriesArray^);
    {$ENDIF}
    for i := 0 to (NumPalEntries - 1) do begin
      lpBitmapInfo^.bmiColors[i].rgbRed :=lPPalEntriesArray^[i].peRed;
      lpBitmapInfo^.bmiColors[i].rgbGreen :=lPPalEntriesArray^[i].peGreen;
      lpBitmapInfo^.bmiColors[i].rgbBlue :=lPPalEntriesArray^[i].peBlue;
    end;
    FreeMem(lPPalEntriesArray, sizeof(TPaletteEntry) * 256);
  end;
  if IsPaletteDevice then begin
    {Select the old palette back in}
    SelectPalette(dc, OldPal, TRUE);
    {Realize the old palette}
    RealizePalette(dc);
  end;

  {Give back the screen dc}
  dc := ReleaseDc(0, dc);
  {Is the Dest dc a palette device?}
  IsDestPaletteDevice :=
  GetDeviceCaps(DestDc, RASTERCAPS) and RC_PALETTE = RC_PALETTE;

  if IsPaletteDevice then begin
    {If we are using a palette, it must be}
    {selected into the dc during the conversion}
    OldPal := SelectPalette(DestDc, hPal, TRUE);
    {Realize the palette}
    RealizePalette(DestDc);
  end;

  {Do the blt}
  StretchDiBits(DestDc,x,y,Width,Height,0,0,OriginalWidth,lpBitmapInfo^.bmiHeader.biHeight,
                pBits,lpBitmapInfo^,DIB_RGB_COLORS,SrcCopy);
  if IsDestPaletteDevice then begin
    {Select the old palette back in}
    SelectPalette(DestDc, OldPal, TRUE);
    {Realize the old palette}
    RealizePalette(DestDc);
  end;

  {De-Allocate the Dib Bits}
  GlobalUnLock(hBits);
  GlobalFree(hBits);

  {De-Allocate the BitmapInfo}
  FreeMem(lpBitmapInfo, BitmapInfoSize);

  {Set the ownership of the bimap handles back to the bitmap}
  bm.Handle := hBm;
  bm.Palette := hPal;

  {Turn range checking back on if it was on when we started}
  {$IFDEF CKRANGE}
  {$UNDEF CKRANGE}
  {$R+}
  {$ENDIF}
end;







{ TFrmPreview }

procedure TFrmPreview.PrintPreview(var Bmp:TBitmap);
var
  {x1,x2,y,Space:integer; }
  TopLeft,TopRight,BottomLeft,BottomRight:TPoint;
begin
  TopLeft.x:=10;
  TopLeft.y:=15;
  TopRight.x:=485;
  TopRight.y:=15;
  BottomLeft.x:=10;
  BottomLeft.y:=305;
  BottomRight.x:=485;
  BottomRight.y:=305;
  Bmp.Width:=664;
  Bmp.Height:=460;
  Bmp.Canvas.MoveTo(TopLeft.x,TopLeft.y);
  Bmp.Canvas.LineTo(TopRight.x,TopRight.y);
  Bmp.Canvas.LineTo(BottomRight.x,BottomRight.y);
  Bmp.Canvas.LineTo(BottomLeft.x,BottomLeft.y);
  Bmp.Canvas.LineTo(TopLeft.x,TopLeft.y);


  Bmp.Canvas.Rectangle(10,305,520,400);
  Bmp.Canvas.Rectangle(10,305,190,400);
  Bmp.Canvas.Rectangle(189,305,303,338);
  Bmp.Canvas.Rectangle(10,388,664,460);
  Bmp.Canvas.MoveTo(10,388+35);
  Bmp.Canvas.LineTo(669,388+35);

  Bmp.Canvas.MoveTo(10+109,388);
  Bmp.Canvas.LineTo(10+109,485);
  Bmp.Canvas.MoveTo(10+109+109,388);
  Bmp.Canvas.LineTo(10+109+109,485);
  Bmp.Canvas.MoveTo(10+109+109+109,388);
  Bmp.Canvas.LineTo(10+109+109+109,485);
  Bmp.Canvas.MoveTo(10+109+109+109+109,388);
  Bmp.Canvas.LineTo(10+109+109+109+109,485);
  Bmp.Canvas.MoveTo(10+109+109+109+109+109,388);

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
老司机精品视频一区二区三区| 国产精品二区一区二区aⅴ污介绍| 99精品一区二区三区| 日日摸夜夜添夜夜添精品视频| 国产精品五月天| 国产婷婷一区二区| 日韩美女天天操| 欧美一级高清片| 欧美日韩小视频| 99在线精品一区二区三区| 久久精品99久久久| 奇米色一区二区三区四区| 亚洲高清在线精品| 亚洲成av人片在线| 天天综合网天天综合色 | 午夜亚洲福利老司机| 亚洲精品综合在线| 一区二区三区欧美| 日韩国产在线观看| 日韩av在线免费观看不卡| 天堂蜜桃91精品| 日韩av午夜在线观看| 蜜桃一区二区三区在线| 精品在线一区二区| 国产一区视频导航| 成人亚洲一区二区一| a级高清视频欧美日韩| 成人h动漫精品一区二| 99re这里都是精品| 日本韩国欧美一区| 欧美日韩中文一区| 在线观看一区二区视频| 欧美影院精品一区| 欧美日本一道本| 色呦呦日韩精品| 欧美日本一区二区三区四区| 欧美一区二区视频观看视频 | 在线视频中文字幕一区二区| 在线亚洲欧美专区二区| 日韩欧美久久一区| 久久久.com| 亚洲国产精品一区二区久久恐怖片 | 久久精品视频在线看| 国产精品每日更新| 亚洲国产一区视频| 国内精品伊人久久久久av一坑| 日本精品裸体写真集在线观看| 欧美精品xxxxbbbb| 久久精品日韩一区二区三区| 亚洲视频一区二区在线观看| 午夜亚洲福利老司机| 国产一区二区0| 在线亚洲免费视频| 久久久精品2019中文字幕之3| 欧美国产亚洲另类动漫| 亚洲成av人片在线| 91在线高清观看| 日韩欧美一级片| 18成人在线观看| 国产一区三区三区| 欧美人牲a欧美精品| 亚洲国产成人午夜在线一区| 日韩影院免费视频| 日本精品裸体写真集在线观看| 欧美变态tickling挠脚心| 国产精品久久久久aaaa樱花| 狠狠色伊人亚洲综合成人| 欧美一区二区在线播放| 午夜久久久久久久久久一区二区| 91在线观看成人| 亚洲视频一二区| 91麻豆福利精品推荐| 国产精品乱人伦中文| 成a人片国产精品| 亚洲丝袜另类动漫二区| 99国产欧美另类久久久精品| 亚洲欧洲国产日本综合| 91网站最新地址| 亚洲自拍偷拍综合| 精品视频一区二区不卡| 日韩黄色小视频| 欧美一区二区视频在线观看2020| 蜜桃视频在线一区| 久久亚洲私人国产精品va媚药| 国产一本一道久久香蕉| 日本一区二区动态图| 波多野结衣的一区二区三区| 亚洲免费观看高清完整| 91精品福利在线| 亚洲444eee在线观看| 日韩一区二区中文字幕| 国产白丝精品91爽爽久久| 国产精品入口麻豆九色| 91免费在线播放| 丝袜美腿高跟呻吟高潮一区| 欧美va日韩va| 91社区在线播放| 日韩—二三区免费观看av| 久久精品一区二区三区不卡| 99综合影院在线| 成人一级片网址| 亚洲午夜电影在线观看| 精品久久久久久久人人人人传媒| 高清beeg欧美| 亚洲成人av中文| 久久精品一区二区三区不卡| 91在线看国产| 九色|91porny| 亚洲精品乱码久久久久久黑人| 69久久夜色精品国产69蝌蚪网| 国产精品1区二区.| 一区二区三区四区在线| 久久综合九色综合久久久精品综合 | 亚洲自拍偷拍图区| 精品国产乱码久久久久久1区2区 | 色哟哟精品一区| 麻豆免费精品视频| 亚洲三级在线播放| 精品国产青草久久久久福利| 在线观看一区二区精品视频| 国产91精品在线观看| 伊人性伊人情综合网| 久久久99久久精品欧美| 欧美日韩精品欧美日韩精品| 大白屁股一区二区视频| 捆绑变态av一区二区三区| 亚洲一区二区三区美女| 国产精品欧美经典| 久久毛片高清国产| 日韩欧美一区在线观看| 91福利精品第一导航| 成人激情午夜影院| 一本色道综合亚洲| gogogo免费视频观看亚洲一| 久草这里只有精品视频| 日本成人中文字幕在线视频| 亚洲国产一区二区a毛片| 亚洲日本在线a| 中文字幕一区二区三区精华液| 精品粉嫩超白一线天av| 欧美一区二区三区在线观看视频| 欧美在线免费视屏| 在线亚洲一区观看| 91麻豆福利精品推荐| 99视频超级精品| 波多野结衣中文字幕一区二区三区| 蜜臀av一区二区在线免费观看| 一区二区三区欧美在线观看| 亚洲欧洲性图库| 亚洲手机成人高清视频| 亚洲人成网站精品片在线观看| 中文字幕第一区第二区| 国产精品区一区二区三区| 中文字幕国产精品一区二区| 亚洲国产精品国自产拍av| 中国色在线观看另类| 蜜臀av一区二区在线免费观看| 蜜桃视频第一区免费观看| 免费日本视频一区| 美国精品在线观看| 黄一区二区三区| 国产高清久久久| 波多野结衣一区二区三区| 91免费视频网| 欧美精品粉嫩高潮一区二区| 欧美一级在线观看| 久久人人爽人人爽| 亚洲男人都懂的| 视频一区视频二区中文字幕| 久久99精品久久久久| 国产成人免费在线观看| 99国产精品视频免费观看| 欧洲视频一区二区| 欧美一级片在线看| 国产农村妇女精品| 一区二区三区加勒比av| 蜜芽一区二区三区| 国产98色在线|日韩| 日本道色综合久久| 亚洲男人的天堂在线aⅴ视频| 亚洲成av人综合在线观看| 久久99久久久欧美国产| av电影天堂一区二区在线观看| 在线一区二区三区做爰视频网站| 91精品久久久久久久99蜜桃| 国产午夜精品理论片a级大结局| 中文字幕制服丝袜成人av | 国产精品美女一区二区| 亚洲大尺度视频在线观看| 狠狠v欧美v日韩v亚洲ⅴ| 97久久超碰国产精品| 日韩欧美激情在线| 亚洲一区二区三区美女| 国产成人av自拍| 制服丝袜日韩国产| 亚洲色图视频网站| 国产二区国产一区在线观看| 欧美日韩久久久一区| 国产欧美精品在线观看| 全部av―极品视觉盛宴亚洲|