| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
|
| |
Usually, we have separate top-level example directories for
different modules, but since Qt Quick Shapes only had a single
example, it was categorized under examples/quick.
We now plan to add more, so to prepare for that, this sets up
the normal structure with an examples/quickshapes directory.
Pick-to: 6.7
Change-Id: I50016358b674c18bb2930459d4e0111862ddcedb
Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
| |
Drop the confusing alias mangling on all the QML files. Instead move
them into the base "shapes" directory. Also, use a QML module in CMake
and use the "shared" module as intended.
Pick-to: 6.2
Change-Id: I6a8fc3f2b2f86f58a54e188cf83ec7e2d4e8f468
Reviewed-by: Oliver Eftevaag <oliver.eftevaag@qt.io>
Reviewed-by: Andrei Golubev <andrei.golubev@qt.io>
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
For text rendering in Qt Quick, we currently have the limitation
that when rendering text at such a large size that the distance
fields start showing artifacts, the only option is to use
NativeRendering, which will look nice, but which will use a lot
of texture memory for the glyph cache, since it will actually
cache the glyphs at the requested size.
A suggested approach would be to fall back to using triangulated
paths when the font gets large enough, but the work on this was
never completed.
It turns out that we can get this now, basically for free, since
we already support rendering arbitrary QPainterPaths using
Qt Quick Shapes. The only thing missing is the ability to add
the path of a given text to the shape. This patch fills in that
gap.
Note that this is currently not supported by nvidia renderer.
[ChangeLog][QtQuick] Added PathText path element which can be
used together with Qt Quick Shapes to get text rendering that
does not cache glyphs in a texture, but triangulates the
outlines of the glyphs instead.
Change-Id: I436e1476b129b324cf7a54f89a1b18e0579e8185
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
QQuickItem::contains() only checks the Item's bounding box by default.
In the case of Shapes, that can be comically imprecise, but it's fast.
So we add a containsMode property to control whether we will do that
(the default) or actually check each of the QPainterPaths within to
see whether they contain the point (FillContains).
FillContains could be optimized later: use QRegion perhaps, or download
the rendered texture from the GPU and test whether the pixel at the
point is transparent. It may also be appropriate to add a StrokeContains
option.
The main motivation is to detect mouse (or touch) interaction within
a shaped area. QQuickSinglePointHandler::wantsEventPoint() already
checks whether its parent Item contains the event point. So if a
Shape has a TapHandler for example, it will respond only within the
visible bounds of the Shape rather than within the entire rectangular
bounding box as long as containsMode is set to FillContains.
Examples quick/shapes/content/tapableTriangle.qml and tiger.qml
are modified to react when a press occurs inside, and the former
is fixed to be able to run standalone via the qml runtime. The
latter has an offset issue when run standalone but is OK within
the shape gallery example.
As a drive-by optimization, QQuickShapePrivate's variables are
re-ordered by type so that the compiler can place the bools and
enums into bitfields; and to facilitate reordering, the
initialization is done C++11-style, in the header.
[ChangeLog][QtQuick][Shape] A containsMode property is added.
If it is set to FillContains, then Shape.contains() returns true
only within the visible bounds, so its Pointer Handlers also respond
only within those bounds.
Change-Id: I31c85a9b08aa6945c58dc07febfe89ffef21274b
Reviewed-by: Paolo Angelelli <paolo.angelelli@qt.io>
|
|
|
|
|
|
|
|
| |
QQuickShape used to be known as QQuickPathItem. Avoid the old
name in publicly exposed components.
Change-Id: I70bed142e1e82c48c496ab98384318e08fba99c7
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
|
|
|
|
|
|
| |
Task-number: QTBUG-61857
Change-Id: I580e503d8266a9dca69bb542c22228df4ff4bf94
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
|
|
Change-Id: I299354da0632fb0b8487cfb13748ed58b97d75fd
Reviewed-by: Andy Nichols <andy.nichols@qt.io>
|