1/* 2 * Copyright 2007, Haiku Inc. All rights reserved. 3 * Distributed under the terms of the MIT License. 4 * 5 * Authors: 6 * Stephan Aßmus <superstippi@gmx.de> 7 */ 8#ifndef POLYGON_H 9#define POLYGON_H 10 11#include <List.h> 12#include <Point.h> 13#include <Rect.h> 14 15struct point_vector { 16 BPoint point; 17 BPoint vector; 18}; 19 20class Polygon { 21 public: 22 Polygon(BRect bounds, BList points); 23 Polygon(BRect bounds, int32 vertices); 24 virtual ~Polygon(); 25 26 Polygon* Step() const; 27 28 uint32 CountPoints() const; 29 BPoint PointAt(int32 index) const; 30 31 private: 32 BList fPoints; 33 BRect fBounds; 34}; 35 36#endif // ABOUT_VPOLYGON_HIEW_H 37