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

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

?? reportcontrol.pas

?? 國產的報表控件
?? PAS
?? 第 1 頁 / 共 5 頁
字號:
         FCellrect.Left :=FCellrect.Left * 100 div Scale;
         FCellrect.top :=FCellrect.top * 100 div Scale;
         FCellrect.right :=FCellrect.right * 100 div Scale;
         FCellrect.bottom :=FCellrect.bottom * 100 div Scale;
        end;
}
    // 計算文本框的矩形
    TempRect := FCellRect;

    TempRect.left := TempRect.Left + FLeftMargin + 1;
    TempRect.top := TempRect.top + FTopLineWidth + 1;
    TempRect.right := TempRect.right - FLeftMargin - 1;
    TempRect.bottom := TempRect.top + FMinCellHeight - 2 - FTopLineWidth - FBottomLineWidth;

    case FVertAlign of
      TEXT_ALIGN_VCENTER:
        begin
          TempRect.Top := TempRect.Top + trunc((OwnerLineHeight - FMinCellHeight) / 2 + 0.5);
          TempRect.Bottom := TempRect.Bottom + trunc((OwnerLineHeight - FMinCellHeight) / 2 + 0.5);
        end;
      TEXT_ALIGN_BOTTOM:
        begin
          TempRect.Top := TempRect.Top + OwnerLineHeight - FMinCellHeight;
          TempRect.Bottom := TempRect.Bottom + OwnerLineHeight - FMinCellHeight;
        end;
    end;
{        if Scale <> 100 then
        begin
         temprect.top := temprect.top * 100 div Scale;
         temprect.bottom :=temprect.Bottom  * 100 div Scale;
         temprect.Left  := temprect.left * 100 div Scale;
         temprect.Right  := temprect.Right  * 100 div Scale;
        end;
}
    FTextRect := TempRect;
  end
  else
  begin
    TotalHeight := OwnerLineHeight;

    for I := 0 to FCellsList.Count - 1 do
      TotalHeight := TotalHeight + TReportCell(FCellsList[I]).OwnerLineHeight;

    FCellRect.left := FCellLeft;
    FCellRect.top := CellTop;
    FCellRect.right := FCellRect.left + FCellWidth;
    FCellRect.bottom := FCellRect.top + TotalHeight;

    // 計算文本框的矩形
    TempRect := FCellRect;

    TempRect.left := TempRect.Left + FLeftMargin + 1;
    TempRect.top := TempRect.top + FTopLineWidth + 1;
    TempRect.right := TempRect.right - FLeftMargin;
    TempRect.bottom := TempRect.top + FRequiredCellHeight - 2 - FTopLineWidth - FBottomLineWidth;

    case FVertAlign of
      TEXT_ALIGN_VCENTER:
        begin
          TempRect.Top := TempRect.Top + trunc((FCellRect.Bottom - FCellRect.Top - FRequiredCellHeight) / 2 + 0.5);
          TempRect.Bottom := TempRect.Bottom + trunc((FCellRect.Bottom - FCellRect.Top - FRequiredCellHeight) / 2 + 0.5);
        end;
      TEXT_ALIGN_BOTTOM:
        begin
          TempRect.Top := TempRect.Top + FCellRect.Bottom - FCellRect.Top - FRequiredCellHeight;
          TempRect.Bottom := TempRect.Bottom + FCellRect.Bottom - FCellRect.Top - FRequiredCellHeight;
        end;
    end;
{
        if Scale <> 100 then
        begin
         temprect.top := temprect.top * 100 div Scale;
         temprect.bottom :=temprect.Bottom  * 100 div Scale;
         temprect.Left  := temprect.left * 100 div Scale;
         temprect.Right  := temprect.Right  * 100 div Scale;
        end;
}
    FTextRect := TempRect;
  end;
end;

