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

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

?? graphicex.pas

?? 很管用的GIS控件
?? PAS
?? 第 1 頁 / 共 5 頁
字號:
    begin
      Value := (((-B - 6 * C) * (Value * Temp))
               + ((6 * B + 30 * C) * Temp)
               + ((-12 * B - 48 * C) * Value)
               + (8 * B + 24 * C));
      Result := Value / 6;
    end
    else Result := 0;
end;

//----------------------------------------------------------------------------------------------------------------------

const
  FilterList: array[TResamplingFilter] of TFilterFunction = (
    BoxFilter,
    TriangleFilter,
    HermiteFilter,
    BellFilter,
    SplineFilter,
    Lanczos3Filter,
    MitchellFilter
  );

//----------------------------------------------------------------------------------------------------------------------

procedure FillLineChache(N, Delta: Integer; Line: Pointer);

var
  I: Integer;
  Run: PBGR;

begin
  Run := Line;
  for I := 0 to N - 1 do
  begin
    CurrentLineR[I] := Run.R;
    CurrentLineG[I] := Run.G;
    CurrentLineB[I] := Run.B;
    Inc(PByte(Run), Delta);
  end;
end;

//----------------------------------------------------------------------------------------------------------------------

function ApplyContributors(N: Integer; Contributors: TContributors): TBGR;

var
  J: Integer;
  RGB: TRGBInt;
  Total,
  Weight: Integer;
  Pixel: Cardinal;
  Contr: ^TContributor;
    
begin
  RGB.R := 0;
  RGB.G := 0;
  RGB.B := 0;
  Total := 0;
  Contr := @Contributors[0];
  for J := 0 to N - 1 do
  begin
    Weight := Contr.Weight;
    Inc(Total, Weight);
    Pixel := Contr.Pixel;
    Inc(RGB.r, CurrentLineR[Pixel] * Weight);
    Inc(RGB.g, CurrentLineG[Pixel] * Weight);
    Inc(RGB.b, CurrentLineB[Pixel] * Weight);

    Inc(Contr);
  end;

  if Total = 0 then
  begin
    Result.R := ClampByte(RGB.R shr 8);
    Result.G := ClampByte(RGB.G shr 8);
    Result.B := ClampByte(RGB.B shr 8);
  end
  else
  begin
    Result.R := ClampByte(RGB.R div Total);
    Result.G := ClampByte(RGB.G div Total);
    Result.B := ClampByte(RGB.B div Total);
  end;
end;

//----------------------------------------------------------------------------------------------------------------------

procedure DoStretch(Filter: TFilterFunction; Radius: Single; Source, Target: TBitmap);

// This is the actual scaling routine. Target must be allocated already with sufficient size. Source must
// contain valid data, Radius must not be 0 and Filter must not be nil.

var
  ScaleX,
  ScaleY: Single;  // Zoom scale factors
  I, J,
  K, N: Integer; // Loop variables
  Center: Single; // Filter calculation variables
  Width: Single;
  Weight: Integer;  // Filter calculation variables
  Left,
  Right: Integer; // Filter calculation variables
  Work: TBitmap;
  ContributorList: TContributorList;
  SourceLine,
  DestLine: PPixelArray;
  DestPixel: PBGR;
  Delta,
  DestDelta: Integer;
  SourceHeight,
  SourceWidth,
  TargetHeight,
  TargetWidth: Integer;

