New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Refactor PaintGraphCell #8897
Refactor PaintGraphCell #8897
Conversation
Codecov Report
@@ Coverage Diff @@
## master #8897 +/- ##
==========================================
+ Coverage 56.06% 56.07% +0.01%
==========================================
Files 922 922
Lines 65843 65842 -1
Branches 12073 12071 -2
==========================================
+ Hits 36912 36924 +12
+ Misses 25918 25914 -4
+ Partials 3013 3004 -9
Flags with carried forward coverage won't be shown. Click here to find out more. |
Seems to work 👍 |
@drewnoakes, could you review, please? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good.
|
||
int top = g.RenderingOrigin.Y; | ||
Rectangle laneRect = new(0, top, width, rowHeight); | ||
Region newClip = new(laneRect); | ||
newClip.Intersect(oldClip); | ||
g.Clip = newClip; | ||
g.Clear(Color.Transparent); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why do we need to use Clear
vs. FillRegion
? The latter would avoid needing to set/restore the Clip
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Clip
is needed anyway in order to create the impression of drawn through graph lines by not letting end the lines at the row borders.
Proposed changes
SmoothingMode
true
if
nestingvar
Screenshots
N/A
Test methodology
Test environment(s)
✒️ I contribute this code under The Developer Certificate of Origin.