mirror of
https://github.com/koreader/koreader.git
synced 2025-08-10 00:52:38 +00:00
doc: add more doc for imagewidget
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
--[[--
|
||||
ImageWidget shows an image from a file
|
||||
ImageWidget shows an image from a file or memory
|
||||
|
||||
Example:
|
||||
Show image from file example:
|
||||
|
||||
UIManager:show(ImageWidget:new{
|
||||
file = "resources/info-i.png",
|
||||
@@ -9,6 +9,15 @@ Example:
|
||||
-- alpha = true,
|
||||
})
|
||||
|
||||
|
||||
Show image from memory example:
|
||||
|
||||
UIManager:show(ImageWidget:new{
|
||||
-- bitmap_buffer should be a block of memory that holds the raw
|
||||
-- uncompressed bitmap.
|
||||
image = bitmap_buffer,
|
||||
})
|
||||
|
||||
]]
|
||||
|
||||
local Widget = require("ui/widget/widget")
|
||||
|
||||
Reference in New Issue
Block a user