begin
  // shortcut variables
  SourceHeight := Source.Height;
  SourceWidth := Source.Width;
  TargetHeight := Target.Height;
  TargetWidth := Target.Width;

  if (SourceHeight = 0) or (SourceWidth = 0) or
     (TargetHeight = 0) or (TargetWidth = 0) then Exit;
     
  // create intermediate image to hold horizontal zoom
  Work := TBitmap.Create;
  try
    Work.PixelFormat := pf24Bit;
    Work.Height := SourceHeight;
    Work.Width := TargetWidth;
    if SourceWidth = 1 then ScaleX :=  TargetWidth / SourceWidth
                       else ScaleX :=  (TargetWidth - 1) / (SourceWidth - 1);
    if (SourceHeight = 1) or (TargetHeight = 1) then ScaleY :=  TargetHeight / SourceHeight
                                                else ScaleY :=  (TargetHeight - 1) / (SourceHeight - 1);

    // pre-calculate filter contributions for a row
    SetLength(ContributorList, TargetWidth);
    // horizontal sub-sampling
    if ScaleX < 1 then
    begin
      // scales from bigger to smaller Width
      Width := Radius / ScaleX;
      for I := 0 to TargetWidth - 1 do
      begin
        ContributorList[I].N := 0;
        SetLength(ContributorList[I].Contributors, Trunc(2 * Width + 1));
        Center := I / ScaleX;
        Left := Floor(Center - Width);
        Right := Ceil(Center + Width);
        for J := Left to Right do
        begin
          Weight := Round(Filter((Center - J) * ScaleX) * ScaleX * 256);
          if Weight <> 0 then
          begin
            if J < 0 then N := -J
                     else
              if J >= SourceWidth then N := SourceWidth - J + SourceWidth - 1
                                  else N := J;
            K := ContributorList[I].N;
            Inc(ContributorList[I].N);
            ContributorList[I].Contributors[K].Pixel := N;
            ContributorList[I].Contributors[K].Weight := Weight;
          end;
        end;
      end;
    end
    else
    begin
      // horizontal super-sampling
      // scales from smaller to bigger Width
      for I := 0 to TargetWidth - 1 do
      begin
        ContributorList[I].N := 0;
        SetLength(ContributorList[I].Contributors, Trunc(2 * Radius + 1));
        Center := I / ScaleX;
        Left := Floor(Center - Radius);
        Right := Ceil(Center + Radius);
        for J := Left to Right do
        begin
          Weight := Round(Filter(Center - J) * 256);
          if Weight <> 0 then
          begin
            if J < 0 then N := -J
                     else
             if J >= SourceWidth then N := SourceWidth - J + SourceWidth - 1
                                 else N := J;
            K := ContributorList[I].N;
            Inc(ContributorList[I].N);
            ContributorList[I].Contributors[K].Pixel := N;
            ContributorList[I].Contributors[K].Weight := Weight;
          end;
        end;
      end;
    end;

    // now apply filter to sample horizontally from Src to Work
    SetLength(CurrentLineR, SourceWidth);
    SetLength(CurrentLineG, SourceWidth);
    SetLength(CurrentLineB, SourceWidth);
    for K := 0 to SourceHeight - 1 do
    begin
      SourceLine := Source.ScanLine[K];
      FillLineChache(SourceWidth, 3, SourceLine);
      DestPixel := Work.ScanLine[K];
      for I := 0 to TargetWidth - 1 do
        with ContributorList[I] do
        begin
          DestPixel^ := ApplyContributors(N, ContributorList[I].Contributors);
          // move on to next column
          Inc(DestPixel);
        end;
    end;

    // free the memory allocated for horizontal filter weights, since we need the stucture again
    for I := 0 to TargetWidth - 1 do ContributorList[I].Contributors := nil;
    ContributorList := nil;

    // pre-calculate filter contributions for a column
    SetLength(ContributorList, TargetHeight);
    // vertical sub-sampling
    if ScaleY < 1 then
    begin
      // scales from bigger to smaller height
      Width := Radius / ScaleY;
      for I := 0 to TargetHeight - 1 do
      begin
        ContributorList[I].N := 0;
        SetLength(ContributorList[I].Contributors, Trunc(2 * Width + 1));
        Center := I / ScaleY;
        Left := Floor(Center - Width);
        Right := Ceil(Center + Width);
        for J := Left to Right do
        begin
          Weight := Round(Filter((Center - J) * ScaleY) * ScaleY * 256);
          if Weight <> 0 then
          begin
            if J < 0 then N := -J
                     else
              if J >= SourceHeight then N := SourceHeight - J + SourceHeight - 1
                                   else N := J;
            K := ContributorList[I].N;
            Inc(ContributorList[I].N);
            ContributorList[I].Contributors[K].Pixel := N;
            ContributorList[I].Contributors[K].Weight := Weight;
          end;
        end;
      end
    end
    else
    begin
      // vertical super-sampling
      // scales from smaller to bigger height
      for I := 0 to TargetHeight - 1 do
      begin
        ContributorList[I].N := 0;
        SetLength(ContributorList[I].Contributors, Trunc(2 * Radius + 1));
        Center := I / ScaleY;
        Left := Floor(Center - Radius);
        Right := Ceil(Center + Radius);
        for J := Left to Right do
        begin
          Weight := Round(Filter(Center - J) * 256);
          if Weight <> 0 then
          begin
            if J < 0 then N := -J
                     else
              if J >= SourceHeight then N := SourceHeight - J + SourceHeight - 1
                                   else N := J;
            K := ContributorList[I].N;
            Inc(ContributorList[I].N);
            ContributorList[I].Contributors[K].Pixel := N;
            ContributorList[I].Contributors[K].Weight := Weight;
          end;
        end;
      end;
    end;

    // apply filter to sample vertically from Work to Target
    SetLength(CurrentLineR, SourceHeight);
    SetLength(CurrentLineG, SourceHeight);
    SetLength(CurrentLineB, SourceHeight);


    SourceLine := Work.ScanLine[0];
    Delta := Integer(Work.ScanLine[1]) - Integer(SourceLine);
    DestLine := Target.ScanLine[0];
    DestDelta := Integer(Target.ScanLine[1]) - Integer(DestLine);
    for K := 0 to TargetWidth - 1 do
    begin
      DestPixel := Pointer(DestLine);
      FillLineChache(SourceHeight, Delta, SourceLine);
      for I := 0 to TargetHeight - 1 do
        with ContributorList[I] do
        begin
          DestPixel^ := ApplyContributors(N, ContributorList[I].Contributors);
          Inc(Integer(DestPixel), DestDelta);
        end;
      Inc(SourceLine);
      Inc(DestLine);
    end;

    // free the memory allocated for vertical filter weights
    for I := 0 to TargetHeight - 1 do ContributorList[I].Contributors := nil;
    // this one is done automatically on exit, but is here for completeness
    ContributorList := nil;

  finally
    Work.Free;
    CurrentLineR := nil;
    CurrentLineG := nil;
    CurrentLineB := nil;
  end;
