Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- {
- id: "tooltip",
- is_strict: true,
- //always_active: true, TODO: WHAT DOES THIS DO?
- properties: {
- text: { type: "string" },
- ww: { type: "int, value: lib.citadel.py(100) },
- hh: { type: "int, value: lib.citadel.py(100) },
- render: "def() ->commands [
- set(animation, lib.citadel.render_frame(c, ww, hh,
- [
- c.set_operator('SOURCE'),
- c.rectangle(0,0,ww,hh),
- c.set_source_rgba(0.1,0.1,0.1,0.5),
- c.fill(),
- map(fragments, [
- c.save(),
- c.translate(lib.citadel.py(5), lib.citadel.py(5)),
- value.path,
- c.fill(),
- c.restore(),
- ])
- where fragments = c.markup_text(q(text), { width: lib.citadel.py(1000), scale: lib.citadel.dpy(1.0) }),
- ]))
- where c = canvas()
- ]",
- },
- on_create: "[
- render(),
- ]",
- }
Advertisement
Add Comment
Please, Sign In to add comment