Trolltech Home | Qt-interest Home | Recent Threads | All Threads | Author | Date
All threads index page 1

Qt-interest Archive, April 2007
qpainterpath and softness?


Message 1 in thread

Hi,

I need to draw a filled qpainterpath, but the border of the path need to 
be soft ... I need to have the interior edge with a plain color 
(alpha=255) and the exterior edge with alpha=0. How Can I do that ? it 
seems that the good idee should to use QPen with a QGradient but you 
cannot set a QGradient for the color of the QPen .. Is there any way to 
do that ?

Yannick

PNG image

PNG image


Message 2 in thread

On Sunday 01 April 2007 15:13, yannick kohn wrote:
> Hi,
>
> I need to draw a filled qpainterpath, but the border of the path need to
> be soft ... I need to have the interior edge with a plain color
> (alpha=255) and the exterior edge with alpha=0. How Can I do that ? it
> seems that the good idee should to use QPen with a QGradient but you
> cannot set a QGradient for the color of the QPen .. Is there any way to
> do that ?

I learned recently that, actually, yes you can;
http://daniel.molkentin.de/blog/index.php?/archives/77-Ellipsis-made-easy.html

Not sure if that will help you.

-- 
 [ signature omitted ] 

Attachment: pgp25Wa4gB3pU.pgp
Description: PGP signature


Message 3 in thread

Hi,

thanks for your link but it seems that it don't works for me ...the 
gradiant works related to the position of the path in the widget !

Thomas Zander a écrit :
> On Sunday 01 April 2007 15:13, yannick kohn wrote:
>   
>> Hi,
>>
>> I need to draw a filled qpainterpath, but the border of the path need to
>> be soft ... I need to have the interior edge with a plain color
>> (alpha=255) and the exterior edge with alpha=0. How Can I do that ? it
>> seems that the good idee should to use QPen with a QGradient but you
>> cannot set a QGradient for the color of the QPen .. Is there any way to
>> do that ?
>>     
>
> I learned recently that, actually, yes you can;
> http://daniel.molkentin.de/blog/index.php?/archives/77-Ellipsis-made-easy.html
>
> Not sure if that will help you.
>
>