aboutsummaryrefslogtreecommitdiffstats
path: root/src/plugins/scenegraph/openvg/qsgopenvgrenderable.h
blob: 1f090befe811b65e4dcc9959eee61a2d0065ed5d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
// Copyright (C) 2016 The Qt Company Ltd.
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only

#ifndef QSGOPENVGRENDERABLE_H
#define QSGOPENVGRENDERABLE_H

#include <QtGlobal>

#include <VG/openvg.h>

#include "qopenvgmatrix.h"

QT_BEGIN_NAMESPACE

class QSGOpenVGRenderable
{
public:
    QSGOpenVGRenderable();
    virtual ~QSGOpenVGRenderable();

    virtual void render() = 0;

    virtual void setOpacity(float opacity);
    float opacity() const;
    VGPaint opacityPaint() const;

    virtual void setTransform(const QOpenVGMatrix &transform);
    const QOpenVGMatrix &transform() const;

private:
    float m_opacity;
    VGPaint m_opacityPaint;
    QOpenVGMatrix m_transform;

};

QT_END_NAMESPACE

#endif // QSGOPENVGRENDERABLE_H