Ignore:
Timestamp:
May 14, 2020, 10:39:45 PM (5 years ago)
Author:
chronos
Message:
  • Modified: Optimized drawing in Wonders window.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Packages/CevoComponents/ScreenTools.pas

    r225 r230  
    911911begin
    912912  dst.BeginUpdate;
    913   DstPtr := PixelPointer(dst, x0, y0);
     913  DstPtr := PixelPointer(dst, x0 - GlowRange + 1, y0 - GlowRange + 1);
    914914  for y := -GlowRange + 1 to Height - 1 + GlowRange - 1 do begin
    915915    for x := -GlowRange + 1 to Width - 1 + GlowRange - 1 do begin
    916       DstPtr.SetXY(x, y);
    917916      if x < 0 then
    918917        if y < 0 then
     
    933932      else if y >= Height then
    934933        r := y - (Height - 1)
    935       else
     934      else begin
     935        DstPtr.NextPixel;
    936936        continue;
     937      end;
    937938      if r = 0 then
    938939        r := 1;
     
    942943            (DstPtr.Pixel^.Planes[2 - ch] * (r - 1) + (cl shr (8 * ch) and $FF) *
    943944            (GlowRange - r)) div (GlowRange - 1);
    944     end;
     945      DstPtr.NextPixel;
     946    end;
     947    DstPtr.NextLine;
    945948  end;
    946949  dst.EndUpdate;
Note: See TracChangeset for help on using the changeset viewer.