public SmokeEffect(int width, int height) { m_width = width; m_height = height; m_seeds = new int[16000]; for (int i = 0; i < m_seeds.length; ++i) { double d = Math.random(); m_seeds[i] = (int) (d * 255); } m_image = new QImage(width, height, QImage.Format.Format_ARGB32_Premultiplied); m_image.fill(0); m_data = new int[m_width * (m_height + 1)]; seedLastRow(); }