Hi all,
I have to do that to have my rendering correct :
Qt Code:
  1. // Build the circle.
  2. QImage CircleImage( size(), QImage::Format_ARGB32 );
  3. CircleImage.fill( Qt::transparent );
  4. QPainter CirclePainter( &CircleImage );
  5. CirclePainter.setRenderHint( QPainter::Antialiasing, true );
  6. CirclePainter.setBrush( QBrush( ConicalGradient ) );
  7. CirclePainter.setPen( Qt::black );
  8. CirclePainter.drawEllipse( rect().adjusted( 1, 1, -1, -1 ) );
  9.  
  10. // Build the alpha channel.
  11. QImage AlphaChannelImage( size(), QImage::Format_RGB32 );
  12. AlphaChannelImage.fill( Qt::transparent );
  13. QPainter AlphaChannelPainter( &AlphaChannelImage );
  14. AlphaChannelPainter.setRenderHint( QPainter::Antialiasing, true );
  15. AlphaChannelPainter.setBrush( QBrush( AlphaGradient ) );
  16. AlphaChannelPainter.setPen( Qt::white );
  17. AlphaChannelPainter.drawEllipse( rect().adjusted( 1, 1, -1, -1 ) );
  18.  
  19. // Draw the circle.
  20. for( int x = 0; x < CircleImage.width(); ++x )
  21. {
  22. for( int y = 0; y < CircleImage.height(); ++y )
  23. {
  24. const QColor Color = CircleImage.pixel( x, y );
  25. const QColor Alpha = AlphaChannelImage.pixel( x, y );
  26. p.setPen( QColor( Color.red(), Color.green(), Color.blue(), Alpha.red() ) );
  27. p.drawPoint( x, y );
  28. }
  29. }
To copy to clipboard, switch view to plain text mode 

Is it possible to factor that to only use p.drawImage ?
Thanks for the help