Fix vertex count assert in rounded Rectangle with gradient
When a rounded Rectangle with a gradient got very small (e.g. height
animating towards 0), the minimal inner radius could cover the whole
gradient length. Gradient stops counted in vertexCount were then never
reached and never inserted, which triggered
Q_ASSERT(index == vertexCount).
Insert all remaining gradient stops before the last vertex, and keep
the inserted vertices and their interpolation within the current
segment.
Assisted-by: Claude Code
Pick-to: 6.12 6.11 6.8
Task-number: QTBUG-151367
Change-Id: I9b0eedbbc795c8b44fe1cfc701de923e531b12d9
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>