Re: [Scilab-users] How to create transparent polygon

2019-11-17 Thread jaipur
Thank you all.

I understand that scilab has the ability to draw transparent polygon any
way.
But changing of pixel_drawing_mode property affect already existent way of
drawing, we have to be careful when doing.
Especially when changing of pixel_drawing_mode property two or more times.

Thank you.

H.T.



--
Sent from: 
http://mailinglists.scilab.org/Scilab-users-Mailing-Lists-Archives-f2602246.html
___
users mailing list
users@lists.scilab.org
http://lists.scilab.org/mailman/listinfo/users


Re: [Scilab-users] How to create transparent polygon

2019-11-11 Thread Chin Luh Tan
the previous method is the implementation as suggested by Samuel, another 
approach would be using Matplot.



you could play with the last line obj1 and obj2 (alpha blending) to get the 
desired intersection color. 


x = zeros(100,100,3);

obj1 = x;
obj2 = x;

obj1(21:60,21:60) = 1;
obj1(:,:,2:3) = 0;

obj2(41:80,41:80,2) = 1;
obj2(:,:,[1,3]) = 0;

Matplot(obj1+obj2)







 On Tue, 12 Nov 2019 11:39:38 +0800 Chin Luh Tan 
 wrote 


Hi,

If it is not necessary to have real transparent color mixing, but just want to 
have the transparent effect, you could try to play with the 
"pixel_drawing_mode". 
f = figure("background", 1,"pixel_drawing_mode", "or");
plot2d(0,0,-1,"010"," ",[-2,-2,2,2]);

x=sin(2*%pi*(0:4)/5);
y=cos(2*%pi*(0:4)/5);
plot2d(0,0,-1,"010"," ",[-2,-2,2,2]);
gca().foreground = 12;
xfpoly(x,y);
gca().foreground = 27;
xfpoly(x+0.3,y+0.3)






example from https://help.scilab.org/docs/6.0.2/en_US/pixel_drawing_mode.html

rgds,
CL


 On Sat, 09 Nov 2019 21:19:44 +0800 jaipur  wrote 











___ 
users mailing list 
users@lists.scilab.org 
http://lists.scilab.org/mailman/listinfo/users 
Dear all 
 
When making a polygon by xpoly for example, can we set transparency effect 
as the following polygon? 
If it's possible, could you suggest the way of doing? 
 
Regards 
Hiroshi Tachihara 
 
 
 
 
 
-- 
Sent from: 
http://mailinglists.scilab.org/Scilab-users-Mailing-Lists-Archives-f2602246.html
 
___ 
users mailing list 
mailto:users@lists.scilab.org 
http://lists.scilab.org/mailman/listinfo/users___
users mailing list
users@lists.scilab.org
http://lists.scilab.org/mailman/listinfo/users


Re: [Scilab-users] How to create transparent polygon

2019-11-11 Thread Chin Luh Tan
Hi,

If it is not necessary to have real transparent color mixing, but just want to 
have the transparent effect, you could try to play with the 
"pixel_drawing_mode". 
f = figure("background", 1,"pixel_drawing_mode", "or");
plot2d(0,0,-1,"010"," ",[-2,-2,2,2]);

x=sin(2*%pi*(0:4)/5);
y=cos(2*%pi*(0:4)/5);
plot2d(0,0,-1,"010"," ",[-2,-2,2,2]);
gca().foreground = 12;
xfpoly(x,y);
gca().foreground = 27;
xfpoly(x+0.3,y+0.3)






example from https://help.scilab.org/docs/6.0.2/en_US/pixel_drawing_mode.html

rgds,
CL


 On Sat, 09 Nov 2019 21:19:44 +0800 jaipur  wrote 



Dear all 
 
When making a polygon by xpoly for example, can we set transparency effect 
as the following polygon? 
If it's possible, could you suggest the way of doing? 
 
Regards 
Hiroshi Tachihara 
 
 
 
 
 
-- 
Sent from: 
http://mailinglists.scilab.org/Scilab-users-Mailing-Lists-Archives-f2602246.html
 
___ 
users mailing list 
mailto:users@lists.scilab.org 
http://lists.scilab.org/mailman/listinfo/users___
users mailing list
users@lists.scilab.org
http://lists.scilab.org/mailman/listinfo/users


Re: [Scilab-users] How to create transparent polygon

2019-11-09 Thread Samuel Gougeon

Le 09/11/2019 à 14:19, jaipur a écrit :

Dear all

When making a polygon by xpoly for example, can we set transparency effect
as the following polygon?

No, AFAIK it is not properly possible.
There is just the *gcf().**pixel_drawing_mode property*, but it's a 
global one for the whole figure,

and it is not easy to manage. This way is rather a hack.
help.scilab.org/docs/6.0.2/en_US/pixel_drawing_mode.html



___
users mailing list
users@lists.scilab.org
http://lists.scilab.org/mailman/listinfo/users


[Scilab-users] How to create transparent polygon

2019-11-09 Thread jaipur
Dear all

When making a polygon by xpoly for example, can we set transparency effect
as the following polygon?
If it's possible, could you suggest the way of doing?

Regards
Hiroshi Tachihara

 



--
Sent from: 
http://mailinglists.scilab.org/Scilab-users-Mailing-Lists-Archives-f2602246.html
___
users mailing list
users@lists.scilab.org
http://lists.scilab.org/mailman/listinfo/users