Project

looking for graphic elements (canvas)

Started by Phil999 on .

Sign in or create an account to join the conversation.

25 posts

Topic starter
for example, a simple one-color background. What I did is to use the gradient command and two identical colors. There is probably an easier way?

Or lines, vertical, horizontal, with easy editable thickness and color. Circles, squares, triangles, pentagons, hexagons, etc. Again with easy editable sizes, thickness, and color.

Also transparent stuff. A transparent Canvas object that you can put on top of another object, for example one that has no z value, to simulate a touch input or z value.

While the Canvas object has many great possibilities, I'm more interested in simple graphic elements. The complex stuff I will learn later. Needless to say I haven't quite understood how it works. But if I have some simple examples I think I can understand better.

What are your findings so far?
Yup! I agree that canvas can be first and foremost a "discreet" guy doing hard chores in the background and not be something flashy.

Dont get why you used such a cumbersome way for a simple color fill

Canvas-ColouredFill.jzml

;)

By the way, unfortunately the z emulation is not possible. TOUCH transparency of Canvas (not visual) is only possible when the Canvas object is set to "no touch". As soon as you set it to "mono touch" or "multi touch" objects behind the canvas are not "touched".
Yo.

I think Phil intends the canvas touch to be used as a proxy z for objects that lack their own z attribute - except of course, as you mention - when touch is enabled on the canvas, it blocks input to anythingunderneath.

Which . . . is basically what you already said, except more longwinded! :D
Yup - halfway through submitting my post I realised what you were implying ;)

They should just implement the fucking z on all objects already . . . it's not like people haven't been requesting it for years now or anything.
What can I say except that when I need it, I need it . . . and clearly I'm not alone (as evidenced by this very thread).

I can say that any of the grid-type canvas objects posted thus far are noticeably slower to process input than native - be that x, y or z attributes. Now, that may be an artifact of the specific scripting implementation . . . but I'd posit that the most efficient scripting will still be slower than native attributes.
thank you Softcore for the color fill. That's one thing I was looking for. Going to change my last West// template with this simpler method. And I believe I can do some other stuff with this almost blank template. Straight lines, beziers, etc. Tomorrow. During the last days I burnt again a shadow into my computer monitor because the Lemur editor was running for too long.

Understood the thing with transparency and Canvas. I was not sure, hoped it could be possible. I would need a z value for a Menu object. In a recent project, if I run a certain script with Menu.selection, things don't work quite right. But I'm sure I'll find another way to solve this problem.
Remember that sometimes it's definitely better to use multiple canvas objects depending on the mix of execution conditions required, versus framerate / perf maintenance.

For instance, redrawing a single complicated canvas just to refresh some parts of the interface. Definitely a tradeoff involved in using canvas efficiently.
Softcore this is a brilliant idea. I haven't thought about that. Of course this would be better. But only if you have time. I think I could do it also, probably spending many hours until I get it right. And there's another project I'm at right now.

Often I know the layout already, and doing the graphics in Lemur is not so difficult. Still, there's some guess work, and sometimes there are a couple of pixels left. Also it's not efficient to move so many objects around, checking x and y distances again and again. It would be better to do such things more precisely with one Canvas object, or only few.

In case it could help you, here are the images I used for the West template:

https://www.dropbox.com/s/e9i1ptjnfb7kelt/graphicsWest.zip?dl=0

Attachment upload here doesn't work at the moment. Oh and don't mind the moving parts in the West template. I will do a custom menu and leave the background static, that's better. I just wanted to finish the template quickly so that I can use it. It's quite a nice Reaktor ensemble, I had already a couple of sessions with it.

Besides, did you manage to do this http://www.softcore.net.gr/LemurLogo.html in Lemur meanwhile? Or is it a limitation still?

Thanks again for your good idea. I am quite sure I will use this method (one Canvas background and then put elements on top) from the moment I fully understand the syntax.