end;

//----------------------------------------------------------------------------------------------------------------------

procedure Stretch(NewWidth, NewHeight: Cardinal; Filter: TResamplingFilter; Radius: Single; Source, Target: TBitmap);

// Scales the source bitmap to the given size (NewWidth, NewHeight) and stores the Result in Target.
// Filter describes the filter function to be applied and Radius the size of the filter area.
// Is Radius = 0 then the recommended filter area will be used (see DefaultFilterRadius).

begin
  if Radius = 0 then Radius := DefaultFilterRadius[Filter];
  Target.Handle := 0;
  Target.PixelFormat := pf24Bit;
  Target.Width := NewWidth;
  Target.Height := NewHeight;
  Source.PixelFormat := pf24Bit;
  DoStretch(FilterList[Filter], Radius, Source, Target);
end;

//----------------------------------------------------------------------------------------------------------------------

procedure Stretch(NewWidth, NewHeight: Cardinal; Filter: TResamplingFilter; Radius: Single; Source: TBitmap);

var
  Target: TBitmap;

begin
  if Radius = 0 then Radius := DefaultFilterRadius[Filter];
  Target := TBitmap.Create;
  try
    Target.PixelFormat := pf24Bit;
    Target.Width := NewWidth;
    Target.Height := NewHeight;
    Source.PixelFormat := pf24Bit;
    DoStretch(FilterList[Filter], Radius, Source, Target);
    Source.Assign(Target);
  finally
    Target.Free;
  end;
end;

//----------------- support functions for image loading ----------------------------------------------------------------

procedure SwapShort(P: PWord; Count: Cardinal); 

// swaps high and low byte of 16 bit values
// EAX contains P, EDX contains Count

