bug fixes and refinements.

This commit is contained in:
Will Charczuk 2016-07-11 23:32:31 -07:00
parent 52e80c183d
commit debd56f494
7 changed files with 31 additions and 21 deletions

View file

@ -55,9 +55,9 @@ func TestAnnotationSeriesMeasure(t *testing.T) {
box := as.Measure(r, cb, xrange, yrange, sd)
assert.False(box.IsZero())
assert.Equal(-5.0, box.Top)
assert.Equal(-3.0, box.Top)
assert.Equal(5.0, box.Left)
assert.Equal(146.0, box.Right) //the top,left annotation sticks up 5px and out ~44px.
assert.Equal(147.0, box.Right) //the top,left annotation sticks up 5px and out ~44px.
assert.Equal(115.0, box.Bottom)
}
@ -114,10 +114,10 @@ func TestAnnotationSeriesRender(t *testing.T) {
assert.True(isRaster)
assert.NotNil(rr)
c := rr.i.At(39, 70)
c := rr.i.At(38, 70)
converted, isRGBA := color.RGBAModel.Convert(c).(color.RGBA)
assert.True(isRGBA)
assert.Equal(3, converted.R)
assert.Equal(3, converted.G)
assert.Equal(3, converted.B)
assert.Equal(0, converted.R)
assert.Equal(0, converted.G)
assert.Equal(0, converted.B)
}