Skip to content

Commit

Permalink
Fix the alpha values when blending lines and circles.
Browse files Browse the repository at this point in the history
  • Loading branch information
andydotxyz committed Mar 23, 2019
1 parent 105623f commit 7185357
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions driver/gl/draw.go
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@ func (c *glCanvas) drawCircle(circle *canvas.Circle, pos fyne.Position, frame fy
texture := getTexture(circle, c.newGlCircleTexture)

gl.Enable(gl.BLEND)
gl.BlendFunc(gl.SRC_ALPHA, gl.ONE_MINUS_SRC_ALPHA)
gl.BlendFunc(gl.ONE, gl.ONE_MINUS_SRC_ALPHA)
c.drawTexture(texture, points)
}

Expand All @@ -161,7 +161,7 @@ func (c *glCanvas) drawLine(line *canvas.Line, pos fyne.Position, frame fyne.Siz
texture := getTexture(line, c.newGlLineTexture)

gl.Enable(gl.BLEND)
gl.BlendFunc(gl.SRC_ALPHA, gl.ONE_MINUS_SRC_ALPHA)
gl.BlendFunc(gl.ONE, gl.ONE_MINUS_SRC_ALPHA)
c.drawTexture(texture, points)
}

Expand Down

0 comments on commit 7185357

Please sign in to comment.