procedure TReportCell.PaintCell(hPaintDC: HDC; bPrint: Boolean);
var
  SaveDCIndex: Integer;
  hTempBrush: HBRUSH;
  TempLogBrush: TLOGBRUSH;
  hGrayPen, hPrevPen, hTempPen: HPEN;
  bDelete: Boolean;
  Format: UINT;
  hTextFont, hPrevFont: HFONT;
  TempRect: TRect;
begin
  if FOwnerCell <> nil then
    Exit;

  SaveDCIndex := SaveDC(hPaintDC);

  SetBkMode(hPaintDC, TRANSPARENT);

  // 繪制底色
  TempRect := FCellRect;
  TempRect.Top := TempRect.Top + 1;
  TempRect.Right := TempRect.Right + 1;
  if FBackGroundColor <> RGB(255, 255, 255) then
  begin
    TempLogBrush.lbStyle := BS_SOLID;
    TempLogBrush.lbColor := FBackGroundColor;
    hTempBrush := CreateBrushIndirect(TempLogBrush);
    FillRect(hPaintDC, TempRect, hTempBrush);
    DeleteObject(hTempBrush);
  end;

  // 繪制邊框
  hGrayPen := CreatePen(BS_SOLID, 1, RGB(192, 192, 192));

  // 左邊線
  if not bPrint and (FLeftLine or (FCellIndex = 0)) then
  begin
    bDelete := False;
    hTempPen := hGrayPen;
    if FLeftLine then
    begin
      hTempPen := CreatePen(PS_SOLID, FLeftLineWidth, RGB(0, 0, 0));
      bDelete := True;
    end;

    hPrevPen := SelectObject(hPaintDc, hTempPen);

    MoveToEx(hPaintDc, FCellRect.left, FCellRect.top, nil);
    LineTo(hPaintDC, FCellRect.left, FCellRect.bottom);

    SelectObject(hPaintDc, hPrevPen);

    if bDelete then
      DeleteObject(hTempPen);
  end
  else
  begin
    if FLeftLine then
    begin
      hTempPen := CreatePen(PS_SOLID, FLeftLineWidth, RGB(0, 0, 0));
      hPrevPen := SelectObject(hPaintDc, hTempPen);

      MoveToEx(hPaintDc, FCellRect.left, FCellRect.top, nil);
      LineTo(hPaintDC, FCellRect.left, FCellRect.bottom);

      SelectObject(hPaintDc, hPrevPen);
      DeleteObject(hTempPen);
    end;
  end;

  // 上邊線
  if not bPrint and (FTopLine or (OwnerLine.Index = 0)) then
  begin
    bDelete := False;
    hTempPen := hGrayPen;

    if FTopLine then
    begin
      hTempPen := CreatePen(PS_SOLID, FTopLineWidth, RGB(0, 0, 0));
      bDelete := True;
    end;

    hPrevPen := SelectObject(hPaintDC, hTempPen);

    MoveToEx(hPaintDc, FCellRect.left, FCellRect.top, nil);
    LineTo(hPaintDc, FCellRect.right, FCellRect.top);

    SelectObject(hPaintDc, hPrevPen);

    if bDelete then
      DeleteObject(hTempPen);
  end
  else
  begin
    if FTopLine then
    begin
      hTempPen := CreatePen(PS_SOLID, FTopLineWidth, RGB(0, 0, 0));
      hPrevPen := SelectObject(hPaintDc, hTempPen);

      MoveToEx(hPaintDc, FCellRect.left, FCellRect.top, nil);
      LineTo(hPaintDc, FCellRect.right, FCellRect.top);

      SelectObject(hPaintDc, hPrevPen);
      DeleteObject(hTempPen);
    end;
  end;


  // 右邊線
  if not bPrint then
  begin
    bDelete := False;
    hTempPen := hGrayPen;

    if FRightLine then
    begin
      hTempPen := CreatePen(PS_SOLID, FRightLineWidth, RGB(0, 0, 0));
      bDelete := True;
    end;

    hPrevPen := SelectObject(hPaintDc, hTempPen);

    MoveToEx(hPaintDc, FCellRect.right, FCellRect.top, nil);
    LineTo(hPaintDC, FCellRect.right, FCellRect.bottom);

    SelectObject(hPaintDc, hPrevPen);

    if bDelete then
      DeleteObject(hTempPen);
  end
  else
  begin
    if FRightLine then
    begin
      hTempPen := CreatePen(PS_SOLID, FRightLineWidth, RGB(0, 0, 0));
      hPrevPen := SelectObject(hPaintDc, hTempPen);

      MoveToEx(hPaintDc, FCellRect.right, FCellRect.top, nil);
      LineTo(hPaintDC, FCellRect.right, FCellRect.bottom);

      SelectObject(hPaintDc, hPrevPen);
      DeleteObject(hTempPen);
    end;
  end;


  // 下邊線
  if not bPrint then
  begin
    bDelete := False;
    hTempPen := hGrayPen;

    if FBottomLine then
    begin
      hTempPen := CreatePen(PS_SOLID, FBottomLineWidth, RGB(0, 0, 0));
      bDelete := True;
    end;

    hPrevPen := SelectObject(hPaintDc, hTempPen);

    MoveToEx(hPaintDc, FCellRect.left, FCellRect.bottom, nil);
    LineTo(hPaintDc, FCellRect.right, FCellRect.bottom);

    SelectObject(hPaintDc, hPrevPen);

    if bDelete then
      DeleteObject(hTempPen);
  end
  else
  begin
    if FBottomLine then
    begin
      hTempPen := CreatePen(PS_SOLID, FBottomLineWidth, RGB(0, 0, 0));
      hPrevPen := SelectObject(hPaintDc, hTempPen);

      MoveToEx(hPaintDc, FCellRect.left, FCellRect.bottom, nil);
      LineTo(hPaintDc, FCellRect.right, FCellRect.bottom);

      SelectObject(hPaintDc, hPrevPen);
      DeleteObject(hTempPen);
    end;
  end;


  DeleteObject(hGrayPen);

  hTempPen := CreatePen(PS_SOLID, 1, RGB(0, 0, 0));
  hPrevPen := SelectObject(hPaintDc, hTempPen);

  // 繪制斜線
  if FDiagonal > 0 then
  begin
    if ((FDiagonal and LINE_LEFT1) > 0) then
    begin
      MoveToEx(hPaintDC, FCellRect.left + 1, FCellRect.top + 1, nil);
      LineTo(hPaintDC, FCellRect.right - 1, FCellRect.bottom - 1);
    end;

    if ((FDiagonal and LINE_LEFT2) > 0) then
    begin
      MoveToEx(hPaintDC, FCellRect.left + 1, FCellRect.top + 1, nil);
      LineTo(hPaintDC, FCellRect.right - 1, trunc((FCellRect.bottom + FCellRect.top) / 2 + 0.5));
    end;

    if ((FDiagonal and LINE_LEFT3) > 0) then
    begin
      MoveToEx(hPaintDC, FCellRect.left + 1, FCellRect.top + 1, nil);
      LineTo(hPaintDC, trunc((FCellRect.right + FCellRect.left) / 2 + 0.5), FCellRect.bottom - 1);
    end;

    if ((FDiagonal and LINE_RIGHT1) > 0) then
    begin
      MoveToEx(hPaintDC, FCellRect.right - 1, FCellRect.top + 1, nil);
      LineTo(hPaintDC, FCellRect.left + 1, FCellRect.bottom - 1);
    end;

    if ((FDiagonal and LINE_RIGHT2) > 0) then
    begin
      MoveToEx(hPaintDC, FCellRect.right - 1, FCellRect.top + 1, nil);
      LineTo(hPaintDC, FCellRect.left + 1, trunc((FCellRect.bottom + FCellRect.top) / 2 + 0.5));
    end;

    if ((FDiagonal and LINE_RIGHT3) > 0) then
    begin
      MoveToEx(hPaintDC, FCellRect.right - 1, FCellRect.top + 1, nil);
      LineTo(hPaintDC, trunc((FCellRect.right + FCellRect.left) / 2 + 0.5), FCellRect.bottom - 1);
    end;

  end;

  SelectObject(hPaintDC, hPrevPen);
  DeleteObject(hTempPen);

  // 繪制文字
  if Length(FCellText) > 0 then
  begin
    Windows.SetTextColor(hPaintDC, FTextColor);
    Format := DT_EDITCONTROL or DT_WORDBREAK;
    case FHorzAlign of
      TEXT_ALIGN_LEFT:
        Format := Format or DT_LEFT;
      TEXT_ALIGN_CENTER:
        Format := Format or DT_CENTER;
      TEXT_ALIGN_RIGHT:
        Format := Format or DT_RIGHT;
    else
      Format := Format or DT_LEFT;
    end;

    hTextFont := CreateFontIndirect(FLogFont);
    hPrevFont := SelectObject(hPaintDC, hTextFont);
    TempRect := FTextRect;
    DrawText(hPaintDC, PChar(FCellText), Length(FCellText), TempRect, Format);
    SelectObject(hPaintDC, hPrevFont);
    DeleteObject(hTextFont);
  end;

  RestoreDC(hPaintDC, SaveDCIndex);
