Puregrain.Internal.Cells
- Package
- purescript-puregrain
- Repository
- roman-mkh/puregrain
CellPalette's inside, and what is measured along it, for
Puregrain.Cells and its tests. Internal: may change without notice.
Puregrain.Cells re-exports the type, opaquely, with its
constructors.
#CellPalette Source
newtype CellPaletteThe colors one cell may use: one color, or two that dithering mixes.
Build it with singleColor or colorPair. The order of two colors
doesn't change which cells choose them, nor what nearestInCell
gives; with orderedInCell it sets the pattern's direction.
Constructors
#cellTone Source
cellTone :: CellPalette -> RGB -> RGBA pixel's tone in its cell: how far along the line from the first color to the second its nearest point lies, from 0 to 1, times 255, the same in every channel (the cell mixes the two colors as a whole); 0 for a single color. The direction doesn't matter to a method by tone: its table is symmetric, so a share and its complement pick the same row.
CellPalette: the cell's colors, in light when the dithering has a curve.RGB: the original pixel, in light likewise.
#raisedInCell Source
raisedInCell :: Number -> CellPalette -> RGB -> RGBnearestInCell's decision with its cut raised: the second color where
the pixel's share of the way to it is above one half plus the raise,
else the first; a single color always.
Number: the raise, a fraction of the way between the two colors.CellPalette: the cell's colors.RGB: the corrected value.
- Modules
- Puregrain
- Puregrain.
Cells - Puregrain.
Dither - Puregrain.
Gamma - Puregrain.
Internal. Cells - Puregrain.
Internal. Exact - Puregrain.
Internal. Fifo - Puregrain.
Internal. Gamma - Puregrain.
Internal. Image - Puregrain.
Internal. Kernel - Puregrain.
Internal. Noise - Puregrain.
Internal. Ostromoukhov - Puregrain.
Internal. Params - Puregrain.
Internal. Quantize - Puregrain.
Internal. Row - Puregrain.
Internal. SelfCheck - Puregrain.
Internal. State - Puregrain.
Internal. Step - Puregrain.
Internal. Util - Puregrain.
Internal. WeightsByTone - Puregrain.
Internal. ZhouFang - Puregrain.
Kernel - Puregrain.
Machine. C64 - Puregrain.
Machine. ZxSpectrum - Puregrain.
Ordered - Puregrain.
Palette - Puregrain.
Palette. Presets - Puregrain.
Pixel - Puregrain.
Quantize - Puregrain.
SelfCheck