Drawing Program
Lab 02 Core Exercise HIT3172
 All Classes Functions Variables
Public Member Functions | List of all members
Rectangle Class Reference

#include <Rectangle.h>

Inheritance diagram for Rectangle:
Shape

Public Member Functions

void make_square ()
void draw ()
void highlight ()
- Public Member Functions inherited from Shape
 Shape ()
color get_color ()
color get_highlight_color ()
point2d get_position ()
int get_width ()
int get_height ()
float get_x ()
float get_y ()
void set_color (color)
void set_highlight_color (color)
void set_position (point2d)
void set_width (int)
void set_height (int)
void set_x (float)
void set_y (float)
bool is_at (point2d)

Additional Inherited Members

- Protected Member Functions inherited from Shape
void calculate_highlight_color ()
- Protected Attributes inherited from Shape
color _color
color _highlight_color
point2d _position
int _width
int _height

Detailed Description

Rectangle class holds all logic to creating and drawing rectangles, and inherits basic attributes and methods from the Shape class

Member Function Documentation

void Rectangle::draw ( )
virtual

This method draws the rectangle to the screen using the Shape's _color property

Implements Shape.

void Rectangle::highlight ( )
virtual

This method draws a larger rectangle to the screen using the Shape's _highlight_color property

Implements Shape.

void Rectangle::make_square ( )

This makes the rectangle a square based on it's largest side


The documentation for this class was generated from the following files: