Created
February 10, 2016 19:02
-
-
Save limzunyuan/6f789e8f3847242a018e to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
void paintLine(Line *li) { | |
cout<<"PAINT_LINE "<<li -> p1.first <<" "<< li->p1.second <<" " <<li->p2.first<< " "<< li->p2.second<<endl; | |
} | |
void paintSquare(Square* sq) { | |
int x = (sq->top_left.first + sq->bottom_right.first) /2; | |
int y = (sq->top_left.second + sq->bottom_right.second) /2; | |
int len = (sq->bottom_right.first - sq->top_left.first) / 2; | |
cout<<"PAINT_SQUARE "<<x<<" "<<y<<" " << len <<endl; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment