Canvas2D: Add API into brush types


Add API that matches to Canvas Painter C++ API into brush QML types.
Only difference is that imagepattern is missing image() and setImage()
methods, because there is no matching QCanvasImage in Canvas2D. So for
image patterns, createPattern() still needs to be always called with
image as a string. Created ticket QTBUG-146874 to solve this.

Add lancelot test utilizing the APIs.

Change-Id: I16d0beface411827612d3da183b3acbc8cca586e
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
commitabe0cf87f69be7c73626452ee8d8769d3e4e4bda
parentd37bed317ee8c81b250219d27ed04c76692a875a
authorKaj Grönholm <kaj.gronholm@qt.io>
committerKaj Grönholm <kaj.gronholm@qt.io>
commit timeWed, 20 May 2026 09:06:01 +0000