Qt
Internal/Contributor docs for the Qt SDK. <b>Note:</b> These are NOT official API docs; those are found <a href='https://doc.qt.io/'>here</a>.
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
QOpenVGMatrix
Definition
qopenvgmatrix.h:14
QSGOpenVGRenderable::QSGOpenVGRenderable
QSGOpenVGRenderable()
Definition
qsgopenvgrenderable.cpp:8
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
QT_BEGIN_NAMESPACE
Combined button and popup list for selecting options.
Definition
qstandardpaths_haiku.cpp:21
QT_END_NAMESPACE
Definition
qsharedpointer.cpp:1590
values
GLenum GLsizei GLsizei GLint * values
[15]
Definition
qopengles2ext.h:1032
transform
GLuint GLenum GLenum transform
Definition
qopenglext.h:11564
qsgopenvgrenderable.h
qtdeclarative
src
plugins
scenegraph
openvg
qsgopenvgrenderable.cpp
Generated by
1.10.0