processing - Trying to make a paintbrush effect for my drawing app, but it starts too thick -


As part of my curriculum, working with a target running on my Nexus worked with a drawing app in processing is. However, when this code first shows the paintbrush effect for the brush, but the weight of the line is not properly reset, the next line always starts very thick, any help would be very commendable.

What I have done so far

  float max = 6; Float thickness = 1; Zero setup () {size (500, 500); Smooth (); Background (255); } Zero draw () (if (mouse is pressed) {if (thickness> max) {line (mousex, macie, PMUX, PMU Y); StrokeWeight (thickness); Thickness = thickness + 0.25; } Other {line (mousex, macie, PMYSEX, PMU Y); StrokeWeight (max); }}} Zero mouse relayed () {thickness = thickness / thickness; }  

As the program runs from top to bottom, you get a strokewhite ( Thickness); line () before , then it draws the line with the appropriate thickness . Just change this order and you are good.

  float max = 6; Float thickness = 1; Zero setup () {size (500, 500); Smooth (); Background (255); } Zero draw () (if (mouse pressed) {if (thickness  

Comments

Popular posts from this blog

java - Can't add JTree to JPanel of a JInternalFrame -

javascript - data.match(var) not working it seems -

javascript - How can I pause a jQuery .each() loop, while waiting for user input? -