Skip to content

Conversation

@boronhub
Copy link
Contributor

@boronhub boronhub commented Jan 15, 2020

PR for #75 as part of GCI.

Added draw_solid_rect_with_border to AGG renderer so that calling drawSolidRectWithBorderdoes not require overlaying two rectangles made with draw_rect and draw_solid_rect .

@KarthikRIyer
Copy link
Owner

@boronhub are you on linux or mac?

@boronhub
Copy link
Contributor Author

linux

@boronhub
Copy link
Contributor Author

@KarthikRIyer how can i fix the build errors?

@WilliamHYZhang
Copy link
Contributor

WilliamHYZhang commented Jan 15, 2020

@boronhub looking at the error: ld: symbol(s) not found for architecture x86_64, the build is probably experiencing an error compiling some code. I don't know about the specifics, though. is swift build and swift test passing on your local system?

EDIT: probably something to do with the recent merge to update the AGG version... see #93, tests are failing after that push.

@boronhub
Copy link
Contributor Author

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){
Copy link
Contributor

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.

@boronhub
Copy link
Contributor Author

boronhub commented Jan 16, 2020

@KarthikRIyer @karwa the tests are failing because of an XCTAssertTrue failed - 🔥 Image mismatch, does that have to do with the recent AGG update ? Even one of my other PRs #96 is failing, even though it is just the addition of one line to the README.

@boronhub boronhub requested a review from KarthikRIyer January 16, 2020 18:12
@karwa
Copy link
Contributor

karwa commented Jan 16, 2020

No, the tests are failing here because the output has changed. The thickness of the legend border seems different.

image

@boronhub
Copy link
Contributor Author

@karwa what's triggering this?

@karwa
Copy link
Contributor

karwa commented Jan 16, 2020

hard to say - you'll have to debug it. You might try doing the stroke after the fill, though.

@WilliamHYZhang
Copy link
Contributor

@boronhub once @karwa's PR gets merged try updating your fork against upstream after you fix the local errors.

@karwa
Copy link
Contributor

karwa commented Jan 16, 2020

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.

@boronhub
Copy link
Contributor Author

@karwa I made that change, but the tests are still failing.

@boronhub boronhub requested review from KarthikRIyer and removed request for KarthikRIyer January 17, 2020 14:49
@boronhub
Copy link
Contributor Author

@karwa ping

@KarthikRIyer
Copy link
Owner

@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.

@KarthikRIyer
Copy link
Owner

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.

@boronhub
Copy link
Contributor Author

Thanks @KarthikRIyer! How do I fix the inconsistencies?

Update AGG in personal fork
@boronhub
Copy link
Contributor Author

@KarthikRIyer @karwa merging the latest commits made the tests pass !

@KarthikRIyer
Copy link
Owner

Look good @boronhub. Thanks for your work and patience. Appreciated!

@KarthikRIyer KarthikRIyer merged commit f5c22e6 into KarthikRIyer:master Jan 19, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants