Changeset 40 for trunk/ScreenTools.pas


Ignore:
Timestamp:
Jan 9, 2017, 8:28:51 PM (7 years ago)
Author:
chronos
Message:
  • Fixed: More bitmaps to solve black background problem.
  • Fixed: Bad drawing of gradient lines.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/ScreenTools.pas

    r39 r40  
    983983  yOffset: integer);
    984984begin
    985   assert((Left + xOffset >= 0) and (Left + xOffset + Width <= wMainTexture) and
     985  Assert((Left + xOffset >= 0) and (Left + xOffset + Width <= wMainTexture) and
    986986    (Top + yOffset >= 0) and (Top + yOffset + Height <= hMainTexture));
    987987  BitBlt(ca.Handle, Left, Top, Width, Height, MainTexture.Image.Canvas.Handle,
     
    10561056        Texture.Height - y0cut - y1cut, Texture.Canvas.Handle, x0cut,
    10571057        y0cut, SRCCOPY);
    1058     end
     1058    end;
    10591059  end;
    10601060end;
     
    11991199      i, r, g, b: integer;
    12001200    begin
    1201       with ca do
    12021201      begin
    12031202        for i := 0 to 15 do
     
    12181217          else if b >= 256 then
    12191218            b := 255;
    1220           Pen.Color := r + g shl 8 + b shl 16;
    1221           MoveTo(x + dx * i, y + dy * i);
    1222           LineTo(x + dx * i + Width, y + dy * i + Height);
     1219          ca.Pen.Color := r + g shl 8 + b shl 16;
     1220          ca.MoveTo(x + dx * i, y + dy * i);
     1221          ca.LineTo(x + dx * i + Width, y + dy * i + Height);
    12231222        end;
    1224         Pen.Color := $000000;
    1225         MoveTo(x + 1, y + 16 * dy + Height);
    1226         LineTo(x + 16 * dx + Width, y + 16 * dy + Height);
    1227         LineTo(x + 16 * dx + Width, y);
     1223        ca.Pen.Color := $000000;
     1224        ca.MoveTo(x + 1, y + 16 * dy + Height);
     1225        ca.LineTo(x + 16 * dx + Width, y + 16 * dy + Height);
     1226        ca.LineTo(x + 16 * dx + Width, y);
    12281227      end
    12291228    end;
Note: See TracChangeset for help on using the changeset viewer.