Problems with dashed line
in
Programming Questions
•
2 years ago
Hello,
I'm a student and I can't understand what conditions I have missed. I am making a program where I must have an aim from down of the screen and the line must be dashed. I understand what I want, but I can''t understand what I have missed.
boolean white = true;
void setup()
{size(600,600);
}
void draw(){
}
void mouseMoved()
{
background(255);
if(white==true)
{
fill(255);
}
else
{
fill(0);
}
if(white==true)
{ white = false;
}
else
{
white = true;
}
line(width/2,height,mouseX,mouseY);
if(white==true)
{
white = false;
}
else
{
white = true;
}
line(width/2,height,mouseX,mouseY);
}
//line(width/2,height,mouseX,mouseY);
but line is not dashed and I can't understand what should I do in case of changing true or false in different places of the line.
Thank you!
1
