Changeset 715 for trunk/Packages/CevoComponents/ScreenTools.pas
- Timestamp:
- Jan 4, 2026, 6:07:38 PM (3 days ago)
- File:
-
- 1 edited
-
trunk/Packages/CevoComponents/ScreenTools.pas (modified) (8 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/Packages/CevoComponents/ScreenTools.pas
r711 r715 116 116 117 117 const 118 BmpExt = '.bmp'; 119 PngExt = '.png'; 120 JpgExt = '.jpg'; 121 118 122 TransparentColor1 = $FF00FF; 119 123 TransparentColor2 = $7F007F; … … 434 438 Result := False; 435 439 if ExtractFileExt(FileName) = '' then 436 FileName := FileName + '.png';440 FileName := FileName + PngExt; 437 441 438 442 if FileExists(FileName) then begin 439 if ExtractFileExt(FileName) = '.jpg'then begin443 if ExtractFileExt(FileName) = JpgExt then begin 440 444 Jpeg := TJpegImage.Create; 441 445 try … … 451 455 FreeAndNil(Jpeg); 452 456 end else 453 if ExtractFileExt(FileName) = '.png'then begin457 if ExtractFileExt(FileName) = PngExt then begin 454 458 Png := TPortableNetworkGraphic.Create; 455 459 try … … 473 477 FreeAndNil(Png); 474 478 end else 475 if ExtractFileExt(FileName) = '.bmp'then begin479 if ExtractFileExt(FileName) = BmpExt then begin 476 480 try 477 481 Bmp.LoadFromFile(FileName); … … 1882 1886 LoadPhrases; 1883 1887 LoadFonts; 1884 Templates := LoadGraphicSet('Templates .png', False);1888 Templates := LoadGraphicSet('Templates' + PngExt, False); 1885 1889 with Templates do begin 1886 1890 Logo := GetItem('Logo'); … … 1898 1902 end; 1899 1903 1900 LoadGraphicFile(Colors, GetGraphicsDir + DirectorySeparator + 'Colors .png');1901 LoadGraphicFile(Paper, GetGraphicsDir + DirectorySeparator + 'Paper .jpg');1902 LoadGraphicFile(BigImp, GetGraphicsDir + DirectorySeparator + 'Icons .png');1904 LoadGraphicFile(Colors, GetGraphicsDir + DirectorySeparator + 'Colors' + PngExt); 1905 LoadGraphicFile(Paper, GetGraphicsDir + DirectorySeparator + 'Paper' + JpgExt); 1906 LoadGraphicFile(BigImp, GetGraphicsDir + DirectorySeparator + 'Icons' + PngExt); 1903 1907 end; 1904 1908 … … 1923 1927 GrExt := TGraphicSets.Create; 1924 1928 1925 HGrSystem := LoadGraphicSet('System .png');1929 HGrSystem := LoadGraphicSet('System' + PngExt); 1926 1930 with HGrSystem do begin 1927 1931 CityMark1 := GetItem('CityMark1'); … … 1929 1933 end; 1930 1934 1931 HGrSystem2 := LoadGraphicSet('System2 .png');1935 HGrSystem2 := LoadGraphicSet('System2' + PngExt); 1932 1936 with HGrSystem2 do begin 1933 1937 Ornament := GetItem('Ornament');
Note:
See TracChangeset
for help on using the changeset viewer.
