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

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

?? qrxmlsfilt.pas

?? delphi7報表打印控件源碼 可以設計報表
?? PAS
?? 第 1 頁 / 共 2 頁
字號:
end;
function ColTrans( ct : TColor ) : string;
var
   tempstr : string;
begin
    if ct < 0 then
    begin
        ct := ct and $FFFFFF;
    end;
    tempstr := format ( '%6.6x', [longint(ct)]);
    result := '#' + copy( tempstr, 5, 2 ) +copy( tempstr, 3, 2 )  +copy( tempstr, 1, 2 ) ;
end;

// places a blank document in the stringlist
procedure TQRXDocumentFilter.NewDocument( doclist : TStringlist; PaperWidth, PaperHeight : double;
              Papername, orient : string);
begin
//Title*, DocType*, Creator*, Author*, Date*, Copyright*, Orientation*
    LoadDTD( doclist );
    doclist.Add( '<QXDocument>' + CRLF );
    doclist.Add( '<Header Pagewidth="'+format( '%6.2f', [PaperWidth])+
                      '" Pageheight="'+format( '%6.2f', [Paperheight])
                      +'" PaperName="A4" Units="mm">' );
    doclist.Add( '   <Title>'+EntityReplace(FTitle)+'</Title>' );
    doclist.Add( '   <DocType>'+EntityReplace(FDocType)+'</DocType>' );
    doclist.Add( '   <Creator>'+EntityReplace(FCreator)+'</Creator>' );
    doclist.Add( '   <Author>'+EntityReplace(FAuthor)+'</Author>'  );
    doclist.Add( '   <Date>'+EntityReplace(FDocDate)+'</Date>' );
    doclist.Add( '   <Copyright>'+EntityReplace(FCopyright)+'</Copyright>'  );
    doclist.Add( '   <Orientation>'+EntityReplace(FOrientation)+'</Orientation>' );
    doclist.Add( '</Header>'  );
    doclist.Add( '</QXDocument>' );
end;

// Overridden Start
procedure TQRXDocumentFilter.Start(PaperWidth, PaperHeight : integer; Font : TFont);
var
    dlist : TStringlist;
    k : integer;
begin
    inherited;  // creates a stream
    // output the dtd now because the data will stream out
    dlist := TStringlist.create;
    LoadDTD( dlist );
    for k := 0 to dlist.count-1 do
        writetostream( dlist[k]+CRLF);
    writetostream( '<QXDocument>' + CRLF );
    writetostream( '<Header Pagewidth="'+format( '%6.2f', [PaperWidth*0.1])+
                      '" Pageheight="'+format( '%6.2f', [Paperheight*0.1])+'" PaperName="A4" Units="mm">' + CRLF );
    writetostream( '   <Title>'+EntityReplace(FTitle)+'</Title>' + CRLF );
    writetostream( '   <DocType>'+EntityReplace(FDocType)+'</DocType>' + CRLF );
    writetostream( '   <Creator>'+EntityReplace(FCreator)+'</Creator>' + CRLF );
    writetostream( '   <Author>'+EntityReplace(FAuthor)+'</Author>' + CRLF );
    writetostream( '   <Date>'+EntityReplace(FDocDate)+'</Date>' + CRLF );
    writetostream( '   <Copyright>'+EntityReplace(FCopyright)+'</Copyright>' + CRLF );
    writetostream( '   <Orientation>'+EntityReplace(FOrientation)+'</Orientation>' + CRLF );
    writetostream( '</Header>' + CRLF );
end;

// overridden Finish
procedure TQRXDocumentFilter.Finish;
begin
    if fconcatenating then exit;
    writetostream( '</Page>'+CRLF);
    writetostream( '</QXDocument>' + CRLF );
    inherited;
end;

procedure TQRXDocumentFilter.EndConcat;
begin
     fconcatenating := false;
     Finish;
end;

