Changeset 288 for trunk/Packages
- Timestamp:
- Feb 26, 2021, 9:43:24 PM (4 years ago)
- Location:
- trunk/Packages/CevoComponents
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Packages/CevoComponents/ScreenTools.pas
r286 r288 91 91 function SetMainTextureByAge(Age: integer): boolean; 92 92 procedure LoadPhrases; 93 procedure Texturize(Dest, Texture: TBitmap; TransparentColor: Integer);93 procedure Texturize(Dest, Texture: TBitmap; TransparentColor: Cardinal); 94 94 procedure DarkenImage(Bitmap: TBitmap; Change: Integer); 95 95 function ScaleToNative(Value: Integer): Integer; … … 1248 1248 i, r, g, b: Integer; 1249 1249 begin 1250 begin 1251 for i := 0 to 15 do 1252 begin // gradient 1253 r := Color and $FF + Brightness[i]; 1254 if r < 0 then 1255 r := 0 1256 else if r >= 256 then 1257 r := 255; 1258 g := Color shr 8 and $FF + Brightness[i]; 1259 if g < 0 then 1260 g := 0 1261 else if g >= 256 then 1262 g := 255; 1263 b := Color shr 16 and $FF + Brightness[i]; 1264 if b < 0 then 1265 b := 0 1266 else if b >= 256 then 1267 b := 255; 1268 ca.Pen.Color := r + g shl 8 + b shl 16; 1269 ca.MoveTo(x + dx * i, y + dy * i); 1270 ca.LineTo(x + dx * i + Width, y + dy * i + Height); 1271 end; 1272 ca.Pen.Color := $000000; 1273 ca.MoveTo(x + 1, y + 16 * dy + Height); 1274 ca.LineTo(x + 16 * dx + Width, y + 16 * dy + Height); 1275 ca.LineTo(x + 16 * dx + Width, y); 1276 end; 1250 for i := 0 to Length(Brightness) - 1 do begin // gradient 1251 r := Color and $FF + Brightness[i]; 1252 if r < 0 then 1253 r := 0 1254 else if r >= 256 then 1255 r := 255; 1256 g := Color shr 8 and $FF + Brightness[i]; 1257 if g < 0 then 1258 g := 0 1259 else if g >= 256 then 1260 g := 255; 1261 b := Color shr 16 and $FF + Brightness[i]; 1262 if b < 0 then 1263 b := 0 1264 else if b >= 256 then 1265 b := 255; 1266 ca.Pen.Color := r + g shl 8 + b shl 16; 1267 ca.MoveTo(x + dx * i, y + dy * i); 1268 ca.LineTo(x + dx * i + Width, y + dy * i + Height); 1269 end; 1270 ca.Pen.Color := $000000; 1271 ca.MoveTo(x + 1, y + 16 * dy + Height); 1272 ca.LineTo(x + 16 * dx + Width, y + 16 * dy + Height); 1273 ca.LineTo(x + 16 * dx + Width, y); 1277 1274 end; 1278 1275 … … 1550 1547 end; 1551 1548 1552 procedure Texturize(Dest, Texture: TBitmap; TransparentColor: Integer);1549 procedure Texturize(Dest, Texture: TBitmap; TransparentColor: Cardinal); 1553 1550 var 1554 1551 SrcPixel, DstPixel: TPixelPointer; -
trunk/Packages/CevoComponents/Sound.pas
r287 r288 68 68 {$R *.lfm} 69 69 70 {$IFDEF LINUX} 70 71 resourcestring 71 72 SUnableToPlay = 'PlayStyle=%s: Unable to play %s Message:%s'; 72 73 SPlayCommandNotWork = 'The play command %s does not work on your system'; 74 {$ENDIF} 73 75 74 76 constructor TSound.Create(const FileName: string);
Note:
See TracChangeset
for help on using the changeset viewer.