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
qquick3dtexturedatafrontend.cpp
Go to the documentation of this file.
1// Copyright (C) 2023 The Qt Company Ltd.
2// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only
3
5#include <QSize>
6
8
145
146
151
153{
154 if (newFormat == QQuick3DTextureData::format())
155 return;
156
158
160}
161
166
168{
169 if (newDepth == QQuick3DTextureData::depth())
170 return;
171
172
174
176}
177
182
184{
185 if (newHasTransparency == QQuick3DTextureData::hasTransparency())
186 return;
187
188 QQuick3DTextureData::setHasTransparency(newHasTransparency);
189
191}
192
197
203
208
210{
211 const auto size = QQuick3DTextureData::size();
212
213 if (size.width() == newWidth)
214 return;
215
216 QQuick3DTextureData::setSize(QSize(newWidth, size.height()));
217
219}
220
225
227{
228 const auto size = QQuick3DTextureData::size();
229
230 if (size.height() == newHeight)
231 return;
232
233 QQuick3DTextureData::setSize(QSize(size.width(), newHeight));
234
236}
237
\inmodule QtCore
Definition qbytearray.h:57
void setTextureData(const QByteArray &newTextureData)
QQuick3DTextureDataFrontend()
\qmlproperty int ProceduralTextureData::width
void setFormat(const QQuick3DTextureData::Format &newFormat)
void setHasTransparency(bool newHasTransparency)
Format
Returns the color format of the texture data assigned in \l textureData property.
void setSize(const QSize &size)
Sets the size of the texture data in pixels.
void setTextureData(const QByteArray &data)
Sets the texture data.
void setDepth(int depth)
Sets the depth of the texture data in pixels.
void setHasTransparency(bool hasTransparency)
Set hasTransparency to true if the texture data has an active alpha channel with non-opaque values.
Format format() const
Returns the format of the texture data.
const QByteArray textureData() const
Returns the current texture data defined by this item.
QSize size() const
Returns the size of the texture data in pixels.
bool hasTransparency() const
Returns true if the texture data has transparency.
void setFormat(Format format)
Sets the format of the texture data.
int depth() const
Returns the depth of the texture data in pixels.
\inmodule QtCore
Definition qsize.h:25
constexpr int height() const noexcept
Returns the height.
Definition qsize.h:133
constexpr int width() const noexcept
Returns the width.
Definition qsize.h:130
Combined button and popup list for selecting options.
GLenum GLuint GLintptr GLsizeiptr size
[1]
#define Q_EMIT