Skip to content

Conversation

@ctessum
Copy link
Contributor

@ctessum ctessum commented Mar 14, 2015

There is an issue with the draw.Canvas.Crop() function. I've added a test to document it. The test does cropping two different ways, the rectangles of which should be the same, and produces two output images that should also be the same. In the current version the two methods yield different results. The change that I made fixes this bug.

@kortschak
Copy link
Member

kortschak commented Mar 14, 2015 via email

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Imported and not used.

@eaburns
Copy link
Member

eaburns commented Mar 14, 2015

Chris, thanks for this and for your other changes too. Could you please explain this bug in a bit more detail (in fact, could you please add the explanation to the commit message)? I don't quite understand what's happening here, but I also don't understand why I started the canvas at -w/2, -h/2 either :)

@kortschak
Copy link
Member

kortschak commented Mar 14, 2015 via email

@eaburns
Copy link
Member

eaburns commented Mar 14, 2015

LGTM, once Dan's suggestions are in.

@ctessum
Copy link
Contributor Author

ctessum commented Mar 14, 2015

I fixed the test to not require manual inspection

@kortschak
Copy link
Member

kortschak commented Mar 14, 2015 via email

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Change the format string to "unexpected result: %+v != %+v".

@kortschak
Copy link
Member

LGTM after minor nits.

Then rebase onto gonum/plot master if necessary and squash.

@kortschak kortschak merged commit 14d0ba1 into gonum:master Mar 16, 2015
@kortschak
Copy link
Member

Thanks, Chris.

@dgryski
Copy link

dgryski commented Mar 18, 2015

This change broke all the example images generated by plotter/main.go.
example_barchart

ctessum added a commit to ctessum/plot that referenced this pull request Mar 20, 2015
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