Vultraz

Untitled

May 29th, 2016
104
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.74 KB | None | 0 0
  1. {
  2. id: "tooltip",
  3. is_strict: true,
  4. //always_active: true, TODO: WHAT DOES THIS DO?
  5.  
  6. properties: {
  7. text: { type: "string" },
  8.  
  9. ww: { type: "int, value: lib.citadel.py(100) },
  10. hh: { type: "int, value: lib.citadel.py(100) },
  11.  
  12. render: "def() ->commands [
  13. set(animation, lib.citadel.render_frame(c, ww, hh,
  14. [
  15. c.set_operator('SOURCE'),
  16. c.rectangle(0,0,ww,hh),
  17. c.set_source_rgba(0.1,0.1,0.1,0.5),
  18. c.fill(),
  19.  
  20. map(fragments, [
  21. c.save(),
  22. c.translate(lib.citadel.py(5), lib.citadel.py(5)),
  23. value.path,
  24. c.fill(),
  25. c.restore(),
  26. ])
  27.  
  28. where fragments = c.markup_text(q(text), { width: lib.citadel.py(1000), scale: lib.citadel.dpy(1.0) }),
  29. ]))
  30. where c = canvas()
  31. ]",
  32. },
  33.  
  34. on_create: "[
  35. render(),
  36. ]",
  37.  
  38. }
Advertisement
Add Comment
Please, Sign In to add comment