procedure TQRXDocumentFilter.TextOut(X, Y : extended; Font : TFont; BGColor : TColor;
               Alignment : TAlignment; Text : string);
var
  I  : integer;
  parentrep : TQuickrep;
  ctext,fbold, fitalic, funderline, fstrike : string;
  textlen, Xmm, Ymm : double;
  xp : integer;
begin
    //
    parentrep := tquickrep( self.owner );
    // catch the current record
    fBold := 'normal';
    fitalic := 'none';
    funderline := 'none';
    Xmm := LeftMarginAdjust + (X/10.0);
    Ymm := Y/10.0;
    // deal with alignment
    if (Alignment = taRightJustify) and true then
    begin
         // mm/10 to pixels
         xp := parentrep.QRPrinter.XPos( X );
         parentrep.QRPrinter.Canvas.font := font;
         textlen := parentrep.QRPrinter.Canvas.TextWidth( trim(text) );
         xp := round(xp-textlen);
         // pixels to mm
         Xmm := 0.1 * xp / parentrep.QRPrinter.xfactor;
    end
    else if Alignment = taCenter then
    begin
         xp := parentrep.QRPrinter.XPos( X );
         parentrep.QRPrinter.Canvas.font := font;
         textlen := parentrep.QRPrinter.Canvas.TextWidth( trim(text) );
         xp := round(xp-(textlen/2.0));
         // pixels to mm
         Xmm := 0.1 * xp / parentrep.QRPrinter.xfactor;
    end;

    if fsBold in Font.Style then fbold := 'Bold';
    if fsItalic in Font.Style then fitalic := 'Italic';
    if fsUnderline in Font.Style then funderline := 'Underline';
    if fsStrikeout in Font.Style then fstrike := 'Strikeout';
    i := font.size;
    ctext := format('<Item Type="Text" Layer="0" Font="%-s" XPos="%-4.2f" YPos="%-4.2f" Height="%-d" Color="%-s" Weight="%s" Decoration="%-s">',
                    [ font.name, Xmm, Ymm, i, coltrans(font.color),fbold, fitalic ]);
    writetostream( ctext);
    ctext := text;
    writetostream( EntityReplace(ctext) );
    writetostream( '</Item>' + CRLF );
    FLastRecordNum := parentrep.DataSet.RecNo;
end;

// turns a byte into 2 hex digits
procedure Hexit( var c1 : char; var c2 : char; b : byte );
var
       b1, b2 : byte;
begin
      b1 := b shr 4;
      b2 := b and $0F;
      if b1 < 10 then
          c1 := chr( b1 + ORD0 )
      else
          c1 := chr( (b1-10) + ORDA );
      if b2 < 10 then
          c2 := chr( b2 + ORD0 )
      else
          c2 := chr( (b2-10) + ORDA );
end;

procedure TQRXDocumentFilter.AcceptGraphic( Xoff, Yoff : extended; GControl : TControl);
const
     REC_SIZE = 2048;
var
    conwidth, conheight, coffset : integer;
    ctext : string;
    tempmap : TBitmap;
    SSCont : TQRShape;
    qrdbcont : TQRDBImage;
    drawpict : TPicture;
    istream, rlestream : TMemoryStream;
    C1, C2 : char;
    cc : array[0..REC_SIZE] of byte;
    bytesin, i, ishape : integer;
    lineout, fill, layer : string;
    parentrep : TQuickrep;
    Xmm, Ymm, xscale, yscale, rectheight, rectwidth : double;
    xrescale, yrescale: double;
    imgbyref: boolean;
    imgurl: string;
begin
  parentrep := tquickrep( self.owner );
  tempmap := TBitmap.create;
  istream := TMemoryStream.Create;
  rlestream := TMemoryStream.create;
  drawpict := TPicture.Create;
  Xmm := LeftMarginAdjust + (25.4* Xoff / Screen.PixelsPerInch);
  Ymm := 25.4* Yoff / Screen.PixelsPerInch;
  try
     if( GControl is TQRShape ) then
     begin
         SSCont := (GControl as TQRShape);
         // apply adjust to all shapes. Frames are exported as rects
         Ymm := Ymm + VertLineAdjust;
         Xmm := Xmm + HorizLineAdjust;
         fill := 'Outline';
         layer := '1';
         if (sscont.Brush.Style <> bsClear) and ( sscont.shape=qrsRectangle) then
         begin
             layer := '2';
             fill := 'Fill';
         end;
         ishape := integer(sscont.Shape);
         // swap h and v lines to match QXD spec
         if ishape=2 then
           ishape := 3
         else if ishape = 3 then
           ishape := 2;
           // make sure the thing doesn't disappear.
         rectwidth := 25.4*sscont.width/ Screen.PixelsPerInch;
         if rectwidth < 0.5 then rectwidth := 0.5;
         rectheight := 25.4*sscont.height/ Screen.PixelsPerInch;
         if rectheight < 0.5 then rectheight := 0.5;
         ctext := format('<Item Type="Graphic" Layer="'+layer+'" XPos="%-4.2f" YPos="%-4.2f" Linewidth="%-4.2f" '+
                  'Shape="%-d" Width="%-4.2f" Height="%-4.2f" Color="%s" BackColor="%s" FillType="%s" >',
                    [  Xmm, Ymm, 25.4*sscont.pen.width / Screen.PixelsPerInch, ishape, rectwidth, rectheight,
                      coltrans(sscont.pen.color),coltrans(sscont.Brush.color), fill ]);
         writetostream( ctext);
         writetostream( 'Graphic item</Item>' + CRLF );
         exit;
    end;
    // It's a picture
    tempmap.width := GControl.Width;
    tempmap.height := GControl.height;
    xrescale := 1.0;
    yrescale := 1.0;
    conwidth := GControl.Width;
    conheight := Gcontrol.height;
    if (GControl is TQRImage) then
    begin
         if TQRImage(GControl).stretch then
             tempmap.canvas.stretchdraw( Rect( 0, 0, tempmap.width, tempmap.height),
                                             TQRImage(GControl).Picture.graphic)
         else
         begin
             tempmap.canvas.draw(  0, 0, TQRImage(GControl).Picture.graphic)
         end;
         xrescale := ((25.4*TQRImage(GControl).width/ Screen.PixelsPerInch) / tempmap.width);
         yrescale := ((25.4*TQRImage(GControl).height/ Screen.PixelsPerInch) / tempmap.height);
    end
    else if (GControl is TQRDBImage) then
    begin
       qrdbcont := GControl as TQRDBImage;
       if qrdbcont.field <> nil then
       begin
          drawpict.Assign( qrdbcont.field );
          //AspectRatio := 1.0 * drawpict.Width / drawpict.height;
          if not qrdbcont.Stretch then
          begin
              // the picture shrinks or grows to fit the control
              // this tiresome code is a mirror of that in the DBImage print
              if (drawpict.Width/conwidth) < (drawpict.Height/conHeight) then
              begin
                  // the height ratio is greater so shrink the width and center horiz
                  coffset := conwidth; // save the current width
                  conwidth := round(drawpict.width/(drawpict.Height/conHeight));
                  coffset := ( coffset - conwidth) div 2;
                  Xoff :=Xoff + coffset;
              end
              else
              begin
                  coffset := conheight;
                  conheight := round(drawpict.Height/(drawpict.Width/conwidth));
                  coffset := ( coffset - conheight) div 2;
                  Yoff := Yoff + coffset;
              end;
          end;
          if qrdbcont.stretch then
          begin
               tempmap.assign( qrdbcont.field );
               conwidth := tempmap.Width;
               conheight := tempmap.height;
          end
          else
          begin
               tempmap.canvas.StretchDraw( Rect( 0, 0, tempmap.width, tempmap.height), drawpict.graphic);
          end;

          xrescale := ((25.4*qrdbcont.width/ Screen.PixelsPerInch) / tempmap.width);
          yrescale := ((25.4*qrdbcont.height/ Screen.PixelsPerInch) / tempmap.height);
       end;
    end;
    // stream out the ascii encoded picture data
    if FCompressImages then
         lineout := 'RLE'
    else
         lineout := 'None';

    xscale := 1.0 * conWidth / tempmap.Width * xrescale;
    yscale := 1.0 * conheight / tempmap.height * yrescale;

    imgbyref := false;
    imgurl := '';
    if Assigned(FOnImageURLNeeded) then
      FOnImageURLNeeded(Self,GControl,imgurl,imgbyref);

    if imgbyref then
      ctext := format('<Item Type="Image" XPos="%-4.2f" YPos="%-4.2f" Width="%-d" Height="%-d" Layer="1" Xscale ="%6.3f" Yscale ="%6.3f" Compression="'+lineout+'" ImageFile="%s">',
                      [ Xmm, Ymm, tempmap.width, tempmap.height, xscale, yscale, imgurl ])
    else
      ctext := format('<Item Type="Image" XPos="%-4.2f" YPos="%-4.2f" Width="%-d" Height="%-d" Layer="1" Xscale ="%6.3f" Yscale ="%6.3f" Compression="'+lineout+'">',
                      [ Xmm, Ymm, tempmap.width, tempmap.height, xscale, yscale ]);
    writetostream( ctext);
    
    if FDoImages and (not imgbyref) then
    begin
      if FCompressImages then
      begin
         tempmap.SaveToStream( rlestream );
         //tempmap.savetofile( 'tempmap.bmp'); // debug
         rlestream.Seek( 0, 0 );
         RunLength( rlestream, istream);
      end
      else
      begin
         tempmap.SaveToStream( istream );
         //tempmap.savetofile( 'tempmap.bmp');// debug
         istream.Seek( 0, 0 );
      end;
      bytesin := istream.Read( cc, REC_SIZE );
      lineout := '';
      while( bytesin > 0 ) do
      begin
           for i := 0 to bytesin-1 do
           begin
              Hexit( C1, C2, cc[i] );
              lineout := lineout +C1+C2;
           end;
           writetostream( lineout+ CRLF );
           lineout := '';
           bytesin := istream.Read( cc, REC_SIZE );
      end;
    end;
    writetostream( '</Item>' + CRLF );

  finally
    tempmap.free;
    drawpict.free;
    istream.Free;
    rlestream.free;
  end;
