using XFEEDToolBox.Core.Rendering; namespace XFEEDToolBox.Rendering; // This derives coverage only from actual GZM ID transitions. It contains no // procedural regions, catalogue positions, or synthetic point stars. internal sealed record GalaxyZoneMip(int Width,int Height,byte[] Pixels); internal sealed record GalaxyZoneRaster(GalaxyOriginalZoneMap Map,byte[] Ids,GalaxyZoneMip[] BoundaryMips) { internal static GalaxyZoneRaster Create(GalaxyOriginalZoneMap map) { var ids=map.Values.ToArray();var width=map.Width;var height=map.Height; var boundary=new byte[ids.Length]; for(var y=0;y0&&ids[index-1]!=id||x+10&&ids[index-width]!=id||y+1 levels=[new(width,height,boundary)]; while(width>1||height>1) { var nextWidth=Math.Max(1,width/2);var nextHeight=Math.Max(1,height/2);var next=new byte[nextWidth*nextHeight]; for(var y=0;y