end;

constructor TReportCell.Create;
var
  hTempDC: HDC;
  pt, ptOrg: TPoint;
begin
  FCellsList := TList.Create;
  FLeftMargin := 5;
  FOwnerLine := nil;
  FOwnerCell := nil;

  FCellIndex := -1;

  FCellLeft := 0;
  FCellWidth := 0;

  FCellRect.Left := 0;
  FCellRect.Top := 0;
  FCellRect.Right := 0;
  FCellRect.Bottom := 0;

  FTextRect.Left := 0;
  FTextRect.Top := 0;
  FTextRect.Right := 0;
  FTextRect.Bottom := 0;

  FDragCellHeight := 0;
  FMinCellHeight := 0;
  FRequiredCellHeight := 0;

  // border
  FLeftLine := True;
  FLeftLineWidth := 1;

  FTopLine := True;
  FTopLineWidth := 1;

  FRightLine := True;
  FRightLineWidth := 1;

  FBottomLine := True;
  FBottomLineWidth := 1;

  // 斜線
  FDiagonal := 0;

  // color
  FTextColor := RGB(0, 0, 0);
  FBackGroundColor := RGB(255, 255, 255);

  // align
  FHorzAlign := TEXT_ALIGN_LEFT;
  FVertAlign := TEXT_ALIGN_CENTER;

  // string
  FCellText := '';

  // font
  FLogFont.lfHeight := 120;
  FLogFont.lfWidth := 0;
  FLogFont.lfEscapement := 0;
  FLogFont.lfOrientation := 0;
  FLogFont.lfWeight := 0;
  FLogFont.lfItalic := 0;
  FLogFont.lfUnderline := 0;
  FLogFont.lfStrikeOut := 0;
  FLogFont.lfCharSet := DEFAULT_CHARSET;
  FLogFont.lfOutPrecision := 0;
  FLogFont.lfClipPrecision := 0;
  FLogFont.lfQuality := 0;
  FLogFont.lfPitchAndFamily := 0;
  FLogFont.lfFaceName := '宋體';

  // Hey, I pass a invalid window's handle to you, what you return to me ?
  // Haha, is a device context of the DESKTOP WINDOW !
  hTempDC := GetDC(0);

  pt.y := GetDeviceCaps(hTempDC, LOGPIXELSY) * FLogFont.lfHeight;
  pt.y := trunc(pt.y / 720 + 0.5); // 72 points/inch, 10 decipoints/point
  DPtoLP(hTempDC, pt, 1);
  ptOrg.x := 0;
  ptOrg.y := 0;
  DPtoLP(hTempDC, ptOrg, 1);
  FLogFont.lfHeight := -abs(pt.y - ptOrg.y);
  ReleaseDC(0, hTempDC);

