File: rect.cpp

package info (click to toggle)
maelstrom 3.0.7-5
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 4,952 kB
  • sloc: cpp: 10,947; sh: 3,406; ansic: 2,781; makefile: 175
file content (26 lines) | stat: -rw-r--r-- 371 bytes parent folder | download | duplicates (11)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26

#include "rect.h"

void SetRect(Rect *R, int left, int top, int right, int bottom)
{
	R->left = left;
	R->top = top;
	R->right = right;
	R->bottom = bottom;
}

void OffsetRect(Rect *R, int x, int y)
{
	R->left += x;
	R->top += y;
	R->right += x;
	R->bottom += y;
}

void InsetRect(Rect *R, int x, int y)
{
	R->left += x;
	R->top += y;
	R->right -= x;
	R->bottom -= y;
}