From c1ea11830d90e505e6c517cfb36ec1761fac994b Mon Sep 17 00:00:00 2001 From: Allen Dang Date: Thu, 2 Jun 2022 16:30:42 +0800 Subject: [PATCH] Add ID setter to ImageWithRgbaWidget. --- ImageWidgets.go | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/ImageWidgets.go b/ImageWidgets.go index db89ae0c..912133a4 100644 --- a/ImageWidgets.go +++ b/ImageWidgets.go @@ -138,6 +138,12 @@ func ImageWithRgba(rgba image.Image) *ImageWithRgbaWidget { } } +// ID sets the interval id of ImageWithRgba widgets. +func (i *ImageWithRgbaWidget) ID(id string) *ImageWithRgbaWidget { + i.id = id + return i +} + // Size sets image's size. func (i *ImageWithRgbaWidget) Size(width, height float32) *ImageWithRgbaWidget { i.img.Size(width, height)