Documentation
¶
Index ¶
- Variables
- type ImgView
- func (iv *ImgView) ConnectEvents2D()
- func (iv *ImgView) ImgViewEvents()
- func (iv *ImgView) ImgViewMouseEvents()
- func (iv *ImgView) KeyInput(kt *key.ChordEvent)
- func (iv *ImgView) ScaleToFit()
- func (iv *ImgView) SetInfo(pi *picinfo.Info)
- func (iv *ImgView) UpdateImage()
- func (iv *ImgView) ZoomIn()
- func (iv *ImgView) ZoomOut()
Constants ¶
This section is empty.
Variables ¶
View Source
var ImgViewProps = ki.Props{ "EnumType:Flag": gi.KiT_NodeFlags, "max-width": -1, "max-height": -1, }
View Source
var KiT_ImgView = kit.Types.AddType(&ImgView{}, ImgViewProps)
Functions ¶
This section is empty.
Types ¶
type ImgView ¶
type ImgView struct { gi.Bitmap // info about the image that is being viewed Info *picinfo.Info `desc:"info about the image that is being viewed"` // cached version of original image OrigImg image.Image `desc:"cached version of original image"` // current scale Scale float32 `desc:"current scale"` }
ImgView shows a bitmap image with zoom control through keyboard actions
func AddNewImgView ¶
AddNewImgView adds a new ImgView to given parent node, with given name.
func (*ImgView) ConnectEvents2D ¶
func (iv *ImgView) ConnectEvents2D()
func (*ImgView) ImgViewEvents ¶
func (iv *ImgView) ImgViewEvents()
func (*ImgView) ImgViewMouseEvents ¶
func (iv *ImgView) ImgViewMouseEvents()
func (*ImgView) KeyInput ¶
func (iv *ImgView) KeyInput(kt *key.ChordEvent)
func (*ImgView) ScaleToFit ¶
func (iv *ImgView) ScaleToFit()
ScaleToFit sets the scale so it fits the current image
func (*ImgView) UpdateImage ¶
func (iv *ImgView) UpdateImage()
UpdateImage updates the image based on current scale
Click to show internal directories.
Click to hide internal directories.