[Qt-interest] Can I draw Qt objects directly to Win32 DC (Device Context)?
Thiago Macieira
thiago at kde.org
Fri May 28 08:35:42 CEST 2010
Em Sexta-feira 28. Maio 2010, às 07.36.15, Long Cheng escreveu:
> I can draw Qt objects to an QImage and then draw the image to HDC or
> CDC. This may hurt our application's performance. It would be great if
> I can draw Qt objects directly to Win32 HDC or MFC CDC. I expect that
> there is a class, say QWin32Image for clear, then I can use it in this
> way:
>
> QWin32Image image(hdc, 100, 100, Format_ARGB32_Premultiplied);
> QPainter painter(&image);
> painter.drawText(....);
>
> Is it possible for my thought? Or is there a better way to do that?
There's no such class.
We wrote once a GDI graphics system for Windows. Even though it was fast, the
GDI system was incredibly limited: it fell-back to the raster engine far too
often to be useful in real applications. I don't think it was productised
because of that.
So, on Windows, there's no "native" graphics system. Qt defaults to raster.
--
Thiago Macieira - thiago (AT) macieira.info - thiago (AT) kde.org
Senior Product Manager - Nokia, Qt Development Frameworks
PGP/GPG: 0x6EF45358; fingerprint:
E067 918B B660 DBD1 105C 966C 33F5 F005 6EF4 5358
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 190 bytes
Desc: This is a digitally signed message part.
Url : http://lists.qt-project.org/pipermail/qt-interest-old/attachments/20100528/1f8709fd/attachment.bin
More information about the Qt-interest-old
mailing list