Madrix script - ALPHA constant ignored

This forum is assigned for bug reporting of Version 3.X. Please be as accurate as possible.

Moderator: MADRIX Team

Locked
qniens
Posts: 25
Joined: Wed May 31, 2017 5:34 pm

Madrix script - ALPHA constant ignored

Post by qniens »

The ALPHA constant is ignored in the SetPixel draw function.

Code: Select all

@scriptname="";
@author="";
@version="";
@description="";

void InitEffect()
{

}

void RenderEffect()
{
	color red		= {255,0,0,0,0};
	SetPixel(red, 10,10);
    	
  	color opacity	= {0,0,0,0,0};  
	SetPixel(opacity,10,10,ALPHA);
	
	//expected result -> The pixel stays red
	//returned result -> The pixel becomes black
	//ALPHA constant is ignored
}

void MatrixSizeChanged()
{
	InitEffect();
}
Is there a work around for this problem?

Best regards,
Quinten
Guertler
Support
Support
Posts: 908
Joined: Tue Feb 04, 2014 10:47 am

Re: Madrix script - ALPHA constant ignored

Post by Guertler »

Hello qniens,
.
Thank you for reporting the issue. At the moment it is not possible to work with the ALPHA parameter in the "Draw" functions.
.
A work around could be to work again with the "SetPixel" function but without the "ALPHA" parameter and set everytime the desired color. Maybe you need to calculate a mix color first.
Or if you only want to dim the pixel you can work with the function "DimPixel(float value, int x, int y)".
qniens
Posts: 25
Joined: Wed May 31, 2017 5:34 pm

Re: Madrix script - ALPHA constant ignored

Post by qniens »

Hello Guertler,

Thank you for your reply.
The work around is workable.

Perhaps you should remove the paragraph about the ALPHA constant in the manual:
http://help.madrix.com/m3/html/script/i ... and_c.html

Best regards,
Quinten
Locked