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

Qt-interest Archive, December 2006
Anti-Aliasing Objects Relative to Each Other


Message 1 in thread

I want to create a series of QObjects that will border on each other. 
The border between these objects is jagged and not smooth - so I would 
like to use anti-aliasing to smooth the edges between the objects.  For 
example, a grid of pixmap objects that form a larger picture but the 
edges of each individual pixmap needs to be anti-aliased relative to its 
adjacent pixmap.  Can I do this with Qt?  I have tried setting the 
render hint appropriately, but it only anti-aliases the objects relative 
to themselves, not adjacent objects.  Any ideas would be appreciated. 
Thanks,
Chris

--
 [ signature omitted ] 

Message 2 in thread

Am Mittwoch, 13. Dezember 2006 21:20 schrieb Chris Portka:
> I want to create a series of QObjects that will border on each other.
> The border between these objects is jagged and not smooth - so I would
> like to use anti-aliasing to smooth the edges between the objects.  For
> example, a grid of pixmap objects that form a larger picture but the
> edges of each individual pixmap needs to be anti-aliased relative to its
> adjacent pixmap.  Can I do this with Qt?  I have tried setting the
> render hint appropriately, but it only anti-aliases the objects relative
> to themselves, not adjacent objects.  Any ideas would be appreciated.
First of all, you probably use QWidgets and not QObjects ;-) Second I'm afraid 
you can't do what you want this way. When using Qt4 you can try to make the 
widgets overlapping and in your paintEvent-method you do not paint the edges 
with 100% of alpha, e.g. by filling a rect (1,1)(width()-3,height-3) while 
having anti-aliasing enabled.

toby

Attachment:

Attachment: pgpSb6JdVYnHo.pgp
Description: PGP signature