Implement DRCS rendering

External pages with DRCS definitions can be loaded using the options in the
"DRCS pages" submenu within the "View" menu. Two DRCS pages can be loaded,
one for Global DRCS definitions and the other for Normal DRCS definitions.

Level 2.5 mode 0 PTUs are fully supported.

Partial support for Level 3.5 mode 1, 2 and 3 PTUs. DCLUTs defined in X/28/1
on the main page are not yet implemented; the characters currently appear in
the default DCLUTs described in D.1.6 and D.2.2 of the ETSI spec.
This commit is contained in:
Gavin MacGregor
2025-06-09 18:57:16 +01:00
parent 519c961cff
commit e1ba67484f
8 changed files with 536 additions and 8 deletions

View File

@@ -0,0 +1,40 @@
/*
* Copyright (C) 2020-2025 Gavin MacGregor
*
* This file is part of QTeletextMaker.
*
* QTeletextMaker is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* QTeletextMaker is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with QTeletextMaker. If not, see <https://www.gnu.org/licenses/>.
*/
#ifndef DRCSPAGE_H
#define DRCSPAGE_H
#include <QByteArray>
#include "pagebase.h"
class DRCSPage : public PageBase
{
public:
DRCSPage(const PageBase &other);
// TODO PFNormalPOP as well?
PageFunctionEnum pageFunction() const { return PFGlobalPOP; }
PacketCodingEnum packetCoding() const override { return Coding7bit; }
int drcsMode(int c) const;
bool ptu(int c, uchar *data) const;
};
#endif