LCD object draw transparency

Aug 19, 2008 at 1:25am

LCD object draw transparency

This LCD is already getting a load of messages, but I’d love to be able to make transparent PaintRect’s on it, somehow. Anyone know how to do this? Doing a message like “paintrect 64 64 192 192 255 255 255 128″ still just paints a 128×128 black box, instead of a 128×128 box that’s at 50% opacity.

#39336
Aug 19, 2008 at 3:11am

I know the help-file says penmode is deprecated but… currently, things seem different from what’s written.

So you might try ‘penmode 32′ in tandem with the ‘oprgb $1 $1 $1′ message… something like this:

– Pasted Max Patch, click to expand. –
#138329
Aug 19, 2008 at 3:46am

Ah! This is so close to perfect it hurts. It’s not even your fault that it doesn’t work for me. Pretty sure it’s a bug in LCD – after all, penmode messages aren’t supposed to work anymore.

The problem is that whenever I move my paintrect (I’m using them as ‘zone’ delineation, the user can move them around and resize them) it flashes to more opaque. It seems to draw over itself a few times before it clears the old versions of it, so it’s layering on top of itself. Maybe I can bother the devs enough into giving LCD true transparency support. :P

Thanks much, though! I’ll keep toying with it and see what I can get.

#138330
Aug 19, 2008 at 3:57am

Yes! Definitely bother the devs by sending your request directly to
support at cycling 74 dot com
since penmode is in the process of being phased out and the help-file even says to ‘use alpha’.

Btw, just in case it still might help, I got as far as I got by taking a look at the examples here and working from there:
Max5/examples/javascript/simulation

It may be that javascript can also help you with what you need, not sure… best of luck.

#138331
Aug 19, 2008 at 4:00am

I will be out of the office from August 7 until August 25 and will not
have access to my email account. If you need assisitance while I am away
please contact Ana Varas at 754-321-2050 or ana.varas@browardschools.com

Thank you

#138332
Aug 19, 2008 at 4:49am

OK, what’s with these messages from barbara? This is the second time I’ve seen one.

#138333
Aug 19, 2008 at 5:46pm

i’d recommend staying away from penmodes. Unless i’m misunderstanding, you can just send a ‘frgb x x x x’ before you paint in lcd:

– Pasted Max Patch, click to expand. –
#138334
Aug 19, 2008 at 5:58pm

Ah, sweet, that works. I guess that’s the alpha they were talking about in the helpfile(not directly within the paintrect drawsprite message but within frgb first).

#138335
Aug 19, 2008 at 6:15pm

this is technically a workaround, there is some funkiness with paint commands ignoring the alpha. We are taking a look at it.

-Ben

#138336

You must be logged in to reply to this topic.