Paint Machine. [Part 5]
[xy_vsfilter.git] / src / subtitles / draw_item.h
blob6499388b446a311e2a7b129d7b7b80c7e6073a0f
1 #ifndef __DRAW_ITEM_21D18040_C396_4CA5_BFCE_5616A63F2C56_H__
2 #define __DRAW_ITEM_21D18040_C396_4CA5_BFCE_5616A63F2C56_H__
4 #include <WTypes.h>
5 #include "RTS.h"
6 #include <atlcoll.h>
7 #include <boost/shared_ptr.hpp>
9 class OverlayPaintMachine;
10 typedef ::boost::shared_ptr<OverlayPaintMachine> SharedPtrOverlayPaintMachine;
12 class CClipperPaintMachine;
13 typedef ::boost::shared_ptr<CClipperPaintMachine> SharedPtrCClipperPaintMachine;
15 struct DrawItem
17 public:
18 SharedPtrOverlayPaintMachine overlay_paint_machine;
19 CRect clip_rect;
20 SharedPtrCClipperPaintMachine clipper;
21 int xsub;
22 int ysub;
23 DWORD switchpts[6];
24 bool fBody;
25 bool fBorder;
26 public:
27 CRect GetDirtyRect();
28 static CRect Draw( SubPicDesc& spd, DrawItem& draw_item, const CRect& clip_rect );
30 static DrawItem* CreateDrawItem(const SharedPtrOverlayPaintMachine& overlay_paint_machine,
31 const CRect& clipRect,
32 const SharedPtrCClipperPaintMachine &clipper,
33 int xsub, int ysub,
34 const DWORD* switchpts, bool fBody, bool fBorder);
37 typedef ::boost::shared_ptr<DrawItem> SharedPtrDrawItem;
39 typedef CAtlList<DrawItem> DrawItemList;
41 typedef CAtlList<DrawItemList> DrawItemListList;
44 struct CompositeDrawItem;
45 typedef CAtlList<CompositeDrawItem> CompositeDrawItemList;
46 typedef CAtlList<CompositeDrawItemList> CompositeDrawItemListList;
48 struct CompositeDrawItem
50 public:
51 SharedPtrDrawItem shadow;
52 SharedPtrDrawItem outline;
53 SharedPtrDrawItem body;
54 public:
55 static CRect GetDirtyRect( CompositeDrawItem& item );
57 static void Draw(SubPicDesc& spd, CompositeDrawItemListList& compDrawItemListList);
60 #endif // __DRAW_ITEM_21D18040_C396_4CA5_BFCE_5616A63F2C56_H__