Oct 07
Drawable area in Processing
Fundamentals of Physical Computing
Lab Five: Processing, part 7: Create a drawable area
- Decide on a rectangle area in the canvas of the sketch of your program as being drawable. This means that when the mouse button is pressed, your paint brush will only make marks within this area and not outside of it.
- What are the 4 pixel coordinates of your area? In comments in your code, write down the extents of this area.
- Have your program draw a rectangle to visually show where this area is. Will this rectangle go in the setup() function or the draw() function? Write your answer to this question in comments next to the rectangle that you draw.
- Now add conditionals to your draw() function where you previously added the Mouse Pressed conditional to decide whether the Mouse is currently within the drawable area.