unreleased_juce_tutorial_point_line_rectangle.dox File Reference

Functions

endcode Now let s write our< code class="project_code"> paint ()</code > function such that it randomly generates a rectangle and a point. Then it will draw the rectangle and then a smaller rectangle located around the point. This smaller rectangle will be drawn in a different colour depending upon whether the randomly-generated point is within the larger rectangle or not. Our< code class
 
 for (int i=0;i< numSquares;++i)
 

Variables

 override
 
endcode subsection tutorial_point_line_rectangle_rectangle_intersections Rectangle intersections If we have rectangles that overlap
 
Rectangle< int > area (10, 10, 40, 40)
 
Randomrandom = Random::getSystemRandom()
 
Range< int > rectRandomRange (20, 40)
 
const int numSquares = 10
 

Function Documentation

◆ paint()

◆ for()

Variable Documentation

◆ override

override
Initial value:
{
void repaint()
Use this method to draw the display.

◆ overlap

endcode subsection tutorial_point_line_rectangle_rectangle_intersections Rectangle intersections If we have rectangles that overlap

◆ area

◆ random

◆ rectRandomRange

Range<int> rectRandomRange(20, 40)

Referenced by for().

◆ numSquares

const int numSquares = 10