8public static class TileBounds
19 internal static Rectangle GetTransformedTileCandidateRange(
20 Gondwana.Scenes.SceneLayer layer,
24 if (!include || layer.TransformedTiles.Count == 0)
27 int width = layer.TileWidth;
28 int height = layer.TileHeight;
29 int spill = (Math.Abs(width - height) + 1) / 2;
35 query.Inflate(0, spill);
37 query.Inflate(spill, 0);
47 public static Rectangle ApplyTileGeometry(Rectangle cell, Tile tile,
bool include)
49 if (!include)
return cell;
50 return tile is Gondwana.Scenes.SceneLayerTile fixedTile
51 ? ApplyOverhang(TileTransformGeometry.GetVisualBounds(cell,
Spacing.None, fixedTile.Transform), tile.Overhang,
true)
52 : ApplyOverhang(cell, tile.Overhang, true);
64 public static Rectangle ApplyOverhang(Rectangle baseRect,
Spacing oh,
bool include)
66 if (!include || oh.IsEmpty)
70 baseRect.Left - oh.Left,
71 baseRect.Top - oh.Top,
72 baseRect.Right + oh.Right,
73 baseRect.Bottom + oh.Bottom
@ Rectangle
Particles are spawned uniformly within a rectangular area. This is the default distribution.
record struct Spacing([property:JsonProperty("left")] int Left, [property:JsonProperty("top")] int Top, [property:JsonProperty("right")] int Right, [property:JsonProperty("bottom")] int Bottom)
Represents dimensions in pixels when spacing Tilesheets.