Ejemplo n.º 1
0
 void Image::resize(unsigned int width, unsigned int height)
 {
     if (width == m_width && height == m_height)
         return;
     
     if (m_pixels) {
         delete [] m_pixels;
         m_pixels = NULL;
     }
     
     m_width = width;
     m_height = height;
     m_pixels = new Pixel[pixelCount()];
     memset(m_pixels, 0, pixelCount() * sizeof(m_pixels[0]));
 }
Ejemplo n.º 2
0
void Layer::renderComposite() {
  if (orientation == ORIENTATION_LINEAR) {
    renderCompositeLinear();
  } else {
    renderCompositeFloor();
  }

  effectStep(effect)(meta, pixelCount());
}
Ejemplo n.º 3
0
void Layer::renderPreview(CRGB * preview) {
  CRGB nxt;
  effectPixel(effect)(meta, &nxt, 0, pixelCount());
  *preview = blend(*preview, nxt, 127);
  effectStep(effect)(meta, pixelCount());
}
Ejemplo n.º 4
0
void Layer::setTransition(byte id) {
  transititionIdx = id;
  transitionInit(transititionIdx)(tmeta, pixelCount());
}
Ejemplo n.º 5
0
void Layer::initEffect() {
  orientation     = getEffectOrientation(effect);
  if (orientation == ORIENTATION_NIL)
    orientation = static_cast<Orientation>(random8(NUM_ORIENTATIONS));
  effectInit(effect)(meta, pixelCount());
}