|
@@ -44,7 +44,7 @@ internal class Document : IChangeable, IReadOnlyDocument, IDisposable
|
|
/// <remarks>So yeah, welcome folks to the multithreaded world, where possibilities are endless! (and chances of objects getting
|
|
/// <remarks>So yeah, welcome folks to the multithreaded world, where possibilities are endless! (and chances of objects getting
|
|
/// edited, in between of processing you want to make exist). You might encounter ObjectDisposedException and other mighty creatures here if
|
|
/// edited, in between of processing you want to make exist). You might encounter ObjectDisposedException and other mighty creatures here if
|
|
/// you are lucky enough. Have fun!</remarks>
|
|
/// you are lucky enough. Have fun!</remarks>
|
|
- public Surface? GetLayerImage(Guid layerGuid)
|
|
|
|
|
|
+ public Surface? GetLayerRasterizedImage(Guid layerGuid)
|
|
{
|
|
{
|
|
var layer = (IReadOnlyLayer?)FindMember(layerGuid);
|
|
var layer = (IReadOnlyLayer?)FindMember(layerGuid);
|
|
|
|
|
|
@@ -52,7 +52,7 @@ internal class Document : IChangeable, IReadOnlyDocument, IDisposable
|
|
throw new ArgumentException(@"The given guid does not belong to a layer.", nameof(layerGuid));
|
|
throw new ArgumentException(@"The given guid does not belong to a layer.", nameof(layerGuid));
|
|
|
|
|
|
|
|
|
|
- RectI? tightBounds = layer.LayerImage.FindChunkAlignedMostUpToDateBounds();
|
|
|
|
|
|
+ RectI? tightBounds = layer.GetTightBounds();
|
|
|
|
|
|
if (tightBounds is null)
|
|
if (tightBounds is null)
|
|
return null;
|
|
return null;
|
|
@@ -61,7 +61,7 @@ internal class Document : IChangeable, IReadOnlyDocument, IDisposable
|
|
|
|
|
|
Surface surface = new Surface(tightBounds.Value.Size);
|
|
Surface surface = new Surface(tightBounds.Value.Size);
|
|
|
|
|
|
- layer.LayerImage.DrawMostUpToDateRegionOn(
|
|
|
|
|
|
+ layer.Rasterize().DrawMostUpToDateRegionOn(
|
|
tightBounds.Value,
|
|
tightBounds.Value,
|
|
ChunkResolution.Full,
|
|
ChunkResolution.Full,
|
|
surface.DrawingSurface, VecI.Zero);
|
|
surface.DrawingSurface, VecI.Zero);
|
|
@@ -77,7 +77,7 @@ internal class Document : IChangeable, IReadOnlyDocument, IDisposable
|
|
throw new ArgumentException(@"The given guid does not belong to a layer.", nameof(layerGuid));
|
|
throw new ArgumentException(@"The given guid does not belong to a layer.", nameof(layerGuid));
|
|
|
|
|
|
|
|
|
|
- return layer.LayerImage.FindChunkAlignedMostUpToDateBounds();
|
|
|
|
|
|
+ return layer.GetTightBounds();
|
|
}
|
|
}
|
|
|
|
|
|
public void ForEveryReadonlyMember(Action<IReadOnlyStructureMember> action) => ForEveryReadonlyMember(StructureRoot, action);
|
|
public void ForEveryReadonlyMember(Action<IReadOnlyStructureMember> action) => ForEveryReadonlyMember(StructureRoot, action);
|