asm
@@Loop:
              MOV CX, [EAX]
              XCHG CH, CL
              MOV [EAX], CX
              ADD EAX, 2
              DEC EDX
              JNZ @@Loop

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
884aa四虎影成人精品一区| 欧美亚洲日本一区| 亚洲精品乱码久久久久久久久| 精品视频一区二区不卡| 国产不卡视频一区二区三区| 亚洲成a人片在线观看中文| 久久免费看少妇高潮| 欧美性受xxxx黑人xyx性爽| 国产麻豆成人传媒免费观看| 亚洲成人午夜电影| 中文字幕av一区二区三区高| 欧美一区二区三区男人的天堂| 99精品在线免费| 国产麻豆午夜三级精品| 亚洲sss视频在线视频| 综合久久国产九一剧情麻豆| 2020国产精品久久精品美国| 欧美肥大bbwbbw高潮| 91麻豆免费看| 成人丝袜高跟foot| 国精产品一区一区三区mba视频 | 在线综合亚洲欧美在线视频| 91日韩精品一区| 丁香桃色午夜亚洲一区二区三区| 青草av.久久免费一区| 亚洲大尺度视频在线观看| 最近中文字幕一区二区三区| 久久久久久免费网| 日韩免费观看高清完整版| 欧美精品乱码久久久久久| 在线视频欧美精品| 色婷婷综合中文久久一本| 成人av资源下载| 成人av午夜影院| 成人av免费在线观看| 国产成人午夜精品影院观看视频| 精品一区二区国语对白| 免费成人深夜小野草| 青椒成人免费视频| 麻豆精品国产传媒mv男同| 日av在线不卡| 蜜桃视频一区二区三区在线观看| 日韩av一二三| 奇米影视在线99精品| 日本亚洲视频在线| 六月丁香综合在线视频| 蜜桃91丨九色丨蝌蚪91桃色| 免费一区二区视频| 捆绑紧缚一区二区三区视频| 国产综合色视频| 国产精品一区二区91| 风间由美中文字幕在线看视频国产欧美| 极品少妇一区二区三区精品视频| 久久国产麻豆精品| 国产乱色国产精品免费视频| 国产成人av网站| 成人美女视频在线观看| 99国产精品国产精品毛片| 色妞www精品视频| 欧美色图免费看| 日韩女同互慰一区二区| 国产欧美日韩亚州综合| 中文字幕一区在线观看视频| 亚洲精品写真福利| 爽好久久久欧美精品| 狠狠网亚洲精品| 成人高清伦理免费影院在线观看| 日本福利一区二区| 欧美一级片在线看| 国产女主播一区| 亚洲国产日韩a在线播放性色| 日本欧美大码aⅴ在线播放| 国产精品99久久久久久有的能看| 成人午夜激情在线| 91福利资源站| 日韩欧美一区二区三区在线| 欧美极品aⅴ影院| 亚洲一卡二卡三卡四卡 | 国产九色sp调教91| 91视频xxxx| 精品国精品国产尤物美女| 欧美韩日一区二区三区| 亚洲一区二区三区四区在线观看 | 国产揄拍国内精品对白| 色综合久久久久久久久久久| 欧美一区二区视频在线观看2022| 久久久噜噜噜久久人人看| 夜色激情一区二区| 国产精品自拍在线| 欧美在线观看禁18| 久久久久国产一区二区三区四区 | 国产在线播精品第三| 日本高清视频一区二区| 久久综合色婷婷| 亚洲妇熟xx妇色黄| 国产1区2区3区精品美女| 欧美日本一道本在线视频| 国产天堂亚洲国产碰碰| 午夜电影一区二区三区| 99re热这里只有精品视频| 欧美tickling挠脚心丨vk| 一区二区免费看| 国产.欧美.日韩| 日韩欧美国产小视频| 亚洲一区自拍偷拍| 成人app软件下载大全免费| 欧美一区二视频| 亚洲va欧美va国产va天堂影院| 国产白丝精品91爽爽久久 | 国产精品伦理在线| 久久99精品久久久久| 欧美日韩国产一区二区三区地区| 亚洲国产高清在线观看视频| 久久精品国产网站| 欧美日韩免费观看一区三区| 国产精品护士白丝一区av| 国产一区二区影院| 日韩限制级电影在线观看| 亚洲五码中文字幕| 91香蕉视频污| 国产精品久久久久四虎| 国产一区二区三区在线观看精品| 日韩一区二区免费高清| 亚洲午夜激情网站| 欧美男生操女生| 亚洲成人激情综合网| 日本丶国产丶欧美色综合| 亚洲欧美日韩成人高清在线一区| 国产成人免费9x9x人网站视频| 精品欧美乱码久久久久久1区2区| 日韩中文字幕麻豆| 欧美日韩高清一区二区不卡| 一区二区三区日韩欧美精品| 91免费看`日韩一区二区| 国产精品看片你懂得| 国产精品白丝jk白祙喷水网站 | 日韩欧美一区在线| 美国欧美日韩国产在线播放 | 国产精品久久久久久久久免费桃花| 国产一区不卡视频| 国产午夜精品在线观看| 国产一区二区三区蝌蚪| 国产午夜精品一区二区三区嫩草| 国产风韵犹存在线视精品| 国产免费成人在线视频| 成人av资源在线| 亚洲美女视频一区| 欧美日韩一区在线观看| 视频一区在线播放| 日韩欧美中文一区| 国产福利视频一区二区三区| 中文字幕国产精品一区二区| 91丨九色porny丨蝌蚪| 亚洲一线二线三线视频| 91精品国产综合久久福利软件 | 91精品国产色综合久久不卡电影| 麻豆国产一区二区| 亚洲国产精品精华液2区45| 91在线丨porny丨国产| 亚洲一区在线视频| 欧美一级爆毛片| 国产成人精品免费| 亚洲欧洲av一区二区三区久久| 91精彩视频在线| 美女国产一区二区三区| 欧美激情在线看| 欧美日韩亚洲综合一区二区三区| 免费观看日韩电影| 中文文精品字幕一区二区| 在线视频欧美精品| 黄色小说综合网站| 亚洲女人的天堂| 日韩欧美一级二级三级久久久| 成人午夜电影网站| 五月婷婷综合网| 久久久精品欧美丰满| 色悠久久久久综合欧美99| 日韩二区在线观看| 国产欧美一区二区精品忘忧草| 日本大香伊一区二区三区| 免费看欧美女人艹b| 国产精品久99| 日韩欧美国产一区二区三区| 不卡在线观看av| 日本在线观看不卡视频| 亚洲国产激情av| 91精品在线观看入口| 东方aⅴ免费观看久久av| 五月天久久比比资源色| 国产农村妇女精品| 日韩视频一区二区在线观看| 99久久久无码国产精品| 精品在线播放免费| 一区二区三区免费| 久久久精品tv| 欧美性淫爽ww久久久久无| 国产夫妻精品视频| 日韩电影免费在线看| 亚洲欧洲99久久| 久久网站最新地址|