File indexing completed on 2024-12-22 05:00:57
0001 /* This file is part of the Calligra project 0002 * SPDX-FileCopyrightText: 2003 Stefan Taferner <taferner@kde.org> 0003 * 0004 * SPDX-License-Identifier: LGPL-2.0-only 0005 */ 0006 #pragma once 0007 // clang-format off 0008 #include "qwmf.h" 0009 class QWinMetaFile; 0010 static const struct MetaFuncRec { 0011 const char *name; 0012 unsigned short func; 0013 void (QWinMetaFile::*method)(long, short *); 0014 } metaFuncTab[] = { 0015 { "SETBKCOLOR", 0x0201, &QWinMetaFile::setBkColor }, 0016 { "SETBKMODE", 0x0102, &QWinMetaFile::setBkMode }, 0017 { "SETMAPMODE", 0x0103, &QWinMetaFile::noop }, 0018 { "SETROP2", 0x0104, &QWinMetaFile::setRop }, 0019 { "SETRELABS", 0x0105, &QWinMetaFile::noop }, 0020 { "SETPOLYFILLMODE", 0x0106, &QWinMetaFile::setPolyFillMode }, 0021 { "SETSTRETCHBLTMODE", 0x0107, &QWinMetaFile::noop }, 0022 { "SETTEXTCHAREXTRA", 0x0108, &QWinMetaFile::noop }, 0023 { "SETTEXTCOLOR", 0x0209, &QWinMetaFile::setTextColor }, 0024 { "SETTEXTJUSTIFICATION", 0x020A, &QWinMetaFile::noop }, 0025 { "SETWINDOWORG", 0x020B, &QWinMetaFile::setWindowOrg }, 0026 { "SETWINDOWEXT", 0x020C, &QWinMetaFile::setWindowExt }, 0027 { "SETVIEWPORTORG", 0x020D, &QWinMetaFile::noop }, 0028 { "SETVIEWPORTEXT", 0x020E, &QWinMetaFile::noop }, 0029 { "OFFSETWINDOWORG", 0x020F, &QWinMetaFile::noop }, 0030 { "SCALEWINDOWEXT", 0x0410, &QWinMetaFile::noop }, 0031 { "OFFSETVIEWPORTORG", 0x0211, &QWinMetaFile::noop }, 0032 { "SCALEVIEWPORTEXT", 0x0412, &QWinMetaFile::noop }, 0033 { "LINETO", 0x0213, &QWinMetaFile::lineTo }, 0034 { "MOVETO", 0x0214, &QWinMetaFile::moveTo }, 0035 { "EXCLUDECLIPRECT", 0x0415, &QWinMetaFile::excludeClipRect }, 0036 { "INTERSECTCLIPRECT", 0x0416, &QWinMetaFile::intersectClipRect }, 0037 { "ARC", 0x0817, &QWinMetaFile::arc }, 0038 { "ELLIPSE", 0x0418, &QWinMetaFile::ellipse }, 0039 { "FLOODFILL", 0x0419, &QWinMetaFile::noop }, 0040 { "PIE", 0x081A, &QWinMetaFile::pie }, 0041 { "RECTANGLE", 0x041B, &QWinMetaFile::rectangle }, 0042 { "ROUNDRECT", 0x061C, &QWinMetaFile::roundRect }, 0043 { "PATBLT", 0x061D, &QWinMetaFile::noop }, 0044 { "SAVEDC", 0x001E, &QWinMetaFile::saveDC }, 0045 { "SETPIXEL", 0x041F, &QWinMetaFile::setPixel }, 0046 { "OFFSETCLIPRGN", 0x0220, &QWinMetaFile::noop }, 0047 { "TEXTOUT", 0x0521, &QWinMetaFile::textOut }, 0048 { "BITBLT", 0x0922, &QWinMetaFile::noop }, 0049 { "STRETCHBLT", 0x0B23, &QWinMetaFile::noop }, 0050 { "POLYGON", 0x0324, &QWinMetaFile::polygon }, 0051 { "POLYLINE", 0x0325, &QWinMetaFile::polyline }, 0052 { "ESCAPE", 0x0626, &QWinMetaFile::noop }, 0053 { "RESTOREDC", 0x0127, &QWinMetaFile::restoreDC }, 0054 { "FILLREGION", 0x0228, &QWinMetaFile::noop }, 0055 { "FRAMEREGION", 0x0429, &QWinMetaFile::noop }, 0056 { "INVERTREGION", 0x012A, &QWinMetaFile::noop }, 0057 { "PAINTREGION", 0x012B, &QWinMetaFile::noop }, 0058 { "SELECTCLIPREGION", 0x012C, &QWinMetaFile::noop }, 0059 { "SELECTOBJECT", 0x012D, &QWinMetaFile::selectObject }, 0060 { "SETTEXTALIGN", 0x012E, &QWinMetaFile::setTextAlign }, 0061 { "CHORD", 0x0830, &QWinMetaFile::chord }, 0062 { "SETMAPPERFLAGS", 0x0231, &QWinMetaFile::noop }, 0063 { "EXTTEXTOUT", 0x0a32, &QWinMetaFile::extTextOut }, 0064 { "SETDIBTODEV", 0x0d33, &QWinMetaFile::noop }, 0065 { "SELECTPALETTE", 0x0234, &QWinMetaFile::noop }, 0066 { "REALIZEPALETTE", 0x0035, &QWinMetaFile::noop }, 0067 { "ANIMATEPALETTE", 0x0436, &QWinMetaFile::noop }, 0068 { "SETPALENTRIES", 0x0037, &QWinMetaFile::noop }, 0069 { "POLYPOLYGON", 0x0538, &QWinMetaFile::polyPolygon }, 0070 { "RESIZEPALETTE", 0x0139, &QWinMetaFile::noop }, 0071 { "DIBBITBLT", 0x0940, &QWinMetaFile::dibBitBlt }, 0072 { "DIBSTRETCHBLT", 0x0b41, &QWinMetaFile::dibStretchBlt }, 0073 { "DIBCREATEPATTERNBRUSH", 0x0142, &QWinMetaFile::dibCreatePatternBrush }, 0074 { "STRETCHDIB", 0x0f43, &QWinMetaFile::stretchDib }, 0075 { "EXTFLOODFILL", 0x0548, &QWinMetaFile::noop }, 0076 { "DELETEOBJECT", 0x01f0, &QWinMetaFile::deleteObject }, 0077 { "CREATEPALETTE", 0x00f7, &QWinMetaFile::createEmptyObject }, 0078 { "CREATEPATTERNBRUSH", 0x01F9, &QWinMetaFile::createEmptyObject }, 0079 { "CREATEPENINDIRECT", 0x02FA, &QWinMetaFile::createPenIndirect }, 0080 { "CREATEFONTINDIRECT", 0x02FB, &QWinMetaFile::createFontIndirect }, 0081 { "CREATEBRUSHINDIRECT", 0x02FC, &QWinMetaFile::createBrushIndirect }, 0082 { "CREATEREGION", 0x06FF, &QWinMetaFile::createEmptyObject }, 0083 { "END", 0, &QWinMetaFile::end }, 0084 // always the latest in the table : in case of unknown function 0085 { nullptr, 0, &QWinMetaFile::noop }, 0086 }; 0087 // clang-format on