mirror of
https://github.com/Fluffy-Bean/ColouringApp.git
synced 2025-05-20 18:34:52 +00:00
Finally, the code is clean enough to add more stuff
This commit is contained in:
parent
d0ebc1ee54
commit
00c449abff
3 changed files with 46 additions and 54 deletions
|
@ -18,4 +18,9 @@ func (p *penTool) Draw(offset raylib.Vector2) {
|
|||
raylib.DrawLineEx(startPoint, endPoint, p.Size, p.Color)
|
||||
raylib.DrawCircle(int32(startPoint.X), int32(startPoint.Y), p.Size/2, p.Color)
|
||||
}
|
||||
// Add a circle at the end of the stroke
|
||||
if len(p.Points) > 0 {
|
||||
endPoint := raylib.Vector2Add(p.Points[len(p.Points)-1], offset)
|
||||
raylib.DrawCircle(int32(endPoint.X), int32(endPoint.Y), p.Size/2, p.Color)
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue