Ignore:
Timestamp:
Mar 18, 2021, 11:31:20 PM (4 years ago)
Author:
chronos
Message:
  • Modified: Some Templates items used as TGraphicSetItem.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/LocalPlayer/MessgEx.pas

    r315 r316  
    233233  hScrewed = 27;
    234234var
    235   ix, iy, xDst, yDst, dx, dy, xIcon, yIcon, xb, yb, wb, hb: integer;
     235  ix, iy, xDst, yDst, dx, dy, xIcon, yIcon: integer;
     236  BookRect: TRect;
    236237  x1, xR, yR, share: single;
    237238  Screwed: array [0 .. wScrewed - 1, 0 .. hScrewed - 1, 0 .. 3] of single;
     
    282283    end;
    283284    BigImp.EndUpdate;
    284     xb := xBBook;
    285     yb := yBBook;
    286     wb := wBBook;
    287     hb := hBBook;
     285    BookRect := BigBook.BoundsRect;
    288286  end
    289287  else
    290288  begin
    291     xb := xSBook;
    292     yb := ySBook;
    293     wb := wSBook;
    294     hb := hSBook;
    295   end;
    296   x := x - wb div 2;
     289    BookRect := SmallBook.BoundsRect;
     290  end;
     291  x := x - BookRect.Width div 2;
    297292
    298293  // paint
    299294  // TODO: Explicitly clear background to black but in fact BitBlt SRCCOPY should do it
    300295  LogoBuffer.Canvas.FillRect(0, 0, LogoBuffer.Width, LogoBuffer.Height);
    301   BitBltCanvas(LogoBuffer.Canvas, 0, 0, wb, hb, ca, x, y);
     296  BitBltCanvas(LogoBuffer.Canvas, 0, 0, BookRect.Width, BookRect.Height, ca, x, y);
    302297
    303298  if IconIndex >= 0 then
     
    310305            Trunc(Screwed[ix, iy, 0] / Screwed[ix, iy, 3]) shl 16;
    311306
    312   ImageOp_BCC(LogoBuffer, Templates.Data, 0, 0, xb, yb, wb, hb, clCover, clPage);
    313 
    314   BitBltCanvas(ca, x, y, wb, hb, LogoBuffer.Canvas, 0, 0);
     307  ImageOp_BCC(LogoBuffer, Templates.Data, Point(0, 0), BookRect, clCover, clPage);
     308
     309  BitBltCanvas(ca, x, y, BookRect.Width, BookRect.Height, LogoBuffer.Canvas, 0, 0);
    315310end;
    316311
Note: See TracChangeset for help on using the changeset viewer.