1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34
|
function TControlRaytracer.WriteToStream:TMemoryStream;
var
RayTMemoryStream : TMemoryStream;
begin
RayTMemoryStream := TMemoryStream.Create;
try
RayTMemoryStream.Write(Raytracer,SizeOf(Raytracer));
RayTMemoryStream.Write(Raytracer.login,SizeOf(Raytracer.login));
RayTMemoryStream.Write(Raytracer.Height,SizeOf(Raytracer.Height));
RayTMemoryStream.Write(Raytracer.Width,SizeOf(Raytracer.Width));
RayTMemoryStream.Write(Raytracer.FileName,SizeOf(Raytracer.FileName));
RayTMemoryStream.Write(Raytracer.Extension,SizeOf(Raytracer.Extension));
RayTMemoryStream.Write(Raytracer.CameraView,SizeOf(Raytracer.CameraView));
RayTMemoryStream.Write(Raytracer.RenderMode,SizeOf(Raytracer.RenderMode));
RayTMemoryStream.Write(Raytracer.ProjectionMode,SizeOf(Raytracer.ProjectionMode));
RayTMemoryStream.Write(Raytracer.DateCreation,SizeOf(Raytracer.DateCreation));
RayTMemoryStream.Write(Raytracer.HStart,SizeOf(Raytracer.HStart));
RayTMemoryStream.Write(Raytracer.HEnd,SizeOf(Raytracer.HEnd));
RayTMemoryStream.Write(Raytracer.FmlFiles,Raytracer.FmlSize);
RayTMemoryStream.Write(Raytracer.EnvFiles,Raytracer.EnvSize);
StreamSize := RayTMemoryStream.Size;
Result := RayTMemoryStream;
finally
FreeAndNil(RayTMemoryStream);
end;
end; |
Partager