mirror of
https://github.com/hajimehoshi/ebiten.git
synced 2024-11-10 04:57:26 +01:00
vector: Bug fix: wrong color value
This commit is contained in:
parent
8d912a402f
commit
6bd9ef6abd
@ -86,7 +86,7 @@ func update(screen *ebiten.Image) error {
|
||||
|
||||
op := &vector.DrawPathOptions{}
|
||||
op.LineWidth = 4
|
||||
op.StrokeColor = color.White
|
||||
op.StrokeColor = color.RGBA{0xdb, 0x56, 0x20, 0xff}
|
||||
path.Draw(screen, op)
|
||||
|
||||
return nil
|
||||
|
@ -76,7 +76,7 @@ func (p *Path) strokeVertices(lineWidth float32, clr color.Color) (vertices []eb
|
||||
|
||||
sw, sh := emptyImage.Size()
|
||||
r, g, b, a := clr.RGBA()
|
||||
rf, gf, bf, af := float32(r/0xffff), float32(g/0xffff), float32(b/0xffff), float32(a/0xffff)
|
||||
rf, gf, bf, af := float32(r)/0xffff, float32(g)/0xffff, float32(b)/0xffff, float32(a)/0xffff
|
||||
for i, s := range p.segs {
|
||||
si, co := math.Sincos(s.atan2() + math.Pi/2)
|
||||
dx, dy := float32(co)*lineWidth/2, float32(si)*lineWidth/2
|
||||
|
Loading…
Reference in New Issue
Block a user