kgamesvgdocument_p.h

Go to the documentation of this file.
00001 
00008 /***************************************************************************
00009  *   Copyright (C) 2007 Mark A. Taff <kde@marktaff.com>                    *
00010  *                                                                         *
00011  *   This program is free software; you can redistribute it and/or modify  *
00012  *   it under the terms of the GNU Library General Public License          *
00013  *   version 2 as published by the Free Software Foundation                *
00014  *                                                                         *
00015  *   This program is distributed in the hope that it will be useful,       *
00016  *   but WITHOUT ANY WARRANTY; without even the implied warranty of        *
00017  *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the         *
00018  *   GNU Library General Public License for more details.                  *
00019  *                                                                         *
00020  *   You should have received a copy of the GNU Library General Public     *
00021  *   License along with this program; if not, write to the                 *
00022  *   Free Software Foundation, Inc.,                                       *
00023  *   51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.         *
00024  ***************************************************************************/
00025 
00026 #ifndef _KGAMESVGDOCUMENT_P_H_
00027 #define _KGAMESVGDOCUMENT_P_H_
00028 
00029 
00033 static const QString WSP = QString("\\s");
00034 
00038 static const QString WSP_ASTERISK = QString(WSP + '*');
00039 
00043 static const char COMMA = ',';
00044 
00048 static const QString COMMA_WSP = QString("(?:(?:" + WSP + '+' + COMMA + '?' + 
00049                 WSP + "*)|(?:" + COMMA + WSP + "*))");
00050 
00054 static const QString NUMBER = QString("(?:(?:[-|\\+]?\\d+(?:\\.)*\\d*(?:e)?[-|\\+]?\\d*)|(?:[-|\\+]?(?:\\.)+\\d*(?:e)?[-|\\+]?\\d*))");
00055 // Do not wrap the above line!
00056 
00060 static const QString OPEN_PARENS = QString("\\(");
00061 
00065 static const QString CLOSE_PARENS = QString("\\)");
00066 
00070 static const QString MATRIX = QString("(matrix)" + WSP_ASTERISK + OPEN_PARENS + WSP_ASTERISK + 
00071                 '(' + NUMBER + ')' + COMMA_WSP + 
00072                 '(' + NUMBER + ')' + COMMA_WSP + 
00073                 '(' + NUMBER + ')' + COMMA_WSP + 
00074                 '(' + NUMBER + ')' + COMMA_WSP + 
00075                 '(' + NUMBER + ')' + COMMA_WSP + 
00076                 '(' + NUMBER + ')' + WSP_ASTERISK + CLOSE_PARENS);
00077 
00081 static const QString TRANSLATE = QString("(translate)" + WSP_ASTERISK + OPEN_PARENS + WSP_ASTERISK + 
00082                 '(' + NUMBER + ')' + 
00083                 "(?:" + COMMA_WSP + '(' + NUMBER + ')' + ")?" + WSP_ASTERISK + CLOSE_PARENS);
00084 
00088 static const QString SCALE = QString("(scale)" + WSP_ASTERISK + OPEN_PARENS + WSP_ASTERISK + 
00089                 '(' + NUMBER + ')' + 
00090                 "(?:" + COMMA_WSP + '(' + NUMBER + ')' + ")?" + WSP_ASTERISK + CLOSE_PARENS);
00091 
00095 static const QString ROTATE = QString("(rotate)" + WSP_ASTERISK + OPEN_PARENS + WSP_ASTERISK + 
00096                 '(' + NUMBER + ')' + "(?:" + COMMA_WSP + 
00097                 '(' + NUMBER + ')' + COMMA_WSP + 
00098                 '(' + NUMBER + ')' +  ")?" + WSP_ASTERISK + CLOSE_PARENS);
00099 
00103 static const QString SKEW_X = QString("(skewX)" + WSP_ASTERISK + OPEN_PARENS + WSP_ASTERISK + 
00104                 '(' + NUMBER + ')' + WSP_ASTERISK + CLOSE_PARENS);
00105 
00109 static const QString SKEW_Y = QString("(skewY)" + WSP_ASTERISK + OPEN_PARENS + WSP_ASTERISK + 
00110                 '(' + NUMBER + ')' + WSP_ASTERISK + CLOSE_PARENS);
00111 
00115 static const QString TRANSFORM = QString("(?:" + MATRIX + "|" + TRANSLATE + "|" + SCALE + "|" + 
00116                 ROTATE + "|" + SKEW_X + "|" + SKEW_Y + ")");
00117 
00121 static const QString TRANSFORMS = QString("(?:" + TRANSFORM + "|" + "(?:" + TRANSFORM + 
00122                 COMMA_WSP + "+)*" + TRANSFORM + ")");
00123 
00124 #endif // _KGAMESVGDOCUMENT_P_H_

Generated on Sun Mar 16 08:02:53 2008 for Libkdegames by  doxygen 1.5.3