PixelCoverage

Description

[SemanticEnum]
enum Tinman.Terrain.Imaging.PixelCoverage

Pixel coverage semantics

Public / Constants

PixelIsArea

public constant PixelIsArea → (0:int32)

Each pixel represents a unit square in raster space.

    0   1   2   3   4   5
  +---+---+---+---+---+---+
0 |###|###|###|###|###|###|
  +---+---+---+---+---+---+
1 |###|###|###|###|###|###|
  +---+---+---+---+---+---+
2 |###|###|###|###|###|###|
  +---+---+---+---+---+---+
3 |###|###|###|###|###|###|
  +---+---+---+---+---+---+

### := Pixel area

The pixel coordinates (x,y) refer to the area (x,y)..(x+1,y+1) in raster space.
An image of size (w,h) is thus mapped to a raster space of size (w,h) (raster space size if given as edge length, not sample count).

PixelIsPoint

public constant PixelIsPoint → (1:int32)

Each image pixel represents an infinitesimal point in raster space.

  0   1   2   3   4   5   6
0 #---#---#---#---#---#---#
  |   |   |   |   |   |   |
1 #---#---#---#---#---#---#
  |   |   |   |   |   |   |
2 #---#---#---#---#---#---#
  |   |   |   |   |   |   |
3 #---#---#---#---#---#---#
  |   |   |   |   |   |   |
4 #---#---#---#---#---#---#

# := Pixel point

The pixel coordinates (x|y) refer to the point at (x|y) in raster space.
An image of size (w,h) is thus mapped to a raster space of size (w-1,h-1) (raster space size if given as edge length, not sample count).