Lua:Neutrino-API:cpicture:en
Inhaltsverzeichnis
cpicture
Creates an image or icon object
cpicture.new{Parameter} |
Parameter:
Parameter | Typ | Description/Beschreibung | |
parent | userdata | parent cwindow-object | see also Parent Window |
x | number | x-position on screen | |
y | number | y-position on screen | |
dx | number | width of cpicture object | |
dy | number | height of cpicture object | |
image | string | full path to image file or icon-name | full path causes scaling of image within defined size |
has_shadow | string | shadow on / off | default: false (off) |
color_frame | number | frame color | default: MENUCONTENT_PLUS_6 |
color_background | number | background color | default: MENUCONTENT_PLUS_0 |
color_shadow | number | shadow color | default: MENUCONTENTDARK_PLUS_0 |
transparency | number | mode of transparency | default: 1 (CFrameBuffer::TM_NONE)
other possible parameters: 2 (CFrameBuffer::TM_BLACK) |
en: Parameters with default-values are optional. If not needed, no definition is required. In case of missing parameter, default value is used.
de: Parameter mit Default-Wert sind optional. dh. sie müssen nicht angegeben werden. Falls der Parameter fehlt, wird automatisch dieser Wert angenommen. |
Example:
local w = cwindow.new{x=x, y=y, dx=dx, dy=dy, title="Test", icon="info"}
cpicture.new{parent=w, x=10, y=10, dx=40, dy=40, image="rot"}
w:paint() |
paint
Pain a cpicture object image on screen
cpicture.paint{Parameter} |
Parameter:
Parameter | Typ | Description/Beschreibung | |
do_save_bg | boolean | save background bevore paint image, if true then usually background can be restored with cpicture.hide | default: true |
en: Parameters with default-values are optional. If not needed, no definition is required. In case of missing parameter, default value is used.
de: Parameter mit Default-Wert sind optional. dh. sie müssen nicht angegeben werden. Falls der Parameter fehlt, wird automatisch dieser Wert angenommen. |
Example:
cp:paint{do_save_bg=true}; |
hide
remove current painted image from screen and restore background if parameter.
cpicture.hide{Parameter} |
Parameter:
Parameter | Typ | Description/Beschreibung | |
no_restore | boolean | don't restore background (if available) | default: false |
en: Parameters with default-values are optional. If not needed, no definition is required. In case of missing parameter, default value is used.
de: Parameter mit Default-Wert sind optional. dh. sie müssen nicht angegeben werden. Falls der Parameter fehlt, wird automatisch dieser Wert angenommen. |
Example:
cp:hide{no_restore=true}; |
setPicture
assigns an image.
cpicture.setPicture {Parameter} |
Parameter:
Parameter | Typ | Description/Beschreibung | |
image | string | full path to image file icon name | full path causes scaling of image within defined size |
en: Parameters with default-values are optional. If not needed, no definition is required. In case of missing parameter, default value is used.
de: Parameter mit Default-Wert sind optional. dh. sie müssen nicht angegeben werden. Falls der Parameter fehlt, wird automatisch dieser Wert angenommen. |
Example:
w:setPicture{image="help"}; |