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/Packages/CevoComponents/ScreenTools.pas

    r315 r316  
    4949procedure MakeRed(Dst: TBitmap; X, Y, Width, Height: Integer);
    5050procedure ImageOp_B(dst, Src: TBitmap; xDst, yDst, xSrc, ySrc, Width, Height: Integer);
    51 procedure ImageOp_BCC(dst, Src: TBitmap;
    52   xDst, yDst, xSrc, ySrc, Width, Height, Color1, Color2: Integer);
     51procedure ImageOp_BCC(Dst, Src: TBitmap;
     52  xDst, yDst, xSrc, ySrc, Width, Height, Color1, Color2: Integer); overload;
     53procedure ImageOp_BCC(Dst, Src: TBitmap;
     54  DstPos: TPoint; SrcRect: TRect; Color1, Color2: Integer); overload;
    5355procedure ImageOp_CBC(Dst, Src: TBitmap; xDst, yDst, xSrc, ySrc, Width, Height,
    5456  Color0, Color2: Integer);
     
    115117
    116118  // template positions in Templates.png
    117   xLogo = 1;
    118   yLogo = 1;
    119   wLogo = 122;
    120   hLogo = 23; // logo
    121   xBBook = 1;
    122   yBBook = 74;
    123   wBBook = 143;
    124   hBBook = 73; // big book
    125   xSBook = 72;
    126   ySBook = 37;
    127   wSBook = 72;
    128   hSBook = 36; // small book
    129119  xNation = 1;
    130120  yNation = 25;
     
    177167  Ornament: TGraphicSetItem;
    178168  Logo: TGraphicSetItem;
     169  BigBook: TGraphicSetItem;
     170  SmallBook: TGraphicSetItem;
     171  MenuLogo: TGraphicSetItem;
    179172  ClickFrameColor: Integer;
    180173  MainTextureAge: Integer;
     
    734727  Src.EndUpdate;
    735728  dst.EndUpdate;
     729end;
     730
     731procedure ImageOp_BCC(Dst, Src: TBitmap; DstPos: TPoint; SrcRect: TRect;
     732  Color1, Color2: Integer);
     733begin
     734  ImageOp_BCC(Dst, Src, DstPos.X, DstPos.Y, SrcRect.Left, SrcRect.Top,
     735    SrcRect.Width, SrcRect.Height, Color1, Color2);
    736736end;
    737737
     
    14981498  // TODO: Explicitly clear background to black but in fact BitBlt SRCCOPY should do it
    14991499  LogoBuffer.Canvas.FillRect(0, 0, LogoBuffer.Width, LogoBuffer.Height);
    1500   BitBltCanvas(LogoBuffer.Canvas, 0, 0, wLogo, hLogo, ca, x, y);
    1501   ImageOp_BCC(LogoBuffer, Templates.Data, 0, 0, 1, 1, wLogo, hLogo,
     1500  BitBltCanvas(LogoBuffer.Canvas, 0, 0, Logo.Width, Logo.Height, ca, x, y);
     1501  ImageOp_BCC(LogoBuffer, Templates.Data, Point(0, 0), Logo.BoundsRect,
    15021502    clLight, clShade);
    1503   BitBltCanvas(ca, x, y, wLogo, hLogo, LogoBuffer.Canvas, 0, 0);
     1503  BitBltCanvas(ca, x, y, Logo.Width, Logo.Height, LogoBuffer.Canvas, 0, 0);
    15041504end;
    15051505
     
    16821682  LoadFonts;
    16831683  Templates := LoadGraphicSet2('Templates.png');
     1684  Logo := Templates.GetItem('Logo');
     1685  BigBook := Templates.GetItem('BigBook');
     1686  SmallBook := Templates.GetItem('SmallBook');
     1687  MenuLogo := Templates.GetItem('MenuLogo');
    16841688  LoadGraphicFile(Colors, GetGraphicsDir + DirectorySeparator + 'Colors.png');
    16851689  LoadGraphicFile(Paper, GetGraphicsDir + DirectorySeparator + 'Paper.jpg');
     
    16981702  ResolutionChanged := False;
    16991703  {$ENDIF}
    1700 
    1701   LogoBuffer := TBitmap.Create;
    1702   LogoBuffer.PixelFormat := pf24bit;
    1703   LogoBuffer.SetSize(wBBook, hBBook);
    17041704
    17051705  for Section := Low(TFontType) to High(TFontType) do
     
    17281728
    17291729  LoadAssets;
     1730
     1731  LogoBuffer := TBitmap.Create;
     1732  LogoBuffer.PixelFormat := pf24bit;
     1733  LogoBuffer.SetSize(BigBook.Width, BigBook.Height);
    17301734end;
    17311735
Note: See TracChangeset for help on using the changeset viewer.