diff options
| author | Pietro Gagliardi <[email protected]> | 2018-08-21 10:07:23 -0400 |
|---|---|---|
| committer | Pietro Gagliardi <[email protected]> | 2018-08-21 10:07:23 -0400 |
| commit | 0a17df91fc4545617ecd0785db82cde14da5a9dc (patch) | |
| tree | f07dab31b382935e8db92a6aa33fbd36de1f522b /draw.go | |
| parent | 3983f630480c2e5fb4dd9941b1df3e7750b6e504 (diff) | |
Added Image and renamed the BrushType constants respectively.
Diffstat (limited to 'draw.go')
| -rw-r--r-- | draw.go | 14 |
1 files changed, 7 insertions, 7 deletions
@@ -206,10 +206,10 @@ type DrawContext struct { // TODO disclaimer type BrushType int const ( - Solid BrushType = iota - LinearGradient - RadialGradient - Image // presently unimplemented + BrushTypeSolid BrushType = iota + BrushTypeLinearGradient + BrushTypeRadialGradient + BrushTypeImage // presently unimplemented ) // TODO @@ -270,12 +270,12 @@ func (b *Brush) toC() *C.uiDrawBrush { cb := C.newBrush() cb.Type = C.uiDrawBrushType(b.Type) switch b.Type { - case Solid: + case BrushTypeSolid: cb.R = C.double(b.R) cb.G = C.double(b.G) cb.B = C.double(b.B) cb.A = C.double(b.A) - case LinearGradient, RadialGradient: + case BrushTypeLinearGradient, BrushTypeRadialGradient: cb.X0 = C.double(b.X0) cb.Y0 = C.double(b.Y0) cb.X1 = C.double(b.X1) @@ -291,7 +291,7 @@ func (b *Brush) toC() *C.uiDrawBrush { C.double(s.B), C.double(s.A)) } - case Image: + case BrushTypeImage: panic("unimplemented") default: panic("invalid brush type in Brush.toC()") |
