Hola,
desbajo de la seccion "implementation"
cree estas funciones
Código Delphi
[-]
constructor Tfuente.Create;
begin
fColorFondo:=clWhite;
fFuente:=TFont.Create;
end;
procedure TFuente.Assign(const aSource: TFuente);
begin
fFuente.Assign(asource.Fuente);
fColorFondo:=aSource.ColorFondo;
end;
destructor Tfuente.Destroy;
begin
fFuente.Free;
inherited;
end;
procedure TFuente.LoadFromStream(const aSource: TStream);
begin
fColorFondo:=ReadInt(aSource);
fFuente.Name:=ReadStr(aSource);
fFuente.Size:=ReadInt(aSource);
fFuente.Color:=ReadInt(aSource);
if ReadBool(aSource) then
fFuente.Style:=fFuente.Style+[fsBold]
else
fFuente.Style:=fFuente.Style-[fsBold];
if ReadBool(aSource) then
fFuente.Style:=fFuente.Style+[fsItalic]
else
fFuente.Style:=fFuente.Style-[fsItalic];
if ReadBool(aSource) then
fFuente.Style:=fFuente.Style+[fsUnderline]
else
fFuente.Style:=fFuente.Style-[fsUnderline];
end;
procedure TFuente.SaveToStream(const aDest: Tstream);
begin
WriteInt(aDest,fColorFondo);
WriteStr(aDest,fFuente.Name);
WriteInt(aDest,fFuente.Size);
WriteInt(aDest,fFuente.Color);
WriteBool(aDest,fsBold in fFuente.Style);
WriteBool(aDest,fsItalic in fFuente.Style);
WriteBool(aDest,fsUnderline in fFuente.Style);
end;
Lo que creo que esta haciendo es crear el constructor y las funciones que defini antes.