Difference between revisions of "Lua:Class:Picture"
Jump to navigation
Jump to search
AntumDeluge (talk | contribs) (→Examples: Remove "false" argument from createForm function) |
AntumDeluge (talk | contribs) (→Examples: Better variable name) |
||
Line 59: | Line 59: | ||
-- add icon to Form title bar | -- add icon to Form title bar | ||
− | local | + | local pic = createPicture() |
− | + | pic.loadFromFile("icon.png") | |
− | form.Icon = | + | form.Icon = pic.getBitmap() |
</pre> | </pre> | ||
Revision as of 08:04, 7 February 2019
Picture class: (Inheritence:)
WARNING: This page is unfinished.
Contents
Creation
- createPicture() : Picture
- Returns a newly created Picture.
Properties
- Graphic
- PNG
- Bitmap
- Jpeg
- Icon
Methods
- loadFromFile(filename)
- Loads an image from a local file.
- saveToFile(filename)
- loadFromStream
- assign
- getGraphic
- getPNG
- getBitmap
- getJpeg
Examples
-- main interface local form = createForm() -- add icon to Form title bar local pic = createPicture() pic.loadFromFile("icon.png") form.Icon = pic.getBitmap()