#include <qtextlayout.h>
#include <qdebug.h>
-#ifdef QT3_SUPPORT
-#include <q3painter.h>
-#endif
-
#ifndef QT_NO_OPENGL
#include <qglpixelbuffer.h>
#endif
"^gradient_setCoordinateMode\\s+(\\w*)$",
"gradient_setCoordinateMode <coordinate method enum>",
"gradient_setCoordinateMode ObjectBoundingMode");
-#ifdef QT3_SUPPORT
- DECL_PAINTCOMMANDSECTION("qt3 drawing ops");
- DECL_PAINTCOMMAND("qt3_drawArc", command_qt3_drawArc,
- "^qt3_drawArc\\s+(-?\\w*)\\s+(-?\\w*)\\s+(-?\\w*)\\s+(-?\\w*)\\s+(-?\\w*)\\s+(-?\\w*)$",
- "qt3_drawArc <x> <y> <w> <h> <angleStart> <angleArc>\n - angles are expressed in 1/16th of degree",
- "qt3_drawArc 10 10 20 20 0 5760");
- DECL_PAINTCOMMAND("qt3_drawChord", command_qt3_drawChord,
- "^qt3_drawChord\\s+(-?\\w*)\\s+(-?\\w*)\\s+(-?\\w*)\\s+(-?\\w*)\\s+(-?\\w*)\\s+(-?\\w*)$",
- "qt3_drawChord <x> <y> <w> <h> <angleStart> <angleArc>\n - angles are expressed in 1/16th of degree",
- "qt3_drawChord 10 10 20 20 0 5760");
- DECL_PAINTCOMMAND("qt3_drawEllipse", command_qt3_drawEllipse,
- "^qt3_drawEllipse\\s+(-?\\w*)\\s+(-?\\w*)\\s+(-?\\w*)\\s+(-?\\w*)$",
- "qt3_drawEllipse <x> <y> <w> <h>",
- "qt3_drawEllipse 10 10 20 20");
- DECL_PAINTCOMMAND("qt3_drawPie", command_qt3_drawPie,
- "^qt3_drawPie\\s+(-?\\w*)\\s+(-?\\w*)\\s+(-?\\w*)\\s+(-?\\w*)\\s+(-?\\w*)\\s+(-?\\w*)$",
- "qt3_drawPie <x> <y> <w> <h> <angleStart> <angleArc>\n - angles are expressed in 1/16th of degree",
- "qt3_drawPie 10 10 20 20 0 5760");
- DECL_PAINTCOMMAND("qt3_drawRect", command_qt3_drawRect,
- "^qt3_drawRect\\s+(-?\\w*)\\s+(-?\\w*)\\s+(-?\\w*)\\s+(-?\\w*)$",
- "qt3_drawRect <x> <y> <w> <h>",
- "qt3_drawRect 10 10 20 20");
- DECL_PAINTCOMMAND("qt3_drawRoundRect", command_qt3_drawRoundRect,
- "^qt3_drawRoundRect\\s+(-?\\w*)\\s+(-?\\w*)\\s+(-?\\w*)\\s+(-?\\w*)\\s*(-?\\w)?\\s*(-?\\w)?$",
- "qt3_drawRoundRect <x> <y> <w> <h> [rx] [ry]",
- "qt3_drawRoundRect 10 10 20 20 3 3");
-#endif
DECL_PAINTCOMMANDSECTION("drawing ops");
DECL_PAINTCOMMAND("drawPoint", command_drawPoint,
"^drawPoint\\s+(-?[\\w.]*)\\s+(-?[\\w.]*)$",
m_painter->drawArc(x, y, w, h, angle, sweep);
}
-#ifdef QT3_SUPPORT
-/***************************************************************************************************/
-void PaintCommands::command_qt3_drawRect(QRegExp re)
-{
- Q_UNUSED(re);
-#ifdef QT3_SUPPORT
- QStringList caps = re.capturedTexts();
- int x = convertToInt(caps.at(1));
- int y = convertToInt(caps.at(2));
- int w = convertToInt(caps.at(3));
- int h = convertToInt(caps.at(4));
-
- if (m_verboseMode)
- printf(" -(lance) qt3_drawRect(%d, %d, %d, %d)\n", x, y, w, h);
-
- static_cast<Q3Painter*>(m_painter)->drawRect(x, y, w, h);
-#endif
-}
-
-/***************************************************************************************************/
-void PaintCommands::command_qt3_drawRoundRect(QRegExp re)
-{
- Q_UNUSED(re);
-#ifdef QT3_SUPPORT
- QStringList caps = re.capturedTexts();
- int x = convertToInt(caps.at(1));
- int y = convertToInt(caps.at(2));
- int w = convertToInt(caps.at(3));
- int h = convertToInt(caps.at(4));
- int xrnd = caps.at(5).isEmpty() ? 25 : convertToInt(caps.at(5));
- int yrnd = caps.at(6).isEmpty() ? 25 : convertToInt(caps.at(6));
-
- if (m_verboseMode)
- printf(" -(lance) qt3_drawRoundRect(%d, %d, %d, %d), %d, %d\n", x, y, w, h, xrnd, yrnd);
-
- static_cast<Q3Painter*>(m_painter)->drawRoundRect(x, y, w, h, xrnd, yrnd);
-#endif
-}
-
-/***************************************************************************************************/
-void PaintCommands::command_qt3_drawEllipse(QRegExp re)
-{
- Q_UNUSED(re);
-#ifdef QT3_SUPPORT
- QStringList caps = re.capturedTexts();
- int x = convertToInt(caps.at(1));
- int y = convertToInt(caps.at(2));
- int w = convertToInt(caps.at(3));
- int h = convertToInt(caps.at(4));
-
- if (m_verboseMode)
- printf(" -(lance) qt3_drawEllipse(%d, %d, %d, %d)\n", x, y, w, h);
-
- static_cast<Q3Painter*>(m_painter)->drawEllipse(x, y, w, h);
-#endif
-}
-
-/***************************************************************************************************/
-void PaintCommands::command_qt3_drawPie(QRegExp re)
-{
- Q_UNUSED(re);
-#ifdef QT3_SUPPORT
- QStringList caps = re.capturedTexts();
- int x = convertToInt(caps.at(1));
- int y = convertToInt(caps.at(2));
- int w = convertToInt(caps.at(3));
- int h = convertToInt(caps.at(4));
- int angle = convertToInt(caps.at(5));
- int sweep = convertToInt(caps.at(6));
-
- if (m_verboseMode)
- printf(" -(lance) qt3_drawPie(%d, %d, %d, %d, %d, %d)\n", x, y, w, h, angle, sweep);
-
- static_cast<Q3Painter*>(m_painter)->drawPie(x, y, w, h, angle, sweep);
-#endif
-}
-
-/***************************************************************************************************/
-void PaintCommands::command_qt3_drawChord(QRegExp re)
-{
- Q_UNUSED(re);
-#ifdef QT3_SUPPORT
- QStringList caps = re.capturedTexts();
- int x = convertToInt(caps.at(1));
- int y = convertToInt(caps.at(2));
- int w = convertToInt(caps.at(3));
- int h = convertToInt(caps.at(4));
- int angle = convertToInt(caps.at(5));
- int sweep = convertToInt(caps.at(6));
-
- if (m_verboseMode)
- printf(" -(lance) qt3_drawChord(%d, %d, %d, %d, %d, %d)\n", x, y, w, h, angle, sweep);
-
- static_cast<Q3Painter*>(m_painter)->drawChord(x, y, w, h, angle, sweep);
-#endif
-}
-
-/***************************************************************************************************/
-void PaintCommands::command_qt3_drawArc(QRegExp re)
-{
- Q_UNUSED(re);
-#ifdef QT3_SUPPORT
- QStringList caps = re.capturedTexts();
- int x = convertToInt(caps.at(1));
- int y = convertToInt(caps.at(2));
- int w = convertToInt(caps.at(3));
- int h = convertToInt(caps.at(4));
- int angle = convertToInt(caps.at(5));
- int sweep = convertToInt(caps.at(6));
-
- if (m_verboseMode)
- printf(" -(lance) qt3_drawArc(%d, %d, %d, %d, %d, %d)\n", x, y, w, h, angle, sweep);
-
- static_cast<Q3Painter*>(m_painter)->drawArc(x, y, w, h, angle, sweep);
-#endif
-}
-#endif //QT3_SUPPORT
/***************************************************************************************************/
void PaintCommands::command_drawText(QRegExp re)
{
drawRect 140 0 17 17
drawRect 160 0 18 18
drawRect 180 0 19 19
-qt3_drawRect 200 0 10 10
-qt3_drawRect 220 0 11 11
-qt3_drawRect 240 0 12 12
-qt3_drawRect 260 0 13 13
-qt3_drawRect 280 0 14 14
-qt3_drawRect 300 0 15 15
-qt3_drawRect 320 0 16 16
-qt3_drawRect 340 0 17 17
-qt3_drawRect 360 0 18 18
-qt3_drawRect 380 0 19 19
drawEllipse 0 20 10 10
drawEllipse 20 20 11 11
drawEllipse 140 20 17 17
drawEllipse 160 20 18 18
drawEllipse 180 20 19 19
-qt3_drawEllipse 200 20 10 10
-qt3_drawEllipse 220 20 11 11
-qt3_drawEllipse 240 20 12 12
-qt3_drawEllipse 260 20 13 13
-qt3_drawEllipse 280 20 14 14
-qt3_drawEllipse 300 20 15 15
-qt3_drawEllipse 320 20 16 16
-qt3_drawEllipse 340 20 17 17
-qt3_drawEllipse 360 20 18 18
-qt3_drawEllipse 380 20 19 19
drawRoundRect 0 40 10 10
drawRoundRect 20 40 11 11
drawRoundRect 140 40 17 17
drawRoundRect 160 40 18 18
drawRoundRect 180 40 19 19
-qt3_drawRoundRect 200 40 10 10
-qt3_drawRoundRect 220 40 11 11
-qt3_drawRoundRect 240 40 12 12
-qt3_drawRoundRect 260 40 13 13
-qt3_drawRoundRect 280 40 14 14
-qt3_drawRoundRect 300 40 15 15
-qt3_drawRoundRect 320 40 16 16
-qt3_drawRoundRect 340 40 17 17
-qt3_drawRoundRect 360 40 18 18
-qt3_drawRoundRect 380 40 19 19
drawPie 0 60 10 10 0 4320
drawPie 20 60 11 11 0 4320
drawPie 140 60 17 17 0 4320
drawPie 160 60 18 18 0 4320
drawPie 180 60 19 19 0 4320
-qt3_drawPie 200 60 10 10 0 4320
-qt3_drawPie 220 60 11 11 0 4320
-qt3_drawPie 240 60 12 12 0 4320
-qt3_drawPie 260 60 13 13 0 4320
-qt3_drawPie 280 60 14 14 0 4320
-qt3_drawPie 300 60 15 15 0 4320
-qt3_drawPie 320 60 16 16 0 4320
-qt3_drawPie 340 60 17 17 0 4320
-qt3_drawPie 360 60 18 18 0 4320
-qt3_drawPie 380 60 19 19 0 4320
drawArc 0 80 10 10 0 4320
drawArc 20 80 11 11 0 4320
drawArc 140 80 17 17 0 4320
drawArc 160 80 18 18 0 4320
drawArc 180 80 19 19 0 4320
-qt3_drawArc 200 80 10 10 0 4320
-qt3_drawArc 220 80 11 11 0 4320
-qt3_drawArc 240 80 12 12 0 4320
-qt3_drawArc 260 80 13 13 0 4320
-qt3_drawArc 280 80 14 14 0 4320
-qt3_drawArc 300 80 15 15 0 4320
-qt3_drawArc 320 80 16 16 0 4320
-qt3_drawArc 340 80 17 17 0 4320
-qt3_drawArc 360 80 18 18 0 4320
-qt3_drawArc 380 80 19 19 0 4320
drawChord 0 100 10 10 0 4320
drawChord 20 100 11 11 0 4320
drawChord 140 100 17 17 0 4320
drawChord 160 100 18 18 0 4320
drawChord 180 100 19 19 0 4320
-qt3_drawChord 200 100 10 10 0 4320
-qt3_drawChord 220 100 11 11 0 4320
-qt3_drawChord 240 100 12 12 0 4320
-qt3_drawChord 260 100 13 13 0 4320
-qt3_drawChord 280 100 14 14 0 4320
-qt3_drawChord 300 100 15 15 0 4320
-qt3_drawChord 320 100 16 16 0 4320
-qt3_drawChord 340 100 17 17 0 4320
-qt3_drawChord 360 100 18 18 0 4320
-qt3_drawChord 380 100 19 19 0 4320
end_block