Source   Edit


BlendMode = enum
  NormalBlend, DarkenBlend, MultiplyBlend, ColorBurnBlend, LightenBlend,
  ScreenBlend, ColorDodgeBlend, OverlayBlend, SoftLightBlend, HardLightBlend,
  DifferenceBlend, ExclusionBlend, HueBlend, SaturationBlend, ColorBlend,
  LuminosityBlend, MaskBlend, ## Special blend mode that is used for masking
  OverwriteBlend,           ## Special blend mode that just copies pixels
  SubtractMaskBlend,        ## Inverse mask
  Source   Edit
Image = ref object
  width*, height*: int
  data*: seq[ColorRGBX]
Image object that holds bitmap data in premultiplied alpha RGBA format.   Source   Edit
ImageDimensions = object
  width*, height*: int
  Source   Edit
PixieError = object of CatchableError
Raised if an operation fails.   Source   Edit


proc `*`(color: ColorRGBX; opacity: float32): ColorRGBX {....raises: [], tags: [].}
  Source   Edit
proc `*`(rgbx: ColorRGBX; opacity: uint8): ColorRGBX {.inline, ...raises: [],
    tags: [].}
  Source   Edit
proc copy(image: Image): Image {....raises: [], tags: [].}
Copies the image data into a new image.   Source   Edit
proc mix(a, b: ColorRGBX; t: float32): ColorRGBX {.inline, ...raises: [], tags: [].}
Linearly interpolate between a and b using t.   Source   Edit
proc newImage(width, height: int): Image {....raises: [PixieError], tags: [].}
Creates a new image with the parameter dimensions.   Source   Edit
proc snapToPixels(rect: Rect): Rect {....raises: [], tags: [].}
  Source   Edit


template dataIndex(image: Image; x, y: int): int
  Source   Edit