1. Yuya Nishihara
  2. thg-work

Commits

Yuya Nishihara  committed 95038a3 Obsolete Draft

graph: remove fully-overlapped lines prior to painting

Because antialiasing is enabled, overlapped lines can be alpha-blended and
be slightly bolder than single line.

This can solve most of the problem, but still, lines can partially overlap
near contact points:

| |
|/
| <-- upper half will be doubled even if overlapped edges are removed

  • Participants
  • Parent commits e5bf497
  • Successor commits 26ea615
  • Branches default

Comments (0)

Files changed (1)

File tortoisehg/hgqt/repomodel.py

View file
  • Ignore whitespace
             ymid = (y1 + y4)/2
             y3 = y1 + 3 * (y4 - y1)/4
 
-            lines = sorted(lines, key=lineimportance)
+            # even after overlapped lines are removed, it's still necessary to
+            # sort by importance.  lines can partially overlap near contact.
+            lines = sorted(dict(sorted(lines, key=lineimportance)).iteritems(),
+                           key=lineimportance)
 
             for (start, end), e in lines:
                 active = isactive(e)