lab_inheritance
Insidious Inheritance
 All Classes Namespaces Files Functions Variables
Flower Class Reference

A subclass of Drawable that can draw a flower. More...

#include <flower.h>

Inheritance diagram for Flower:
[legend]
Collaboration diagram for Flower:
[legend]

Public Member Functions

 Flower (const Vector2 &center)
 
void draw (cs225::PNG *canvas) const
 This method will draw the object onto the canvas. More...
 
- Public Member Functions inherited from Drawable
 ~Drawable ()
 

Private Member Functions

void drawPetals (cs225::PNG *canvas, const Vector2 &center, int x, int y) const
 

Private Attributes

Shape stem
 
Shape pistil
 
Shape leaf
 

Detailed Description

A subclass of Drawable that can draw a flower.

Constructor & Destructor Documentation

Flower::Flower ( const Vector2 center)

Member Function Documentation

void Flower::draw ( cs225::PNG canvas) const
virtual

This method will draw the object onto the canvas.

Parameters
canvasto draw onto.

Implements Drawable.

void Flower::drawPetals ( cs225::PNG canvas,
const Vector2 center,
int  x,
int  y 
) const
private

Member Data Documentation

Shape Flower::leaf
private
Shape Flower::pistil
private
Shape Flower::stem
private

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