User Tools

Site Tools


drawing_with_script

====== Differences ====== This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
drawing_with_script [2014/07/21 07:18]
pierrox syntax highlighting
drawing_with_script [2014/07/21 07:21] (current)
pierrox syntax highlighting
Line 19: Line 19:
  
 ===== Copy an icon from an item to another item ===== ===== Copy an icon from an item to another item =====
-<code>+<sxh javascript;>
 var i = LL.getCurrentDesktop().getItemByLabel("​some item"​).getDefaultIcon();​ var i = LL.getCurrentDesktop().getItemByLabel("​some item"​).getDefaultIcon();​
 LL.getEvent().getItem().setDefaultIcon(i);​ LL.getEvent().getItem().setDefaultIcon(i);​
-</code>+</sxh>
  
 ===== Paint a diagonal line over a coloured background ===== ===== Paint a diagonal line over a coloured background =====
Line 47: Line 47:
  
 ===== Draw the folder window background with a gradient ===== ===== Draw the folder window background with a gradient =====
-<code>+<sxh javascript;>
 var WIDTH = 512; var WIDTH = 512;
 var HEIGHT = 512; var HEIGHT = 512;
Line 61: Line 61:
 c.drawRect(0,​0,​WIDTH,​HEIGHT,​p);​ c.drawRect(0,​0,​WIDTH,​HEIGHT,​p);​
 i.update(); i.update();
-</code>+</sxh>
drawing_with_script.1405927082.txt.gz ยท Last modified: 2014/07/21 07:18 by pierrox