-
Notifications
You must be signed in to change notification settings - Fork 39
Added single renderer function to draw Rectangles #95
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
Conversation
|
@boronhub are you on linux or mac? |
|
linux |
|
@KarthikRIyer how can i fix the build errors? |
|
@boronhub looking at the error: EDIT: probably something to do with the recent merge to update the AGG version... see #93, tests are failing after that push. |
|
Yeah, it's passing. |
| agg::render_scanlines(m_ras, m_sl_p8, ren_aa); | ||
| } | ||
|
|
||
| void draw_solid_rect_with_border(const float *x, const float *y, float thickness, float r_fill, float g_fill, float b_fill, float a_fill, float r_stroke, float g_stroke, float b_stroke, float a_stroke){ |
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.
You're missing a const void *object parameter here, which is why the build is failing. Your header declared that such a function exists, but the linker couldn't find it because this parameter is missing.
|
@KarthikRIyer @karwa the tests are failing because of an |
|
@karwa what's triggering this? |
|
hard to say - you'll have to debug it. You might try doing the stroke after the fill, though. |
|
That PR won't fix the issue - it only addresses a bug where some tests were not being run on Linux. These are different tests that are failing, and they are failing for good reason: the output has demonstrably regressed. The legend's default fill colour is not transparent - it is actually white with 70% alpha. If you draw the border first, then fill the same rectangle on top of it, you're going to be drawing over the inner half of the border. Instead, you should fill the rectangle and draw the border on top of it. |
|
@karwa I made that change, but the tests are still failing. |
|
@karwa ping |
|
@boronhub sorry for the delay. I've been occupied elsewhere and will probably be occupied this weekend. I've extended your deadline by 2 days just in case I'm unable to get to this. |
|
I just pulled your changes on my system and ran swift test. All tests seem to pass except the line chart crossBothAxes and it seems to be because the X range of the plot drawn is 0 to 5 and the reference is -5 to 5. |
|
Thanks @KarthikRIyer! How do I fix the inconsistencies? |
Update AGG in personal fork
|
@KarthikRIyer @karwa merging the latest commits made the tests pass ! |
|
Look good @boronhub. Thanks for your work and patience. Appreciated! |

PR for #75 as part of GCI.
Added
draw_solid_rect_with_borderto AGG renderer so that callingdrawSolidRectWithBorderdoes not require overlaying two rectangles made withdraw_rectanddraw_solid_rect.