1/*
2* Copyright 2010, Haiku. All rights reserved.
3* Distributed under the terms of the MIT License.
4*
5* Authors:
6*		Michael Pfeiffer
7*/
8#include "GPBand.h"
9
10GPBand::GPBand(BBitmap* bitmap, BRect validRect, BPoint where)
11	:
12	fBitmap(*bitmap),
13	fValidRect(validRect),
14	fWhere(where)
15{
16
17}
18
19
20BRect
21GPBand::GetBoundingRectangle() const
22{
23	BRect rect = fValidRect;
24	rect.OffsetTo(fWhere);
25	return rect;
26}
27
28
29bool
30GPBand::ContainsLine(int line) const
31{
32	int y = line - (int)fWhere.y;
33	return 0 <= y && y <= fValidRect.IntegerHeight();
34}
35