Qt
Internal/Contributor docs for the Qt SDK. Note: These are NOT official API docs; those are found at https://doc.qt.io/
Loading...
Searching...
No Matches
qsgopenvgrenderable.cpp
Go to the documentation of this file.
1
// Copyright (C) 2016 The Qt Company Ltd.
2
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
3
4
#
include
"qsgopenvgrenderable.h"
5
6
QT_BEGIN_NAMESPACE
7
8
QSGOpenVGRenderable::QSGOpenVGRenderable()
9
: m_opacity(1.0f)
10
{
11
m_opacityPaint = vgCreatePaint();
12
}
13
14
QSGOpenVGRenderable
::~
QSGOpenVGRenderable
()
15
{
16
vgDestroyPaint(m_opacityPaint);
17
}
18
19
void
QSGOpenVGRenderable
::
setOpacity
(
float
opacity)
20
{
21
if
(m_opacity == opacity)
22
return
;
23
24
m_opacity = opacity;
25
VGfloat values[] = {
26
1.0f, 1.0f, 1.0f, m_opacity
27
};
28
vgSetParameterfv(m_opacityPaint, VG_PAINT_COLOR, 4, values);
29
}
30
31
float
QSGOpenVGRenderable
::
opacity
()
const
32
{
33
return
m_opacity;
34
}
35
36
VGPaint
QSGOpenVGRenderable
::
opacityPaint
()
const
37
{
38
return
m_opacityPaint;
39
}
40
41
void
QSGOpenVGRenderable
::
setTransform
(
const
QOpenVGMatrix &transform)
42
{
43
m_transform = transform;
44
}
45
46
const
QOpenVGMatrix &
QSGOpenVGRenderable
::
transform
()
const
47
{
48
return
m_transform;
49
}
50
51
QT_END_NAMESPACE
QSGOpenVGRenderable
Definition
qsgopenvgrenderable.h:16
QSGOpenVGRenderable::opacity
float opacity() const
Definition
qsgopenvgrenderable.cpp:31
QSGOpenVGRenderable::opacityPaint
VGPaint opacityPaint() const
Definition
qsgopenvgrenderable.cpp:36
QSGOpenVGRenderable::transform
const QOpenVGMatrix & transform() const
Definition
qsgopenvgrenderable.cpp:46
QSGOpenVGRenderable::~QSGOpenVGRenderable
virtual ~QSGOpenVGRenderable()
Definition
qsgopenvgrenderable.cpp:14
QSGOpenVGRenderable::setTransform
virtual void setTransform(const QOpenVGMatrix &transform)
Definition
qsgopenvgrenderable.cpp:41
QSGOpenVGRenderable::setOpacity
virtual void setOpacity(float opacity)
Definition
qsgopenvgrenderable.cpp:19
QPlatformGraphicsBufferHelper
\inmodule QtGui
qtdeclarative
src
plugins
scenegraph
openvg
qsgopenvgrenderable.cpp
Generated on
for Qt by
1.14.0