Ahí pude hacer andar el componente que me pasaron (SimpleGraph) pero no me lee los svg que tengo....
Alguien podría explicarme esta linea de código...
Código Delphi
[-]
const
StreamSignature: DWORD =
(Ord('S') shl 24) or (Ord('G') shl 16) or (Ord('.') shl 8) or Ord('0');
Esta constante se compara cuando cargo el svg en el procedimiento loadfromfile...
Código Delphi
[-]
procedure TSimpleGraph.LoadFromFile(const Filename: String);
var
Stream: TFileStream;
begin
Stream := TFileStream.Create(Filename, fmOpenRead or fmShareDenyWrite);
try
LoadFromStream(Stream);
finally
Stream.Free;
end;
end;
procedure TSimpleGraph.LoadFromStream(Stream: TStream);
var
Signature: DWORD;
begin
Stream.Read(Signature, SizeOf(Signature));
if Signature <> StreamSignature then
raise EGraphStreamError.Create(SStreamContentError);
BeginUpdate;
try
Clear;
ReadObjects(Stream);
SaveModified := 2;
finally
EndUpdate;
end;
end;
Alguna idea de lo que esta haciendo?