求TControl类中UpdateAnchorRules方法的解释
procedure TControl.UpdateAnchorRules;
var
Anchors: TAnchors;
begin
if not FAnchorMove and not (csLoading in ComponentState) then
begin
Anchors := FAnchors;
if Anchors = [akLeft, akTop] then
begin
FOriginalParentSize.X := 0;
FOriginalParentSize.Y := 0;
Exit;
end;
if akRight in Anchors then
if akLeft in Anchors then
FAnchorRules.X := Width else
FAnchorRules.X := Left
else
FAnchorRules.X := Left + Width div 2;
if akBottom in Anchors then
if akTop in Anchors then
FAnchorRules.Y := Height else
FAnchorRules.Y := Top
else
FAnchorRules.Y := Top + Height div 2;
if Parent <> nil then
if csReading in Parent.ComponentState then
begin
if not (csDesigning in ComponentState) then
FOriginalParentSize := Parent.FDesignSize
end
else if Parent.HandleAllocated then
FOriginalParentSize := Parent.ClientRect.BottomRight
else
begin
FOriginalParentSize.X := Parent.Width;
FOriginalParentSize.Y := Parent.Height;
end;
end;
end;
没看懂有什么作用,求解释