Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. Composition mode help...
Forum Updated to NodeBB v4.3 + New Features

Composition mode help...

Scheduled Pinned Locked Moved General and Desktop
2 Posts 2 Posters 1.2k Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • S Offline
    S Offline
    Spaced Cowboy
    wrote on last edited by
    #1

    I'm writing a driver for a graphics system so it can be ported to X, and QT seemed to help out in a lot of ways, but I can't get my head around how to set the composition mode to get the various effects that the old system could do.

    The old system can do:

    Replace - All pixels from source replace corresponding pixels in destination - this I think is QPainter::CompositionMode_Source

    Transparent - Only non-black (ie: 0) pixels from source will replace corresponding pixels in destination. I can't find a corresponding mode for this.

    XOR - standard XOR, I can do this with QPainter::RasterOp_SourceXorDestination

    Reverse transparent - Only the black pixels (ie: 0) from the source will replace the corresponding pixels in destination. The pixels will be coloured as the current foreground colour.

    I can't really see how to do (2) and (4) without creating QImages to get masks and playing with alpha values and doing multiple blits. The old system doesn't have alpha, so all the colours it draws effectively have alpha=1. Any help gratefully received :)

    Simon

    1 Reply Last reply
    0
    • SGaistS Offline
      SGaistS Offline
      SGaist
      Lifetime Qt Champion
      wrote on last edited by
      #2

      Hi,

      Since you are getting pretty low level, I think you should bring this question to the interest mailing list. You'll find Qt's developers/maintainers there (this forum is more user oriented)

      Interested in AI ? www.idiap.ch
      Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

      1 Reply Last reply
      0

      • Login

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • Users
      • Groups
      • Search
      • Get Qt Extensions
      • Unsolved