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. Draw lines in QGraphicsView with disabled alpha blending between objects on the same z-index

Draw lines in QGraphicsView with disabled alpha blending between objects on the same z-index

Scheduled Pinned Locked Moved General and Desktop
qgraphicsviewqgraphicssceneqgraphicslineit
1 Posts 1 Posters 838 Views
  • 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.
  • M Offline
    M Offline
    martonmiklos
    wrote on 21 Jun 2015, 07:12 last edited by martonmiklos
    #1

    I am working on a 2D graphical application which would display a PCB file read from XML in a QGraphicsView.

    The PCB traces are represented as lines (segments in the XML file). I can read them one-by-one from the XML and create an object derived from the QGraphicsLineItem for each of them. The segments has their RGBA color coded to the XML, including their Z-index.

    My problem is that the overlapping portions of the segments got less alpha blending:
    https://dl.dropboxusercontent.com/u/4295670/e2b_alphablending.png

    The alpha blending between segments on the different layers (between red and blue) is good feature, just junctions are problematic on the same layer (blue),

    This is how it should look like:
    https://dl.dropboxusercontent.com/u/4295670/e2b_alphablending_eagle.png

    As a backup plan I could use drawPolygon to get rid of the overlaps, but it would require to traverse the segments and generate polygons from the overlapping segments.
    This would require much more effort, and if possible I would not like to go down that way.

    1 Reply Last reply
    0

    1/1

    21 Jun 2015, 07:12

    • Login

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