1/*
2
3PictureIterator.
4
5Copyright (c) 2001, 2002 OpenBeOS.
6
7Authors:
8	Philippe Houdoin
9	Simon Gauvin
10	Michael Pfeiffer
11
12Permission is hereby granted, free of charge, to any person obtaining a copy of
13this software and associated documentation files (the "Software"), to deal in
14the Software without restriction, including without limitation the rights to
15use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
16of the Software, and to permit persons to whom the Software is furnished to do
17so, subject to the following conditions:
18
19The above copyright notice and this permission notice shall be included in all
20copies or substantial portions of the Software.
21
22THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
23IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
24FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
25AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
26LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
27OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
28THE SOFTWARE.
29
30*/
31
32#ifndef _PICTURE_ITERATOR_H
33#define _PICTURE_ITERATOR_H
34
35#include <AppKit.h>
36#include <InterfaceKit.h>
37
38class PictureIterator
39{
40public:
41		virtual ~PictureIterator() { }
42
43		// BPicture playback handlers
44		virtual void		Op(int number) { }
45		virtual void		MovePenBy(BPoint delta) { }
46		virtual void		StrokeLine(BPoint start, BPoint end) { }
47		virtual void		StrokeRect(BRect rect) { }
48		virtual void		FillRect(BRect rect) { }
49		virtual void		StrokeRoundRect(BRect rect, BPoint radii) { }
50		virtual void		FillRoundRect(BRect rect, BPoint radii) { }
51		virtual void		StrokeBezier(BPoint *control) { }
52		virtual void		FillBezier(BPoint *control) { }
53		virtual void		StrokeArc(BPoint center, BPoint radii, float startTheta, float arcTheta) { }
54		virtual void		FillArc(BPoint center, BPoint radii, float startTheta, float arcTheta) { }
55		virtual void		StrokeEllipse(BPoint center, BPoint radii) { }
56		virtual void		FillEllipse(BPoint center, BPoint radii) { }
57		virtual void		StrokePolygon(int32 numPoints, BPoint *points, bool isClosed) { }
58		virtual void		FillPolygon(int32 numPoints, BPoint *points, bool isClosed) { }
59		virtual void        StrokeShape(BShape *shape) { }
60		virtual void        FillShape(BShape *shape) { }
61		virtual void		DrawString(char *string, float escapement_nospace, float escapement_space) { }
62		virtual void		DrawPixels(BRect src, BRect dest, int32 width, int32 height, int32 bytesPerRow, int32 pixelFormat, int32 flags, void *data) { }
63		virtual void		SetClippingRects(BRect *rects, uint32 numRects) { }
64		virtual void    	ClipToPicture(BPicture *picture, BPoint point, bool clip_to_inverse_picture) { }
65		virtual void		PushState() { }
66		virtual void		PopState() { }
67		virtual void		EnterStateChange() { }
68		virtual void		ExitStateChange() { }
69		virtual void		EnterFontState() { }
70		virtual void		ExitFontState() { }
71		virtual void		SetOrigin(BPoint pt) { }
72		virtual void		SetPenLocation(BPoint pt) { }
73		virtual void		SetDrawingMode(drawing_mode mode) { }
74		virtual void		SetLineMode(cap_mode capMode, join_mode joinMode, float miterLimit) { }
75		virtual void		SetPenSize(float size) { }
76		virtual void		SetForeColor(rgb_color color) { }
77		virtual void		SetBackColor(rgb_color color) { }
78		virtual void		SetStipplePattern(pattern p) { }
79		virtual void		SetScale(float scale) { }
80		virtual void		SetFontFamily(char *family) { }
81		virtual void		SetFontStyle(char *style) { }
82		virtual void		SetFontSpacing(int32 spacing) { }
83		virtual void		SetFontSize(float size) { }
84		virtual void		SetFontRotate(float rotation) { }
85		virtual void		SetFontEncoding(int32 encoding) { }
86		virtual void		SetFontFlags(int32 flags) { }
87		virtual void		SetFontShear(float shear) { }
88		virtual void		SetFontFace(int32 flags) { }
89
90		virtual void		Iterate(BPicture* picture);
91};
92
93#endif // _PICTURE_ITERATOR_H
94