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