StackFaces¶
Namespace Nfty.Model in assembly Nfty.Model.
The two face pictures of a risen stack: what the front and the back of each column show, each taken from the layer that OWNS that face by the union rule, plus the seam where a column's wall switches from one owner's color to the other's.
Remarks¶
Owns both images. Non-solid pixels are clear in both. For an all-paper stack both faces equal the art and every seam is 0.
Properties¶
Back¶
What the back of each column shows.
Front¶
What the front of each column shows.
Height¶
Height in pixels.
Width¶
Width in pixels.
Methods¶
BackColored(int, int)¶
How many voxels, counted from the column's back end, take the back color; the rest take the front color. 0 on a non-solid pixel.
Parameters
x(int) - Column.y(int) - Row, 0 at the top.
Returns. The voxel count.
Clone()¶
An independent copy; the caller owns it.
Returns. The copy.
CopyRegionFrom(StackFaces, Rectangle)¶
Copies a rectangle of another set of faces over this one, in place (the same size).
Parameters
source(StackFaces) - The faces to read.area(Rectangle) - The pixels to copy; clipped to the picture.
Exceptions
ArgumentException- The faces are another size.
Dispose()¶
Disposes the front and back pictures.
Uniform(Image<Rgba32>)¶
The faces of a single picture: both are the art, and the seam is 0.
Parameters
art(Image<Rgba32>) - The picture; cloned, not taken.
Returns. Faces the caller owns.