Applied patch by Stephen Deken:
* Added a new class BAffineTransform, currently in the BPrivate namespace and the inofficial "shared kit". * Extended BPolygon to be transformable by a BAffineTransform. Thanks a lot! Minor fixes by myself: * The class accidentally still derived from agg::trans_affine. * Added then missing comparator operators. * Swapped the BPoint* and count arguments of Apply(), since that seems to be the more common order in the other Be API. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@28176 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -13,21 +13,27 @@
|
||||
#include <InterfaceDefs.h>
|
||||
#include <Rect.h>
|
||||
|
||||
namespace BPrivate { class BAffineTransform; }
|
||||
using namespace BPrivate;
|
||||
|
||||
class BPolygon {
|
||||
public:
|
||||
BPolygon(const BPoint *ptArray, int32 numPoints);
|
||||
BPolygon(const BPolygon *polygon);
|
||||
BPolygon();
|
||||
virtual ~BPolygon();
|
||||
BPolygon(const BPoint *ptArray, int32 numPoints);
|
||||
BPolygon(const BPolygon *polygon);
|
||||
BPolygon();
|
||||
virtual ~BPolygon();
|
||||
|
||||
BPolygon &operator=(const BPolygon &from);
|
||||
BPolygon &operator=(const BPolygon &from);
|
||||
|
||||
BRect Frame() const;
|
||||
void AddPoints(const BPoint *ptArray, int32 numPoints);
|
||||
int32 CountPoints() const;
|
||||
void MapTo(BRect srcRect, BRect dstRect);
|
||||
void PrintToStream() const;
|
||||
BRect Frame() const;
|
||||
void AddPoints(const BPoint *ptArray, int32 numPoints);
|
||||
int32 CountPoints() const;
|
||||
void MapTo(BRect srcRect, BRect dstRect);
|
||||
void PrintToStream() const;
|
||||
|
||||
void Transform(const BAffineTransform& transform);
|
||||
BPolygon& TransformBySelf(const BAffineTransform& transform);
|
||||
BPolygon* TransformByCopy(const BAffineTransform& transform) const;
|
||||
|
||||
private:
|
||||
friend class BView;
|
||||
|
||||
Reference in New Issue
Block a user