pixie/common

Types

PixieError = object of ValueError
Raised if an operation fails.

Procs

proc fractional(v: float32): float32 {...}{.inline, raises: [], tags: [].}
Returns unsigned fraction part of the float.
-13.7868723 -> 0.7868723
proc lerp(a, b: uint8; t: float32): uint8 {...}{.inline, raises: [], tags: [].}
Linearly interpolate between a and b using t.
proc lerp(a, b: ColorRGBA; t: float32): ColorRGBA {...}{.inline, raises: [], tags: [].}
Linearly interpolate between a and b using t.
proc toPremultipliedAlpha(c: ColorRGBA): ColorRGBA {...}{.inline, raises: [],
    tags: [].}
Converts a color to premultiplied alpha from straight alpha.
proc toStraightAlpha(c: ColorRGBA): ColorRGBA {...}{.inline, raises: [], tags: [].}
Converts a color from premultiplied alpha to straight alpha.
proc toPremultipliedAlpha(c: Color): Color {...}{.inline, raises: [], tags: [].}
Converts a color to premultiplied alpha from straight alpha.
proc toStraightAlpha(c: Color): Color {...}{.inline, raises: [], tags: [].}
Converts a color from premultiplied alpha to straight alpha.

Funcs

func lerp(a, b: Color; v: float32): Color {...}{.inline, raises: [], tags: [].}
Linearly interpolate between a and b using t.