Gif图片无法显示出来
wengooooo opened this issue · comments
package main
import (
_ "embed"
"github.com/twgh/xcgui/app"
"github.com/twgh/xcgui/widget"
"github.com/twgh/xcgui/window"
"github.com/twgh/xcgui/xc"
"github.com/twgh/xcgui/xcc"
)
//go:embed 2.gif
var img1 []byte
func main() {
a := app.New(true)
w := window.NewWindow(0, 0, 415, 296, "", 0, xcc.Window_Style_Default)
// 加载图片从内存
hImg := xc.XImage_LoadMemory(img1)
shapePic := widget.NewShapeGif(8, 30, 400, 260, w.Handle)
shapePic.SetImage(hImg)
w.ShowWindow(xcc.SW_SHOW)
a.Run()
a.Exit()
}
我这边把d2d关了就好了