mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-12-03 19:07:27 +01:00
fixed color coversion range check
git-svn-id: trunk@4959 -
This commit is contained in:
parent
434b161072
commit
a3038d1607
@ -134,7 +134,7 @@ type
|
||||
|
||||
TPageControl = class;
|
||||
|
||||
TTabPosition = (tpTop, tpBottom, tpLeft, tpRight);
|
||||
// TTabPosition is in extctrls.pas
|
||||
TTabStyle = (tsTabs, tsButtons, tsFlatButtons);
|
||||
|
||||
TTabChangingEvent = procedure(Sender: TObject;
|
||||
@ -1936,6 +1936,9 @@ end.
|
||||
{ =============================================================================
|
||||
|
||||
$Log$
|
||||
Revision 1.95 2003/12/26 10:59:24 mattias
|
||||
fixed color coversion range check
|
||||
|
||||
Revision 1.94 2003/12/25 14:17:07 mattias
|
||||
fixed many range check warnings
|
||||
|
||||
|
||||
@ -26,8 +26,7 @@ unit CustomTimer;
|
||||
interface
|
||||
|
||||
uses
|
||||
Classes, SysUtils, LCLStrConsts, LCLType, LMessages, VCLGlobals,
|
||||
InterfaceBase;
|
||||
Classes, SysUtils, LCLStrConsts, LCLType, VCLGlobals, InterfaceBase;
|
||||
|
||||
type
|
||||
|
||||
|
||||
@ -715,7 +715,6 @@ type
|
||||
|
||||
TPanelBevel = TBevelCut;
|
||||
TBevelWidth = 1..Maxint;
|
||||
TBorderWidth = 0..Maxint;
|
||||
|
||||
TCustomPanel = class(TCustomControl)
|
||||
private
|
||||
@ -835,6 +834,9 @@ end.
|
||||
|
||||
{
|
||||
$Log$
|
||||
Revision 1.84 2003/12/26 10:59:25 mattias
|
||||
fixed color coversion range check
|
||||
|
||||
Revision 1.83 2003/12/23 18:15:37 mattias
|
||||
fixed TNoteBook.OnPageChanged for user PageIndex
|
||||
|
||||
|
||||
@ -314,7 +314,7 @@ var
|
||||
I: Integer;
|
||||
OtherControl: TControl;
|
||||
|
||||
function IsClass(ClassType: TClass; const Name: string): Boolean;
|
||||
{function IsClass(ClassType: TClass; const Name: string): Boolean;
|
||||
begin
|
||||
Result := True;
|
||||
while ClassType <> nil do
|
||||
@ -323,7 +323,7 @@ var
|
||||
ClassType := ClassType.ClassParent;
|
||||
end;
|
||||
Result := False;
|
||||
end;
|
||||
end;}
|
||||
|
||||
begin
|
||||
// check that no other updown component is associated to the new Associate
|
||||
|
||||
@ -4119,18 +4119,15 @@ var
|
||||
num : LongInt; // example assume value := $00FF2510
|
||||
|
||||
begin
|
||||
if Value<0 then begin
|
||||
FillChar(Result,SizeOf(Result),0);
|
||||
exit;
|
||||
end;
|
||||
|
||||
NewColor.pixel := 0;
|
||||
// value - $00FF2510
|
||||
num := (value shr 8) shl 8; // num - $00FF2500
|
||||
newColor.red := (value - num) * 257; // red - $00000010 * 257
|
||||
|
||||
// value - $00FF2510
|
||||
num := (value shr 16) shl 8; // num - $0000FF00
|
||||
//value2 - $0000FF25
|
||||
newColor.green := ((value shr 8) - num) * 257; // green = $00000025 * 257
|
||||
|
||||
// value - $00FF2510
|
||||
newColor.blue := (value shr 16) * 257; // blue - $000000FF * 257
|
||||
newColor.red := (value and $ff) * 257; // red - $00000010 * 257
|
||||
newColor.green := ((value shr 8) and $ff) * 257; // green = $00000025 * 257
|
||||
newColor.blue := ((value shr 16) and $ff) * 257; // blue - $000000FF * 257
|
||||
|
||||
result := newColor;
|
||||
end;
|
||||
@ -5627,6 +5624,9 @@ end;
|
||||
{ =============================================================================
|
||||
|
||||
$Log$
|
||||
Revision 1.235 2003/12/26 10:59:25 mattias
|
||||
fixed color coversion range check
|
||||
|
||||
Revision 1.234 2003/12/25 14:17:07 mattias
|
||||
fixed many range check warnings
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user