SPDX-FileCopyrightText: 2019 Harald Sitter <sitter@kde.org>
SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only OR LicenseRef-KDE-Accepted-GPL
*/
#include "shape.h"
#include "outline.h"
Shape::Shape(XkbShapePtr shape_, XkbDescPtr xkb_, QObject *parent)
: XkbObject(xkb_, parent)
, shape(shape_)
, bounds(QRectF(QPointF(shape->bounds.x1, shape->bounds.y1), QPointF(shape->bounds.x2, shape->bounds.y2)))
{
if (shape->primary) {
outlines.push_back(new Outline(shape->primary, xkb, this));
return;
}
for (int i = 0; i < shape->num_outlines; ++i) {
outlines.push_back(new Outline(shape->outlines + i, xkb, this));
}
}
#include "moc_shape.cpp"