9 void HorizontalLine(SDL_Surface *dst, const Vector<int> &position, unsigned int length, Uint32 color) {
11 destRect.x = position.X();
12 destRect.y = position.Y();
15 SDL_FillRect(dst, &destRect, color);
18 void VerticalLine(SDL_Surface *dst, const math::Vector<int> &position, unsigned int length, Uint32 color) {
20 destRect.x = position.X();
21 destRect.y = position.Y();
24 SDL_FillRect(dst, &destRect, color);
28 void OutlineRect(SDL_Surface *dst, const Vector<int> &from, const Vector<int> &to, Uint32 color) {
30 destRect.x = std::min(from.X(), to.X());
31 destRect.y = std::min(from.Y(), to.Y());
32 destRect.w = std::abs(from.X() - to.X());
33 destRect.h = std::abs(from.Y() - to.Y());
34 OutlineRect(dst, &destRect, color);
37 void OutlineRect(SDL_Surface *dst, SDL_Rect *dstrect, Uint32 color) {
39 destRect.x = dstrect->x;
40 destRect.y = dstrect->y;
41 destRect.w = dstrect->w;
43 SDL_FillRect(dst, &destRect, color);
44 destRect.y += dstrect->h - 1;
45 SDL_FillRect(dst, &destRect, color);
46 destRect.y = dstrect->y;
48 destRect.h = dstrect->h;
49 SDL_FillRect(dst, &destRect, color);
50 destRect.x += dstrect->w - 1;
51 SDL_FillRect(dst, &destRect, color);