end;

destructor TReportCell.Destroy;
begin
  FCellsList.Free;
  FCellsList := nil;

  inherited Destroy;
end;

function TReportCell.GetOwnerLineHeight: Integer;
begin
  if FOwnerLine = nil then
    Result := 0
  else
    Result := FOwnerLine.LineHeight;
end;

procedure TReportCell.CopyCell(Cell: TReportCell; bInsert: Boolean);
begin
  FLeftMargin := Cell.FLeftMargin;

  // Index
  FCellIndex := Cell.FCellIndex;

  // size & position
  FCellLeft := Cell.FCellLeft;
  FCellWidth := Cell.FCellWidth;

  FCellRect.Left := 0;
  FCellRect.Top := 0;
  FCellRect.Right := 0;
  FCellRect.Bottom := 0;

  FTextRect.Left := 0;
  FTextRect.Top := 0;
  FTextRect.Right := 0;
  FTextRect.Bottom := 0;

  FDragCellHeight := Cell.FDragCellHeight;
  FMinCellHeight := Cell.FMinCellHeight;

  // border
  FLeftLine := Cell.FLeftLine;

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
99久久久久久99| 奇米色777欧美一区二区| 丁香一区二区三区| 久久久久久久久久久久久久久99| 免费成人美女在线观看| 精品国产污网站| 国产成人综合在线观看| 亚洲国产激情av| 91成人免费网站| 午夜婷婷国产麻豆精品| 日韩一区二区三区免费看| 美女免费视频一区| 中文字幕精品在线不卡| 91麻豆.com| 免费在线看一区| 日本一区二区三区dvd视频在线| 国产福利一区二区三区在线视频| 国产精品美女www爽爽爽| 91久久精品网| 欧美日韩亚洲综合在线| 国产精品网曝门| av午夜一区麻豆| 三级久久三级久久久| 精品久久久久av影院| 丁香六月综合激情| 亚洲一区二区三区四区五区黄 | 26uuu久久综合| 色综合网站在线| 91免费在线视频观看| 亚洲第一精品在线| 国产欧美一区二区三区网站| 欧美午夜片在线观看| 国产尤物一区二区在线| 一区二区三区丝袜| 久久久久久免费| 欧美日韩一区小说| 成人高清在线视频| 久久精品国产亚洲aⅴ| 亚洲精品你懂的| 久久精品一二三| 欧美日韩国产经典色站一区二区三区 | 日本va欧美va欧美va精品| 欧美精品一区二| 555夜色666亚洲国产免| 成人h版在线观看| 久久66热re国产| 亚洲一卡二卡三卡四卡无卡久久| 国产欧美va欧美不卡在线| 欧美高清激情brazzers| 成人av资源网站| 国产伦精品一区二区三区视频青涩| 亚洲一区二区在线视频| 国产精品妹子av| 久久夜色精品一区| 欧美一区二区人人喊爽| 精品视频在线免费观看| 91免费视频网址| www.久久精品| 国产美女娇喘av呻吟久久| 免费观看30秒视频久久| 亚洲成人黄色影院| 亚洲影视在线观看| 日韩理论片中文av| 国产精品成人一区二区三区夜夜夜| www国产亚洲精品久久麻豆| 欧美丰满一区二区免费视频 | 午夜av区久久| 亚洲综合男人的天堂| 亚洲欧美综合另类在线卡通| 久久亚洲欧美国产精品乐播| 欧美大片一区二区| 日韩欧美美女一区二区三区| 欧美日韩不卡在线| 欧美一区二区在线视频| 欧美日韩免费高清一区色橹橹| 色94色欧美sute亚洲13| 色香蕉久久蜜桃| 一本色道久久综合狠狠躁的推荐| 91小视频在线免费看| 色综合久久99| 欧美亚洲动漫制服丝袜| 欧美视频一区二区三区四区| 欧美在线观看视频在线| 欧美男人的天堂一二区| 欧美精选午夜久久久乱码6080| 欧美日韩成人综合| 这里只有精品电影| 精品日本一线二线三线不卡| 久久午夜老司机| 欧美国产综合一区二区| 亚洲情趣在线观看| 亚洲成人av一区二区| 日本在线不卡一区| 视频在线观看国产精品| 国产a区久久久| 国产盗摄精品一区二区三区在线 | 国产精品女同一区二区三区| 中文字幕一区二区在线播放| 中文字幕一区三区| 亚洲欧美日韩小说| 天天操天天色综合| 狠狠色丁香久久婷婷综合_中| 国产成人av电影在线播放| www.性欧美| 欧美精品99久久久**| 精品国产1区2区3区| 成人免费在线播放视频| 婷婷国产在线综合| 国产一区二区三区电影在线观看| 99久久综合精品| 91精品国产综合久久精品| 26uuu成人网一区二区三区| 亚洲欧美一区二区在线观看| 五月激情综合色| 国产成人av资源| 在线日韩国产精品| 久久先锋影音av鲁色资源 | 亚洲一区二区av在线| 蜜桃精品在线观看| 99v久久综合狠狠综合久久| 欧美日韩精品二区第二页| 久久综合视频网| 夜夜爽夜夜爽精品视频| 国产一区二区三区免费观看| 在线视频一区二区三| 精品国产成人系列| 亚洲国产裸拍裸体视频在线观看乱了| 国产精品一二三| 欧美日韩中文字幕精品| 国产精品区一区二区三区| 日韩av中文字幕一区二区三区| 成人黄色大片在线观看| 日韩欧美一区在线观看| 亚洲精品乱码久久久久久日本蜜臀| 激情图片小说一区| 欧美精品丝袜久久久中文字幕| 中文字幕一区二区三区在线不卡 | 精品一区二区在线视频| 在线免费观看日本一区| 日本一区二区在线不卡| 六月丁香综合在线视频| 欧美最猛性xxxxx直播| 欧美激情一区二区在线| 精一区二区三区| 555www色欧美视频| 亚洲图片欧美一区| 色激情天天射综合网| 亚洲国产高清在线| 欧美色国产精品| 亚洲免费看黄网站| 99久久伊人精品| 中文一区在线播放| 国产精品亚洲专一区二区三区| 日韩一区二区三区三四区视频在线观看| 亚洲一区免费视频| 欧美专区在线观看一区| 中文字幕在线不卡| 成人精品亚洲人成在线| 久久精品欧美一区二区三区不卡| 免费欧美日韩国产三级电影| 欧美日本乱大交xxxxx| 亚洲国产日韩av| 欧美在线观看18| 亚洲一区二区三区美女| 99久久精品国产一区二区三区| 国产欧美日韩麻豆91| 国产在线不卡一卡二卡三卡四卡| 欧美一级免费观看| 免费观看一级欧美片| 日韩视频一区二区三区在线播放 | 日韩国产欧美一区二区三区| 欧美日韩一区二区在线观看视频| 夜夜爽夜夜爽精品视频| 在线视频你懂得一区二区三区| 亚洲黄色尤物视频| 欧美日韩国产成人在线免费| 亚洲一区二区三区四区在线观看 | 91成人在线免费观看| 亚洲自拍偷拍九九九| 欧美亚洲另类激情小说| 亚洲va国产va欧美va观看| 678五月天丁香亚洲综合网| 免费观看成人av| 久久综合网色—综合色88| 国产成人aaaa| 一区二区三区欧美在线观看| 欧美日免费三级在线| 久久国产视频网| 中文字幕国产一区| 在线视频一区二区三| 日韩av中文字幕一区二区三区| 精品成人私密视频| eeuss国产一区二区三区| 亚洲夂夂婷婷色拍ww47| 欧美一区二区三区电影| 国产精品系列在线播放| 亚洲日本护士毛茸茸| 欧美一区二区在线免费播放 | 亚洲日本韩国一区| 制服丝袜日韩国产|