aboutsummaryrefslogtreecommitdiffstats
path: root/src/quick/scenegraph/util/qsgdefaultrectanglenode.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Fix QSGDefaultRectangleNode::color() always returning invalidDheerendra Purohit2025-07-281-0/+1
| | | | | | | | | | | setColor() updated geometry colors but did not assign the input color to m_color. This caused color() to always return an invalid QColor. Fixed by assigning m_color = color in setColor(). Pick-to: 6.10 6.9 Fixes: QTBUG-138358 Change-Id: Icb00d26e624b7437d48253a3f7ea0dd64e68baf8 Reviewed-by: Andy Nichols <andy.nichols@qt.io>
* Use SPDX license identifiersLucie Gérard2022-06-111-38/+2
| | | | | | | | | | | | Replace the current license disclaimer in files by a SPDX-License-Identifier. Files that have to be modified by hand are modified. License files are organized under LICENSES directory. Pick-to: 6.4 Task-number: QTBUG-67283 Change-Id: I63563bbeb6f60f89d2c99660400dca7fab78a294 Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* Avoid unnecessary color format conversionJiDe Zhang2021-10-291-5/+6
| | | | | | | | | | | | If a color is not the rgb format, when QColor::red() QColor::blue() QColor::green() is used continuously to obtain the values of different channels, three times color conversions will occur. Therefore, use QColor::toRgb() before that to ensure that only one conversion is performed at most. Not only rgb, the conversion of other formats is the same. Change-Id: Ia969e1ca6f1524ad5d7e8dec915bcbc407875c66 Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* Fix undefined painting of white QSGRectangleAllan Sandfeld Jensen2016-07-111-1/+1
| | | | | | | | | Since the default color was white, and the colored points are not set when the color doesn't change, the points ended up being undefined for default white QSGRectangle. Change-Id: I942515582e9e2edc81de42036fd2ed558fa5a9d8 Reviewed-by: Andy Nichols <andy.nichols@qt.io>
* Add cross-backend simple rect, texture, and ninepatch nodesLaszlo Agocs2016-06-221-0/+95
QSGSimpleRectNode is deprecated -> use QSGRectangleNode via QQuickWindow::createRectangleNode() instead. QSGSimpleTextureNode is deprecated -> use QSGImageNode via QQuickWindow::createImageNode() instead. The OpenGL version of the simple rectangle node is switched over to the vertex color material instead of flat, to allow for better batching. Use the same concept for nine patch nodes. The "style" node from Quick Controls 1 is now QSGNinePatchNode in order to provide a proper cross-backend solution which is already necessary due to the software backend, but now generalize it to apply to the accelerated backends with proper materials as well. QC can now simply call createNinePatchNode() without further ado. Also fixes a bug with the D3D12 texture material not enabling blending when needed. When it comes to the internal class names, QSGRectangleNode and QSGImageNode get the Internal prefix in the adaptation layer in order to differentiate from the public API. This involves quite a lot of renaming, but results in a nice and clean public API. Change-Id: Iddf9f9412377843ea6d652bcf25e68d1d74659ea Reviewed-by: Gunnar Sletta <gunnar@sletta.org>