Adds the ability to draw an XY scatter plot. (#27)
* works more or less * updating comment * removing debugging printf * adding output * tweaks * missed a couple series validations * testing auto coloring * updated output.png * color tests etc. * sanity check tests. * should not use unkeyed fields anyway.
This commit is contained in:
parent
17b28beae8
commit
b713ff85cc
22 changed files with 511 additions and 72 deletions
|
|
@ -116,17 +116,16 @@ func (rr *rasterRenderer) FillStroke() {
|
|||
rr.gc.FillStroke()
|
||||
}
|
||||
|
||||
// Circle implements the interface method.
|
||||
// Circle fully draws a circle at a given point but does not apply the fill or stroke.
|
||||
func (rr *rasterRenderer) Circle(radius float64, x, y int) {
|
||||
xf := float64(x)
|
||||
yf := float64(y)
|
||||
rr.gc.MoveTo(xf-radius, yf) //9
|
||||
rr.gc.QuadCurveTo(xf, yf, xf, yf-radius) //12
|
||||
rr.gc.QuadCurveTo(xf, yf, xf+radius, yf) //3
|
||||
rr.gc.QuadCurveTo(xf, yf, xf, yf+radius) //6
|
||||
rr.gc.QuadCurveTo(xf, yf, xf-radius, yf) //9
|
||||
rr.gc.Close()
|
||||
rr.gc.FillStroke()
|
||||
|
||||
rr.gc.MoveTo(xf-radius, yf) //9
|
||||
rr.gc.QuadCurveTo(xf-radius, yf-radius, xf, yf-radius) //12
|
||||
rr.gc.QuadCurveTo(xf+radius, yf-radius, xf+radius, yf) //3
|
||||
rr.gc.QuadCurveTo(xf+radius, yf+radius, xf, yf+radius) //6
|
||||
rr.gc.QuadCurveTo(xf-radius, yf+radius, xf-radius, yf) //9
|
||||
}
|
||||
|
||||
// SetFont implements the interface method.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue