aboutsummaryrefslogtreecommitdiffstats
path: root/tests/manual
diff options
context:
space:
mode:
authorEskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>2014-08-26 10:52:22 +0200
committerEskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>2014-09-10 13:52:07 +0200
commita9238292145e05d36be7c35bdd50829c6400a3de (patch)
treed5bca3fa163215f7b4bb1cba63018da7492d91c9 /tests/manual
parentf9ee33f9683a4cd4d1a2e41efa6e8d124e9d731d (diff)
Fix pixel bleed in BorderImage
Keeping all patches of the border image in the same texture with different sample points can cause parts of the border to bleed over to the center patch. To rectify this, we create a separate texture for each of the nine patches we need, and separate image nodes. To avoid applying antialiasing on the interior edges of the border image, we introduce new antialiasing flags which can be used to specify precisely which edges of the image should be antialiased. [ChangeLog][BorderImage] Fixed possible pixel bleed between border patches and center patch in BorderImage. Change-Id: Icc292b3969217320eecca99e79675316c42eab08 Task-number: QTBUG-35838 Reviewed-by: Gunnar Sletta <gunnar@sletta.org>
Diffstat (limited to 'tests/manual')
-rw-r--r--tests/manual/scenegraph_lancelot/data/borderimages/borderimage_rotated_smoothed.qml34
-rw-r--r--tests/manual/scenegraph_lancelot/data/borderimages/borderimage_rotated_unsmoothed.qml34
-rw-r--r--tests/manual/scenegraph_lancelot/data/borderimages/borderimage_rotated_unsmoothed_border_overlap.qml31
-rw-r--r--tests/manual/scenegraph_lancelot/data/borderimages/borderimage_rotated_unsmoothed_negative_borders.qml34
-rw-r--r--tests/manual/scenegraph_lancelot/data/borderimages/borderimage_rotated_unsmoothed_no_borders.qml34
-rw-r--r--tests/manual/scenegraph_lancelot/data/borderimages/borderimage_rotated_unsmoothed_no_bottom.qml34
-rw-r--r--tests/manual/scenegraph_lancelot/data/borderimages/borderimage_rotated_unsmoothed_no_center.qml34
-rw-r--r--tests/manual/scenegraph_lancelot/data/borderimages/borderimage_rotated_unsmoothed_no_left.qml34
-rw-r--r--tests/manual/scenegraph_lancelot/data/borderimages/borderimage_rotated_unsmoothed_no_right.qml34
-rw-r--r--tests/manual/scenegraph_lancelot/data/borderimages/borderimage_rotated_unsmoothed_no_right_left.qml34
-rw-r--r--tests/manual/scenegraph_lancelot/data/borderimages/borderimage_rotated_unsmoothed_no_top.qml34
-rw-r--r--tests/manual/scenegraph_lancelot/data/borderimages/borderimage_rotated_unsmoothed_no_top_bottom.qml34
-rw-r--r--tests/manual/scenegraph_lancelot/data/shared/uniquepixels.pngbin0 -> 210 bytes
13 files changed, 405 insertions, 0 deletions
diff --git a/tests/manual/scenegraph_lancelot/data/borderimages/borderimage_rotated_smoothed.qml b/tests/manual/scenegraph_lancelot/data/borderimages/borderimage_rotated_smoothed.qml
new file mode 100644
index 0000000000..804567cf19
--- /dev/null
+++ b/tests/manual/scenegraph_lancelot/data/borderimages/borderimage_rotated_smoothed.qml
@@ -0,0 +1,34 @@
+import QtQuick 2.2
+
+Rectangle {
+ width: 320
+ height: 480
+
+ color: "red"
+
+ Item {
+ x: 80
+ y: 80
+
+ BorderImage {
+ source: "../shared/uniquepixels.png"
+
+ width: 8
+ height: 8
+
+ antialiasing: true
+
+ horizontalTileMode: BorderImage.Repeat
+ verticalTileMode: BorderImage.Repeat
+
+ smooth: true
+ rotation: 10
+ scale: 10
+
+ border.bottom: 1
+ border.left: 1
+ border.right: 1
+ border.top: 1
+ }
+ }
+}
diff --git a/tests/manual/scenegraph_lancelot/data/borderimages/borderimage_rotated_unsmoothed.qml b/tests/manual/scenegraph_lancelot/data/borderimages/borderimage_rotated_unsmoothed.qml
new file mode 100644
index 0000000000..b10554ad66
--- /dev/null
+++ b/tests/manual/scenegraph_lancelot/data/borderimages/borderimage_rotated_unsmoothed.qml
@@ -0,0 +1,34 @@
+import QtQuick 2.2
+
+Rectangle {
+ width: 320
+ height: 480
+
+ color: "red"
+
+ Item {
+ x: 80
+ y: 80
+
+ BorderImage {
+ source: "../shared/uniquepixels.png"
+
+ width: 8
+ height: 8
+
+ antialiasing: true
+
+ horizontalTileMode: BorderImage.Repeat
+ verticalTileMode: BorderImage.Repeat
+
+ smooth: false
+ rotation: 10
+ scale: 10
+
+ border.bottom: 1
+ border.left: 1
+ border.right: 1
+ border.top: 1
+ }
+ }
+}
diff --git a/tests/manual/scenegraph_lancelot/data/borderimages/borderimage_rotated_unsmoothed_border_overlap.qml b/tests/manual/scenegraph_lancelot/data/borderimages/borderimage_rotated_unsmoothed_border_overlap.qml
new file mode 100644
index 0000000000..73cc53ed2b
--- /dev/null
+++ b/tests/manual/scenegraph_lancelot/data/borderimages/borderimage_rotated_unsmoothed_border_overlap.qml
@@ -0,0 +1,31 @@
+import QtQuick 2.2
+
+Rectangle {
+ width: 320
+ height: 480
+
+ color: "red"
+
+ Item {
+ x: 80
+ y: 80
+
+ BorderImage {
+ source: "../shared/uniquepixels.png"
+
+ antialiasing: true
+
+ horizontalTileMode: BorderImage.Repeat
+ verticalTileMode: BorderImage.Repeat
+
+ smooth: false
+ rotation: 10
+ scale: 10
+
+ border.bottom: 0
+ border.left: 3
+ border.right: 3
+ border.top: 0
+ }
+ }
+}
diff --git a/tests/manual/scenegraph_lancelot/data/borderimages/borderimage_rotated_unsmoothed_negative_borders.qml b/tests/manual/scenegraph_lancelot/data/borderimages/borderimage_rotated_unsmoothed_negative_borders.qml
new file mode 100644
index 0000000000..8356f02614
--- /dev/null
+++ b/tests/manual/scenegraph_lancelot/data/borderimages/borderimage_rotated_unsmoothed_negative_borders.qml
@@ -0,0 +1,34 @@
+import QtQuick 2.2
+
+Rectangle {
+ width: 320
+ height: 480
+
+ color: "red"
+
+ Item {
+ x: 80
+ y: 80
+
+ BorderImage {
+ source: "../shared/uniquepixels.png"
+
+ width: 8
+ height: 8
+
+ antialiasing: true
+
+ horizontalTileMode: BorderImage.Repeat
+ verticalTileMode: BorderImage.Repeat
+
+ smooth: false
+ rotation: 10
+ scale: 10
+
+ border.bottom: -1
+ border.left: -1
+ border.right: -1
+ border.top: -1
+ }
+ }
+}
diff --git a/tests/manual/scenegraph_lancelot/data/borderimages/borderimage_rotated_unsmoothed_no_borders.qml b/tests/manual/scenegraph_lancelot/data/borderimages/borderimage_rotated_unsmoothed_no_borders.qml
new file mode 100644
index 0000000000..9213589648
--- /dev/null
+++ b/tests/manual/scenegraph_lancelot/data/borderimages/borderimage_rotated_unsmoothed_no_borders.qml
@@ -0,0 +1,34 @@
+import QtQuick 2.2
+
+Rectangle {
+ width: 320
+ height: 480
+
+ color: "red"
+
+ Item {
+ x: 80
+ y: 80
+
+ BorderImage {
+ source: "../shared/uniquepixels.png"
+
+ width: 8
+ height: 8
+
+ antialiasing: true
+
+ horizontalTileMode: BorderImage.Repeat
+ verticalTileMode: BorderImage.Repeat
+
+ smooth: false
+ rotation: 10
+ scale: 10
+
+ border.bottom: 0
+ border.left: 0
+ border.right: 0
+ border.top: 0
+ }
+ }
+}
diff --git a/tests/manual/scenegraph_lancelot/data/borderimages/borderimage_rotated_unsmoothed_no_bottom.qml b/tests/manual/scenegraph_lancelot/data/borderimages/borderimage_rotated_unsmoothed_no_bottom.qml
new file mode 100644
index 0000000000..615abdee20
--- /dev/null
+++ b/tests/manual/scenegraph_lancelot/data/borderimages/borderimage_rotated_unsmoothed_no_bottom.qml
@@ -0,0 +1,34 @@
+import QtQuick 2.2
+
+Rectangle {
+ width: 320
+ height: 480
+
+ color: "red"
+
+ Item {
+ x: 80
+ y: 80
+
+ BorderImage {
+ source: "../shared/uniquepixels.png"
+
+ width: 8
+ height: 8
+
+ antialiasing: true
+
+ horizontalTileMode: BorderImage.Repeat
+ verticalTileMode: BorderImage.Repeat
+
+ smooth: false
+ rotation: 10
+ scale: 10
+
+ border.bottom: 0
+ border.left: 1
+ border.right: 1
+ border.top: 1
+ }
+ }
+}
diff --git a/tests/manual/scenegraph_lancelot/data/borderimages/borderimage_rotated_unsmoothed_no_center.qml b/tests/manual/scenegraph_lancelot/data/borderimages/borderimage_rotated_unsmoothed_no_center.qml
new file mode 100644
index 0000000000..58ed4d44dc
--- /dev/null
+++ b/tests/manual/scenegraph_lancelot/data/borderimages/borderimage_rotated_unsmoothed_no_center.qml
@@ -0,0 +1,34 @@
+import QtQuick 2.2
+
+Rectangle {
+ width: 320
+ height: 480
+
+ color: "red"
+
+ Item {
+ x: 80
+ y: 80
+
+ BorderImage {
+ source: "../shared/uniquepixels.png"
+
+ width: 8
+ height: 8
+
+ antialiasing: true
+
+ horizontalTileMode: BorderImage.Repeat
+ verticalTileMode: BorderImage.Repeat
+
+ smooth: false
+ rotation: 10
+ scale: 10
+
+ border.bottom: 4
+ border.left: 4
+ border.right: 4
+ border.top: 4
+ }
+ }
+}
diff --git a/tests/manual/scenegraph_lancelot/data/borderimages/borderimage_rotated_unsmoothed_no_left.qml b/tests/manual/scenegraph_lancelot/data/borderimages/borderimage_rotated_unsmoothed_no_left.qml
new file mode 100644
index 0000000000..7e0045bf24
--- /dev/null
+++ b/tests/manual/scenegraph_lancelot/data/borderimages/borderimage_rotated_unsmoothed_no_left.qml
@@ -0,0 +1,34 @@
+import QtQuick 2.2
+
+Rectangle {
+ width: 320
+ height: 480
+
+ color: "red"
+
+ Item {
+ x: 80
+ y: 80
+
+ BorderImage {
+ source: "../shared/uniquepixels.png"
+
+ width: 8
+ height: 8
+
+ antialiasing: true
+
+ horizontalTileMode: BorderImage.Repeat
+ verticalTileMode: BorderImage.Repeat
+
+ smooth: false
+ rotation: 10
+ scale: 10
+
+ border.bottom: 1
+ border.left: 0
+ border.right: 1
+ border.top: 1
+ }
+ }
+}
diff --git a/tests/manual/scenegraph_lancelot/data/borderimages/borderimage_rotated_unsmoothed_no_right.qml b/tests/manual/scenegraph_lancelot/data/borderimages/borderimage_rotated_unsmoothed_no_right.qml
new file mode 100644
index 0000000000..04c2d021f0
--- /dev/null
+++ b/tests/manual/scenegraph_lancelot/data/borderimages/borderimage_rotated_unsmoothed_no_right.qml
@@ -0,0 +1,34 @@
+import QtQuick 2.2
+
+Rectangle {
+ width: 320
+ height: 480
+
+ color: "red"
+
+ Item {
+ x: 80
+ y: 80
+
+ BorderImage {
+ source: "../shared/uniquepixels.png"
+
+ width: 8
+ height: 8
+
+ antialiasing: true
+
+ horizontalTileMode: BorderImage.Repeat
+ verticalTileMode: BorderImage.Repeat
+
+ smooth: false
+ rotation: 10
+ scale: 10
+
+ border.bottom: 1
+ border.left: 1
+ border.right: 0
+ border.top: 1
+ }
+ }
+}
diff --git a/tests/manual/scenegraph_lancelot/data/borderimages/borderimage_rotated_unsmoothed_no_right_left.qml b/tests/manual/scenegraph_lancelot/data/borderimages/borderimage_rotated_unsmoothed_no_right_left.qml
new file mode 100644
index 0000000000..5210bab321
--- /dev/null
+++ b/tests/manual/scenegraph_lancelot/data/borderimages/borderimage_rotated_unsmoothed_no_right_left.qml
@@ -0,0 +1,34 @@
+import QtQuick 2.2
+
+Rectangle {
+ width: 320
+ height: 480
+
+ color: "red"
+
+ Item {
+ x: 80
+ y: 80
+
+ BorderImage {
+ source: "../shared/uniquepixels.png"
+
+ width: 8
+ height: 8
+
+ antialiasing: true
+
+ horizontalTileMode: BorderImage.Repeat
+ verticalTileMode: BorderImage.Repeat
+
+ smooth: false
+ rotation: 10
+ scale: 10
+
+ border.bottom: 1
+ border.left: 0
+ border.right: 0
+ border.top: 1
+ }
+ }
+}
diff --git a/tests/manual/scenegraph_lancelot/data/borderimages/borderimage_rotated_unsmoothed_no_top.qml b/tests/manual/scenegraph_lancelot/data/borderimages/borderimage_rotated_unsmoothed_no_top.qml
new file mode 100644
index 0000000000..2e89496c92
--- /dev/null
+++ b/tests/manual/scenegraph_lancelot/data/borderimages/borderimage_rotated_unsmoothed_no_top.qml
@@ -0,0 +1,34 @@
+import QtQuick 2.2
+
+Rectangle {
+ width: 320
+ height: 480
+
+ color: "red"
+
+ Item {
+ x: 80
+ y: 80
+
+ BorderImage {
+ source: "../shared/uniquepixels.png"
+
+ width: 8
+ height: 8
+
+ antialiasing: true
+
+ horizontalTileMode: BorderImage.Repeat
+ verticalTileMode: BorderImage.Repeat
+
+ smooth: false
+ rotation: 10
+ scale: 10
+
+ border.bottom: 1
+ border.left: 1
+ border.right: 1
+ border.top: 0
+ }
+ }
+}
diff --git a/tests/manual/scenegraph_lancelot/data/borderimages/borderimage_rotated_unsmoothed_no_top_bottom.qml b/tests/manual/scenegraph_lancelot/data/borderimages/borderimage_rotated_unsmoothed_no_top_bottom.qml
new file mode 100644
index 0000000000..4388601f13
--- /dev/null
+++ b/tests/manual/scenegraph_lancelot/data/borderimages/borderimage_rotated_unsmoothed_no_top_bottom.qml
@@ -0,0 +1,34 @@
+import QtQuick 2.2
+
+Rectangle {
+ width: 320
+ height: 480
+
+ color: "red"
+
+ Item {
+ x: 80
+ y: 80
+
+ BorderImage {
+ source: "../shared/uniquepixels.png"
+
+ width: 8
+ height: 8
+
+ antialiasing: true
+
+ horizontalTileMode: BorderImage.Repeat
+ verticalTileMode: BorderImage.Repeat
+
+ smooth: false
+ rotation: 10
+ scale: 10
+
+ border.bottom: 0
+ border.left: 1
+ border.right: 1
+ border.top: 0
+ }
+ }
+}
diff --git a/tests/manual/scenegraph_lancelot/data/shared/uniquepixels.png b/tests/manual/scenegraph_lancelot/data/shared/uniquepixels.png
new file mode 100644
index 0000000000..af240b09c3
--- /dev/null
+++ b/tests/manual/scenegraph_lancelot/data/shared/uniquepixels.png
Binary files differ