moved Shape related defines to their own header

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@19154 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Stefano Ceccherini 2006-10-30 21:20:38 +00:00
parent 34633cab94
commit 2f9eca855a
5 changed files with 36 additions and 30 deletions

View File

@ -0,0 +1,29 @@
/*
* Copyright 2003-2006, Haiku.
* Distributed under the terms of the MIT License.
*
* Authors:
* Adrian Oanca <adioanca@cotty.iren.ro>
* Axel Dörfler, axeld@pinc-software.de
*/
#ifndef SHAPE_PRIVATE_H
#define SHAPE_PRIVATE_H
#define OP_LINETO 0x10000000
#define OP_BEZIERTO 0x20000000
#define OP_CLOSE 0x40000000
#define OP_MOVETO 0x80000000
struct shape_data {
uint32 *opList;
int32 opCount;
int32 opSize;
int32 opBlockSize;
BPoint *ptList;
int32 ptCount;
int32 ptSize;
int32 ptBlockSize;
};
#endif

View File

@ -16,29 +16,13 @@
#include <Point.h>
#include <Rect.h>
#include <ShapePrivate.h>
#include <new>
#include <stdlib.h>
#include <string.h>
// NOTE: changing these defines will break Painter,
// currently located in src/servers/app/drawing/Painter/Painter.cpp
#define OP_LINETO 0x10000000
#define OP_BEZIERTO 0x20000000
#define OP_CLOSE 0x40000000
#define OP_MOVETO 0x80000000
struct shape_data {
uint32 *opList;
int32 opCount;
int32 opSize;
int32 opBlockSize;
BPoint *ptList;
int32 ptCount;
int32 ptSize;
int32 ptBlockSize;
};
BShapeIterator::BShapeIterator()

View File

@ -16,6 +16,7 @@
#include <MessageUtils.h>
#include <PortLink.h>
#include <ServerProtocol.h>
#include <ShapePrivate.h>
#include <TokenSpace.h>
#include <ViewPrivate.h>

View File

@ -18,6 +18,7 @@
#include <PicturePlayer.h>
#include <PictureProtocol.h>
#include <ServerProtocol.h>
#include <ShapePrivate.h>
#include <Bitmap.h>
#include <Shape.h>
@ -25,12 +26,6 @@
#include <stdio.h>
#include <stack>
// NOTE: Initially defined in Shape.cpp.
#define OP_LINETO 0x10000000
#define OP_BEZIERTO 0x20000000
#define OP_CLOSE 0x40000000
#define OP_MOVETO 0x80000000
class ShapePainter : public BShapeIterator {
public:

View File

@ -15,6 +15,8 @@
#include <Region.h>
#include <String.h>
#include <ShapePrivate.h>
#include <agg_bezier_arc.h>
#include <agg_bounding_rect.h>
#include <agg_conv_clip_polygon.h>
@ -520,12 +522,7 @@ Painter::DrawBezier(BPoint* p, bool filled) const
}
}
// this comes from Shape.cpp
// code duplication ahead...
#define OP_LINETO 0x10000000
#define OP_BEZIERTO 0x20000000
#define OP_CLOSE 0x40000000
#define OP_MOVETO 0x80000000
// DrawShape
BRect