Documentation
¶
Index ¶
- Constants
- type Frame
- func (m *Frame) Data() []byte
- func (m *Frame) Delay() uint32
- func (m *Frame) Image() lcl.IBitmap
- func (m *Frame) Index() int
- func (m *Frame) Point() (x, y int32)
- func (m *Frame) Rect() (width, height int32)
- func (m *Frame) SetData(data []byte)
- func (m *Frame) SetDelay(delay uint32)
- func (m *Frame) SetPoint(x, y int32)
- func (m *Frame) SetRect(width, height int32)
- type TGIFAnimate
- func (m *TGIFAnimate) Animate() bool
- func (m *TGIFAnimate) CurrentFrameIndex() int
- func (m *TGIFAnimate) EnableCache(v bool)
- func (m *TGIFAnimate) Frame(index int) *Frame
- func (m *TGIFAnimate) FrameCount() int
- func (m *TGIFAnimate) Free()
- func (m *TGIFAnimate) LoadFromBytes(data []byte)
- func (m *TGIFAnimate) LoadFromFile(filePath string)
- func (m *TGIFAnimate) NextFrame()
- func (m *TGIFAnimate) PrevFrame()
- func (m *TGIFAnimate) ReadHeader(data []byte) *TGIFHeader
- func (m *TGIFAnimate) SetAnimate(v bool)
- func (m *TGIFAnimate) SetOnFrameChanged(fn func(frame *Frame))
- func (m *TGIFAnimate) SetOnStart(fn func())
- func (m *TGIFAnimate) SetOnStop(fn func())
- func (m *TGIFAnimate) Start()
- func (m *TGIFAnimate) Stop()
- type TGIFHeader
Constants ¶
View Source
const ( DisposalNone = iota + 1 DisposalBackground DisposalPrevious )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type TGIFAnimate ¶
TGIFAnimate
GIF 动画组件
func NewGIFAnimate ¶
func NewGIFAnimate(owner lcl.IComponent) *TGIFAnimate
NewGIFAnimate
创建GIF动画播放组件
func (*TGIFAnimate) CurrentFrameIndex ¶
func (m *TGIFAnimate) CurrentFrameIndex() int
CurrentFrameIndex 返回当前帧索引
func (*TGIFAnimate) Free ¶
func (m *TGIFAnimate) Free()
func (*TGIFAnimate) LoadFromBytes ¶
func (m *TGIFAnimate) LoadFromBytes(data []byte)
LoadFromBytes 从字节数组加载GIF
func (*TGIFAnimate) LoadFromFile ¶
func (m *TGIFAnimate) LoadFromFile(filePath string)
LoadFromFile 从本地文件加载GIF
func (*TGIFAnimate) ReadHeader ¶
func (m *TGIFAnimate) ReadHeader(data []byte) *TGIFHeader
func (*TGIFAnimate) SetOnFrameChanged ¶
func (m *TGIFAnimate) SetOnFrameChanged(fn func(frame *Frame))
SetOnFrameChanged 播放每帧改变事件
type TGIFHeader ¶
type TGIFHeader struct { Signature [3]byte // 页眉签名(始终为“GIF”) Version [3]byte // GIF格式版本(“89a”) ScreenWidth uint16 // 以像素为单位的显示屏宽度 ScreenHeight uint16 // 以像素为单位的显示屏高度 Packedbit byte // 屏幕和彩色地图信息 BackgroundColor byte // 背景色索引 AspectRatio byte // 像素纵横比 }
func (*TGIFHeader) Is89a ¶
func (m *TGIFHeader) Is89a() bool
func (*TGIFHeader) IsGIF ¶
func (m *TGIFHeader) IsGIF() bool
Click to show internal directories.
Click to hide internal directories.