mirror of
https://github.com/Fluffy-Bean/ColouringApp.git
synced 2025-01-29 15:48:27 +00:00
Support resizing canvas though not used really
This commit is contained in:
parent
00c449abff
commit
9cfdd651b7
|
@ -20,6 +20,8 @@ type Canvas struct {
|
|||
|
||||
func (c *Canvas) Update() {
|
||||
if c.Refresh {
|
||||
c.Target = raylib.LoadRenderTexture(int32(c.Size.X), int32(c.Size.Y))
|
||||
|
||||
raylib.BeginTextureMode(c.Target)
|
||||
raylib.ClearBackground(raylib.White)
|
||||
for _, mark := range c.Strokes {
|
||||
|
|
3
main.go
3
main.go
|
@ -58,7 +58,7 @@ func main() {
|
|||
var (
|
||||
camera = raylib.NewCamera2D(raylib.NewVector2(0, 0), raylib.NewVector2(0, 0), 0, 1)
|
||||
|
||||
canvas = NewCanvas("NewProject", raylib.NewVector2(600, 530), raylib.NewVector2(15, 15))
|
||||
canvas = NewCanvas("NewProject", raylib.NewVector2(700, 530), raylib.NewVector2(15, 15))
|
||||
currentStroke = penTool{}
|
||||
|
||||
sidePanelWidth = float32(350)
|
||||
|
@ -210,6 +210,7 @@ func main() {
|
|||
if choice == 0 || choice == 1 {
|
||||
state = StateNormal
|
||||
}
|
||||
default:
|
||||
}
|
||||
|
||||
DrawToasts()
|
||||
|
|
Loading…
Reference in a new issue