mirror of
https://github.com/clockworkpi/LauncherGoDev.git
synced 2025-12-13 00:18:52 +01:00
next is image and ttf fonts
This commit is contained in:
parent
2b89cd1a3e
commit
a26e36033b
@ -1,7 +1,7 @@
|
|||||||
package draw
|
package draw
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"fmt"
|
// "fmt"
|
||||||
// "math"
|
// "math"
|
||||||
"github.com/veandco/go-sdl2/sdl"
|
"github.com/veandco/go-sdl2/sdl"
|
||||||
"github.com/veandco/go-sdl2/gfx"
|
"github.com/veandco/go-sdl2/gfx"
|
||||||
@ -13,7 +13,6 @@ import (
|
|||||||
|
|
||||||
func _aa_render_region(image *sdl.Renderer, _rect *sdl.Rect, col color.Color, rad int) {
|
func _aa_render_region(image *sdl.Renderer, _rect *sdl.Rect, col color.Color, rad int) {
|
||||||
corners := rect.Inflate(_rect,-2*rad-1, -2*rad-1)
|
corners := rect.Inflate(_rect,-2*rad-1, -2*rad-1)
|
||||||
fmt.Println(_rect, corners)
|
|
||||||
topleft := []int{ int(corners.X),int(corners.Y)}
|
topleft := []int{ int(corners.X),int(corners.Y)}
|
||||||
topright := []int{int(corners.X+corners.W-1), int(corners.Y)}
|
topright := []int{int(corners.X+corners.W-1), int(corners.Y)}
|
||||||
bottomleft := []int{int(corners.X), int(corners.Y+corners.H-1)}
|
bottomleft := []int{int(corners.X), int(corners.Y+corners.H-1)}
|
||||||
|
|||||||
3
test.go
3
test.go
@ -45,6 +45,9 @@ func run() int {
|
|||||||
rect2 := rect.Rect(3,120,200,30)
|
rect2 := rect.Rect(3,120,200,30)
|
||||||
draw.AARoundRect(screen,&rect2,color.Color{0,213,222,255},10,0, color.Color{0,213,222,255})
|
draw.AARoundRect(screen,&rect2,color.Color{0,213,222,255},10,0, color.Color{0,213,222,255})
|
||||||
|
|
||||||
|
|
||||||
|
// image and ttf fonts
|
||||||
|
|
||||||
display.Flip()
|
display.Flip()
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user