filters

ai3handler.cpp
1/* This file is part of the KDE project
2 Copyright (C) 2002, Dirk Schönberger <dirk.schoenberger@sz-online.de>
3
4 This library is free software; you can redistribute it and/or
5 modify it under the terms of the GNU Library General Public
6 License as published by the Free Software Foundation; either
7 version 2 of the License, or (at your option) any later version.
8
9 This library is distributed in the hope that it will be useful,
10 but WITHOUT ANY WARRANTY; without even the implied warranty of
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 Library General Public License for more details.
13
14 You should have received a copy of the GNU Library General Public License
15 along with this library; see the file COPYING.LIB. If not, write to
16 the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
17 * Boston, MA 02110-1301, USA.
18*/
19
20#include "ai3handler.h"
21
22AI3Handler::AI3Handler(AIParserBase *delegate){
23 m_delegate = delegate;
24}
25AI3Handler::~AI3Handler(){
26}
27
28bool AI3Handler::handleAIOperation (AIOperation op) {
29// PathElement pathElement;
30// double fval;
31 int ival;
32
33 switch (op) {
34 case AIO_SetWindingOrder :
35 ival = m_delegate->getIntValue();
36 if (m_delegate->m_gstateHandler) m_delegate->m_gstateHandler->gotWindingOrder (ival);
37 return true;
38 break;
39 case AIO_BeginGroupNoClip :
40 if (m_delegate->m_structureHandler) m_delegate->m_structureHandler->gotBeginGroup (false);
41 return true;
42 break;
43 case AIO_EndGroupNoClip :
44 if (m_delegate->m_debug) tqDebug ("got end group noclip");
45 if (m_delegate->m_structureHandler) m_delegate->m_structureHandler->gotEndGroup (false);
46 if (m_delegate->m_debug) tqDebug ("/got end group noclip");
47 return true;
48 break;
49 case AIO_BeginCombination :
50 if (m_delegate->m_structureHandler) m_delegate->m_structureHandler->gotBeginCombination ();
51 return true;
52 break;
53 case AIO_EndCombination :
54 if (m_delegate->m_structureHandler) m_delegate->m_structureHandler->gotEndCombination ();
55 return true;
56 break;
57 case AIO_BeginGroupClip :
58 if (m_delegate->m_structureHandler) m_delegate->m_structureHandler->gotBeginGroup (true);
59 return true;
60 break;
61 case AIO_EndGroupClip :
62 if (m_delegate->m_structureHandler) m_delegate->m_structureHandler->gotEndGroup (true);
63 return true;
64 break;
65 case AIO_SetFillMode :
66 if (m_delegate->m_pathHandler) m_delegate->m_pathHandler->gotFillMode((FillMode) m_delegate->getIntValue());
67 return true;
68 break;
69 default :
70 return false;
71 }
72 return false;
73}
74