mirror of
https://github.com/moparisthebest/Simba
synced 2024-11-25 10:42:20 -05:00
Small bug that would cause simba to AV.
This commit is contained in:
parent
a8091d58b9
commit
450c60abd6
@ -12,11 +12,11 @@ object FunctionListFrame: TFunctionListFrame
|
|||||||
DesignTop = 219
|
DesignTop = 219
|
||||||
object FunctionList: TTreeView
|
object FunctionList: TTreeView
|
||||||
Left = 0
|
Left = 0
|
||||||
Height = 479
|
Height = 483
|
||||||
Top = 20
|
Top = 18
|
||||||
Width = 182
|
Width = 182
|
||||||
Align = alClient
|
Align = alClient
|
||||||
DefaultItemHeight = 17
|
DefaultItemHeight = 15
|
||||||
ReadOnly = True
|
ReadOnly = True
|
||||||
ScrollBars = ssAutoBoth
|
ScrollBars = ssAutoBoth
|
||||||
TabOrder = 0
|
TabOrder = 0
|
||||||
@ -28,8 +28,8 @@ object FunctionListFrame: TFunctionListFrame
|
|||||||
end
|
end
|
||||||
object editSearchList: TEdit
|
object editSearchList: TEdit
|
||||||
Left = 0
|
Left = 0
|
||||||
Height = 23
|
Height = 21
|
||||||
Top = 499
|
Top = 501
|
||||||
Width = 182
|
Width = 182
|
||||||
Align = alBottom
|
Align = alBottom
|
||||||
OnChange = editSearchListChange
|
OnChange = editSearchListChange
|
||||||
@ -37,7 +37,7 @@ object FunctionListFrame: TFunctionListFrame
|
|||||||
end
|
end
|
||||||
object FunctionListLabel: TLabel
|
object FunctionListLabel: TLabel
|
||||||
Left = 2
|
Left = 2
|
||||||
Height = 16
|
Height = 14
|
||||||
Top = 2
|
Top = 2
|
||||||
Width = 178
|
Width = 178
|
||||||
Align = alTop
|
Align = alTop
|
||||||
|
@ -474,20 +474,21 @@ procedure TFillThread.execute;
|
|||||||
if procs = nil then
|
if procs = nil then
|
||||||
exit;
|
exit;
|
||||||
for i := 0 to Procs.Count - 1 do
|
for i := 0 to Procs.Count - 1 do
|
||||||
if (Procs[i] is TciProcedureDeclaration) then
|
if (Procs[i] <> nil) and (Procs[i] is TciProcedureDeclaration) then
|
||||||
with Procs[i] as TciProcedureDeclaration do
|
with Procs[i] as TciProcedureDeclaration do
|
||||||
begin
|
if name <> nil then
|
||||||
tmpNode := FunctionList^.Items.AddChild(Node,name.ShortText);
|
|
||||||
tmpNode.Data := GetMem(SizeOf(TMethodInfo));
|
|
||||||
FillChar(PMethodInfo(tmpNode.Data)^,SizeOf(TMethodInfo),0);
|
|
||||||
with PMethodInfo(tmpNode.Data)^ do
|
|
||||||
begin
|
begin
|
||||||
MethodStr := strnew(Pchar(CleanDeclaration));
|
tmpNode := FunctionList^.Items.AddChild(Node,name.ShortText);
|
||||||
Filename:= strnew(pchar(path));
|
tmpNode.Data := GetMem(SizeOf(TMethodInfo));
|
||||||
BeginPos:= name.StartPos ;
|
FillChar(PMethodInfo(tmpNode.Data)^,SizeOf(TMethodInfo),0);
|
||||||
EndPos := name.StartPos + Length(TrimRight(name.RawText));
|
with PMethodInfo(tmpNode.Data)^ do
|
||||||
|
begin
|
||||||
|
MethodStr := strnew(Pchar(CleanDeclaration));
|
||||||
|
Filename:= strnew(pchar(path));
|
||||||
|
BeginPos:= name.StartPos ;
|
||||||
|
EndPos := name.StartPos + Length(TrimRight(name.RawText));
|
||||||
|
end;
|
||||||
end;
|
end;
|
||||||
end;
|
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure AddIncludes(ParentNode : TTreeNode; Include : TCodeInsight);
|
procedure AddIncludes(ParentNode : TTreeNode; Include : TCodeInsight);
|
||||||
|
@ -675,7 +675,7 @@ begin
|
|||||||
RegisterMethod('procedure Contrast(TargetBitmap : TMufasaBitmap; co : Extended);');
|
RegisterMethod('procedure Contrast(TargetBitmap : TMufasaBitmap; co : Extended);');
|
||||||
RegisterMethod('procedure Invert(TargetBitmap : TMufasaBitmap);');
|
RegisterMethod('procedure Invert(TargetBitmap : TMufasaBitmap);');
|
||||||
RegisterMethod('procedure Posterize(TargetBitmap : TMufasaBitmap; Po : integer);');
|
RegisterMethod('procedure Posterize(TargetBitmap : TMufasaBitmap; Po : integer);');
|
||||||
RegisterMethod('function Copy: TMufasaBitmap;');
|
RegisterMethod('function Copy(const xs,ys,xe,ye : integer) : TMufasaBitmap;');
|
||||||
RegisterMethod('function ToString : string;');
|
RegisterMethod('function ToString : string;');
|
||||||
RegisterMethod('function CreateTMask : TMask;');
|
RegisterMethod('function CreateTMask : TMask;');
|
||||||
RegisterMethod('constructor create');
|
RegisterMethod('constructor create');
|
||||||
@ -742,6 +742,12 @@ begin;
|
|||||||
CurrThread.Client.MBitmaps.FreeBMP(Self.Index);
|
CurrThread.Client.MBitmaps.FreeBMP(Self.Index);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
function TMufasaBitmapCopy(Self : TMufasaBitmap;const xs,ys,xe,ye : integer) : TMufasaBitmap;
|
||||||
|
begin
|
||||||
|
result := Self.Copy(xs,ys,xe,ye);
|
||||||
|
CurrThread.Client.MBitmaps.AddBMP(result);
|
||||||
|
end;
|
||||||
|
|
||||||
type
|
type
|
||||||
TRegExp = class(SynRegExpr.TRegExpr);
|
TRegExp = class(SynRegExpr.TRegExpr);
|
||||||
procedure MBmp_Index_r(self : TMufasaBitmap; var Index : integer);begin; Index := self.Index; end;
|
procedure MBmp_Index_r(self : TMufasaBitmap; var Index : integer);begin; Index := self.Index; end;
|
||||||
@ -819,7 +825,7 @@ begin;
|
|||||||
RegisterMethod(@TMufasaBitmap.Contrast,'CONTRAST');
|
RegisterMethod(@TMufasaBitmap.Contrast,'CONTRAST');
|
||||||
RegisterMethod(@TMufasaBitmap.Invert,'INVERT');
|
RegisterMethod(@TMufasaBitmap.Invert,'INVERT');
|
||||||
RegisterMethod(@TMufasaBitmap.Posterize,'POSTERIZE');
|
RegisterMethod(@TMufasaBitmap.Posterize,'POSTERIZE');
|
||||||
RegisterMethod(@TMufasaBitmap.Copy, 'COPY');
|
RegisterMethod(@TMufasaBitmapCopy, 'COPY');
|
||||||
RegisterMethod(@TMufasaBitmap.ToString,'TOSTRING');
|
RegisterMethod(@TMufasaBitmap.ToString,'TOSTRING');
|
||||||
RegisterMethod(@TMufasaBitmap.CreateTMask,'CREATETMASK');
|
RegisterMethod(@TMufasaBitmap.CreateTMask,'CREATETMASK');
|
||||||
RegisterPropertyHelper(@MBmp_TransColorSet_r,nil,'TRANSPARENTCOLORSET');
|
RegisterPropertyHelper(@MBmp_TransColorSet_r,nil,'TRANSPARENTCOLORSET');
|
||||||
|
@ -82,8 +82,8 @@ type
|
|||||||
procedure Invert;overload;
|
procedure Invert;overload;
|
||||||
procedure Posterize(TargetBitmap : TMufasaBitmap; Po : integer);overload;
|
procedure Posterize(TargetBitmap : TMufasaBitmap; Po : integer);overload;
|
||||||
procedure Posterize(Po : integer);overload;
|
procedure Posterize(Po : integer);overload;
|
||||||
function Copy: TMufasaBitmap;overload;
|
|
||||||
function Copy(const xs,ys,xe,ye : integer) : TMufasaBitmap; overload;
|
function Copy(const xs,ys,xe,ye : integer) : TMufasaBitmap; overload;
|
||||||
|
function Copy: TMufasaBitmap;overload;
|
||||||
function ToTBitmap: TBitmap;
|
function ToTBitmap: TBitmap;
|
||||||
function ToString : string;
|
function ToString : string;
|
||||||
procedure LoadFromTBitmap(bmp: TBitmap);
|
procedure LoadFromTBitmap(bmp: TBitmap);
|
||||||
|
Loading…
Reference in New Issue
Block a user