functions for enums

This commit is contained in:
Michael Fogleman 2016-02-19 11:20:50 -05:00
parent 805bc68eed
commit cabeb41b27

View File

@ -92,14 +92,42 @@ func (dc *Context) SetLineCap(lineCap LineCap) {
dc.lineCap = lineCap dc.lineCap = lineCap
} }
func (dc *Context) SetLineCapRound() {
dc.lineCap = LineCapRound
}
func (dc *Context) SetLineCapButt() {
dc.lineCap = LineCapButt
}
func (dc *Context) SetLineCapSquare() {
dc.lineCap = LineCapSquare
}
func (dc *Context) SetLineJoin(lineJoin LineJoin) { func (dc *Context) SetLineJoin(lineJoin LineJoin) {
dc.lineJoin = lineJoin dc.lineJoin = lineJoin
} }
func (dc *Context) SetLineJoinRound() {
dc.lineJoin = LineJoinRound
}
func (dc *Context) SetLineJoinBevel() {
dc.lineJoin = LineJoinBevel
}
func (dc *Context) SetFillRule(fillRule FillRule) { func (dc *Context) SetFillRule(fillRule FillRule) {
dc.fillRule = fillRule dc.fillRule = fillRule
} }
func (dc *Context) SetFillRuleWinding() {
dc.fillRule = FillRuleWinding
}
func (dc *Context) SetFillRuleEvenOdd() {
dc.fillRule = FillRuleEvenOdd
}
// Color Setters // Color Setters
func (dc *Context) SetColor(c color.Color) { func (dc *Context) SetColor(c color.Color) {