Class containing methods to draw a ball within the maze game with the specified position, size and fill style parameters.

Ball.cpp

Committer:
el15mh
Date:
2017-04-04
Revision:
0:4c58ed26b6ea
Child:
1:ba8bb10ebd5a

File content as of revision 0:4c58ed26b6ea:

//
//  ball.cpp
//
//
//  Created by Max Houghton on 19/03/2017.
//
//

#include "Ball.h"

Ball::Ball()
{
    
}

Ball::~Ball()
{
    
}

void Ball::draw(N5110 &lcd, int x, int y, int radius)
{   
    // lcd.clear();
    float _x = x;
    float _y = y;
    float _radius = radius;
    
    printf("INPUT: x = %i, y = %i, radius = %i \n", x, y, radius);
    printf("DRAW FUNCTION: x = %f, y = %f, radius = %f \n", _x, _y, _radius);
    // lcd.drawCircle(x,y,radius,filltype);
    
    // lcd.drawCircle(43, 21, 5, FILL_TRANSPARENT);
    lcd.drawCircle(_x, _y, _radius, FILL_TRANSPARENT);
    lcd.refresh();
}