end;

procedure TQRXDocumentFilter.EndPage;
begin
     //do nothing;
end;

procedure TQRXDocumentFilter.NewPage;
begin
     if FPagenumber > 1 then  writetostream( '</Page>'+CRLF);
     writetostream( '<Page Number="'+inttostr( FPagenumber)+'">' + CRLF);
     inc(FPagenumber);
end;

// Standard run-length encoding code - translated from C
procedure RunLength(Source, Target: TStream);
var
  Buffer, C, LastOut, LastBuf: String;
  LastCnt, cn: Integer;
begin

  C := ' ';
  Buffer := '';
  LastOut := '';
  LastCnt := 0;
  Source.Position := 0;
  Target.Position := 0;

  while Source.Position < Source.Size do
  begin
    Source.Read(C[1], 1);
    if (C = LastOut) and (LastCnt <= 127) then
    begin
       if Length(LastBuf) > 0 then
       begin
          Buffer := Buffer + CHR(Length(LastBuf) - 1) + LastBuf;
          LastBuf := '';
       end;
       Inc(LastCnt);
    end
    else
    begin
       if LastCnt = 0 then
       begin
       end
       else
       if LastCnt > 1 then
       begin
          Buffer := Buffer + CHR(257 - LastCnt) + LastOut;
       end
       else
       begin
          LastBuf := LastBuf + LastOut;
          if Length(LastBuf) >= 128 then
          begin
             Buffer := Buffer + CHR(Length(LastBuf) - 1) + LastBuf;
             LastBuf := '';
          end;
       end;
       LastCnt := 1;
       LastOut := C;
    end;

    if Length(Buffer) > 0 then
    begin
       Target.Write(Buffer[1], Length(Buffer));
    end;
    Buffer := '';

  end;

  if Length(LastBuf) > 0 then begin
     Buffer := Buffer + CHR(Length(LastBuf) - 1) + LastBuf;
  end;

  if LastCnt = 1 then begin
     Buffer := Buffer + CHR(0) + LastOut;
  end;

  if LastCnt > 1 then begin
     Buffer := Buffer + CHR(257 - LastCnt) + LastOut;
  end;

  Buffer := Buffer + CHR(128) + '>';
  Target.Write(Buffer[1], Length(Buffer));

  Source.Position := 0;
  Target.Position := 0;
end;

end.

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
国产精品一区专区| 亚洲一区视频在线| 亚洲精品一区二区在线观看| 日韩视频一区二区三区在线播放| 欧美一级日韩免费不卡| 99久久99久久免费精品蜜臀| 亚洲国产乱码最新视频| 蜜桃传媒麻豆第一区在线观看| 免费av成人在线| 成人一级黄色片| 91欧美一区二区| 在线精品亚洲一区二区不卡| 欧美一区二区精品在线| 国产日产欧美一区| 一区二区在线免费| 久久99国产精品成人| 不卡的av电影| 92国产精品观看| 免费欧美日韩国产三级电影| 成人av在线电影| 欧美精品视频www在线观看 | 五月天激情综合| 国精品**一区二区三区在线蜜桃| 大白屁股一区二区视频| 制服丝袜在线91| 国产欧美精品区一区二区三区 | 丁香婷婷综合激情五月色| 91麻豆6部合集magnet| 欧美刺激脚交jootjob| 国产精品初高中害羞小美女文| 亚洲一区影音先锋| 成人性生交大片免费看中文网站| 884aa四虎影成人精品一区| 26uuu久久天堂性欧美| 亚洲国产日韩综合久久精品| 久久99在线观看| 在线一区二区三区四区五区| 欧美mv日韩mv亚洲| 国产欧美一区二区三区在线看蜜臀 | 91精品国产欧美一区二区成人| 欧美精品一区二区高清在线观看| 一个色综合网站| 亚洲欧美日韩国产成人精品影院| 亚洲综合免费观看高清在线观看| 精品一区二区成人精品| 一区二区在线电影| 日韩欧美成人一区| 成人免费视频国产在线观看| 成人伦理片在线| 日本韩国精品在线| 欧美精品在欧美一区二区少妇| 北条麻妃国产九九精品视频| 91麻豆免费视频| 欧美人与性动xxxx| 欧美一区二区三区在| 国产精品色眯眯| 91精品一区二区三区久久久久久| 宅男噜噜噜66一区二区66| 久久婷婷一区二区三区| 国产精品国产三级国产有无不卡| 亚洲色图另类专区| 日韩主播视频在线| 国产精品一二三四| 91国产成人在线| 日韩精品一区二区在线观看| 欧美精品一区二区三区蜜桃| **欧美大码日韩| 亚洲黄一区二区三区| 午夜精品免费在线观看| 国产精品一区三区| 欧美色爱综合网| 国产精品日日摸夜夜摸av| 久久精品一级爱片| 亚洲第一福利视频在线| 国产乱码一区二区三区| 不卡一区中文字幕| 色噜噜狠狠成人中文综合| 欧美成人高清电影在线| 亚洲欧美另类小说视频| 国产精品1024久久| 7777精品久久久大香线蕉| 国产精品不卡在线| 蜜乳av一区二区| 黄页网站大全一区二区| 欧美伦理电影网| 一区二区三区高清不卡| 国产成人综合网| 欧美一区二区黄| 亚洲一区二区av电影| 青青草视频一区| 欧美又粗又大又爽| 亚洲色图视频网| 成人视屏免费看| 99久久精品99国产精品| 久久久久99精品一区| 麻豆精品久久久| 欧美日韩国产一区| 一个色在线综合| 91女神在线视频| 亚洲少妇屁股交4| 成人动漫视频在线| 国产精品午夜电影| 国产91丝袜在线观看| 日韩亚洲欧美中文三级| 婷婷中文字幕综合| 欧美日韩一级视频| 亚洲最大成人综合| 99精品国产99久久久久久白柏| 久久久久久99精品| 国产夫妻精品视频| 国产亚洲一区二区三区在线观看| 久久久不卡影院| 麻豆国产91在线播放| 欧美精品亚洲二区| 天堂久久久久va久久久久| 久久精工是国产品牌吗| 在线综合视频播放| 麻豆精品国产传媒mv男同| 欧美tickling挠脚心丨vk| 久久精品网站免费观看| 国产精品一区二区免费不卡 | 欧美日韩大陆一区二区| jvid福利写真一区二区三区| 日本va欧美va精品发布| 亚洲女人****多毛耸耸8| 欧美日韩另类国产亚洲欧美一级| 成人久久18免费网站麻豆| 麻豆中文一区二区| 亚洲永久免费av| 国产精品麻豆久久久| 日韩欧美一二三区| 色哟哟精品一区| 国产精品一区二区你懂的| 日韩二区在线观看| 一区在线观看免费| 成人av免费在线观看| 日韩不卡一二三区| 欧美videofree性高清杂交| 在线日韩一区二区| 99久久国产综合色|国产精品| 国产jizzjizz一区二区| 欧洲精品视频在线观看| 秋霞电影网一区二区| 久久一留热品黄| 色综合色狠狠天天综合色| 日韩黄色一级片| 久久久综合视频| 国产激情精品久久久第一区二区 | 国产成人免费xxxxxxxx| 天天综合色天天| 国产片一区二区| 国产欧美一区二区三区鸳鸯浴| 欧美一卡二卡三卡四卡| 91福利精品第一导航| www.亚洲精品| 国产69精品久久久久777| 成人av免费网站| 日韩欧美视频一区| **欧美大码日韩| 久久精品国产亚洲aⅴ | 久久综合资源网| 亚洲最大色网站| 风间由美性色一区二区三区| 欧美亚洲精品一区| 久久久国产精品麻豆| 亚洲bt欧美bt精品| 国产成人超碰人人澡人人澡| 欧美精品乱码久久久久久按摩| 国产日韩在线不卡| 亚洲电影第三页| 国产999精品久久久久久绿帽| 欧美色偷偷大香| 国产欧美日韩麻豆91| 日韩国产一区二| 色视频成人在线观看免| 久久奇米777| 婷婷国产v国产偷v亚洲高清| 成人国产精品免费观看动漫| 欧美一卡二卡在线| 亚洲国产欧美一区二区三区丁香婷| 国产专区欧美精品| 在线视频中文字幕一区二区| 中文字幕欧美激情| 秋霞影院一区二区| 欧美在线999| 国产精品你懂的在线欣赏| 狠狠久久亚洲欧美| 欧美日韩国产综合一区二区三区| |精品福利一区二区三区| 久久不见久久见中文字幕免费| 欧美日韩日日骚| 国产网红主播福利一区二区| 韩国毛片一区二区三区| 日韩欧美一区二区视频| 日本欧美久久久久免费播放网| 7777精品伊人久久久大香线蕉经典版下载 | 国产色综合久久| 久久成人麻豆午夜电影| 欧美第一区第二区| 激情综合五月天|