Update usage of smooth and antialiasing.
Change-Id: Icc8b28bdd466389ed3f269f076f1bdb6e9abe3f2 Reviewed-by: Yunqiao Yin <charles.yin@nokia.com> Reviewed-by: Bea Lam <bea.lam@nokia.com>
This commit is contained in:
parent
c2f2ae8ce9
commit
3912bbacea
|
@ -88,7 +88,6 @@ Item {
|
|||
Image {
|
||||
x: 92.5; y: 27
|
||||
source: "hour.png"
|
||||
smooth: true
|
||||
transform: Rotation {
|
||||
id: hourRotation
|
||||
origin.x: 7.5; origin.y: 73;
|
||||
|
@ -102,7 +101,6 @@ Item {
|
|||
Image {
|
||||
x: 93.5; y: 17
|
||||
source: "minute.png"
|
||||
smooth: true
|
||||
transform: Rotation {
|
||||
id: minuteRotation
|
||||
origin.x: 6.5; origin.y: 83;
|
||||
|
@ -116,7 +114,6 @@ Item {
|
|||
Image {
|
||||
x: 97.5; y: 20
|
||||
source: "second.png"
|
||||
smooth: true
|
||||
transform: Rotation {
|
||||
id: secondRotation
|
||||
origin.x: 2.5; origin.y: 80;
|
||||
|
|
|
@ -1,52 +0,0 @@
|
|||
/****************************************************************************
|
||||
**
|
||||
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
|
||||
** Contact: http://www.qt-project.org/
|
||||
**
|
||||
** This file is part of the examples of the Qt Toolkit.
|
||||
**
|
||||
** $QT_BEGIN_LICENSE:BSD$
|
||||
** You may use this file under the terms of the BSD license as follows:
|
||||
**
|
||||
** "Redistribution and use in source and binary forms, with or without
|
||||
** modification, are permitted provided that the following conditions are
|
||||
** met:
|
||||
** * Redistributions of source code must retain the above copyright
|
||||
** notice, this list of conditions and the following disclaimer.
|
||||
** * Redistributions in binary form must reproduce the above copyright
|
||||
** notice, this list of conditions and the following disclaimer in
|
||||
** the documentation and/or other materials provided with the
|
||||
** distribution.
|
||||
** * Neither the name of Nokia Corporation and its Subsidiary(-ies) nor
|
||||
** the names of its contributors may be used to endorse or promote
|
||||
** products derived from this software without specific prior written
|
||||
** permission.
|
||||
**
|
||||
** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
||||
** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
||||
** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
||||
** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||
** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||
** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
|
||||
**
|
||||
** $QT_END_LICENSE$
|
||||
**
|
||||
****************************************************************************/
|
||||
|
||||
import QtQuick 2.0
|
||||
Image {
|
||||
source: "quit.png"
|
||||
scale: quitMouse.pressed ? 0.8 : 1.0
|
||||
smooth: quitMouse.pressed
|
||||
MouseArea {
|
||||
id: quitMouse
|
||||
anchors.fill: parent
|
||||
anchors.margins: -10
|
||||
onClicked: Qt.quit()
|
||||
}
|
||||
}
|
|
@ -61,7 +61,6 @@ Item {
|
|||
source: "gfx/cloud.png"
|
||||
alphaVariation: 0.25
|
||||
opacity: 0.25
|
||||
smooth: true
|
||||
}
|
||||
|
||||
Wander {
|
||||
|
|
|
@ -63,7 +63,6 @@ Item {
|
|||
anchors.fill: parent
|
||||
source: "content/gfx/catch.png"
|
||||
opacity: 0.25
|
||||
smooth: true
|
||||
}
|
||||
|
||||
Wander {
|
||||
|
|
|
@ -52,18 +52,18 @@ Item {
|
|||
|
||||
BorderImage {
|
||||
anchors { fill: container; leftMargin: -6; topMargin: -6; rightMargin: -8; bottomMargin: -8 }
|
||||
source: 'images/box-shadow.png'; smooth: true
|
||||
source: 'images/box-shadow.png'
|
||||
border.left: 10; border.top: 10; border.right: 10; border.bottom: 10
|
||||
}
|
||||
|
||||
Image { anchors.fill: parent; source: "images/cardboard.png"; smooth: true }
|
||||
Image { anchors.fill: parent; source: "images/cardboard.png"; antialiasing: true }
|
||||
|
||||
Rectangle {
|
||||
anchors.fill: container; color: container.tint; visible: container.tint != ""
|
||||
opacity: 0.25; smooth: true
|
||||
opacity: 0.25
|
||||
}
|
||||
|
||||
Text { id: labelText; font.pixelSize: 15; anchors.centerIn: parent; smooth: true }
|
||||
Text { id: labelText; font.pixelSize: 15; anchors.centerIn: parent }
|
||||
|
||||
MouseArea {
|
||||
anchors { fill: parent; leftMargin: -20; topMargin: -20; rightMargin: -20; bottomMargin: -20 }
|
||||
|
|
|
@ -51,14 +51,14 @@ Item {
|
|||
|
||||
BorderImage {
|
||||
anchors { fill: container; leftMargin: -6; topMargin: -6; rightMargin: -8; bottomMargin: -8 }
|
||||
source: 'images/box-shadow.png'; smooth: true
|
||||
source: 'images/box-shadow.png';
|
||||
border.left: 10; border.top: 10; border.right: 10; border.bottom: 10
|
||||
}
|
||||
|
||||
Image { anchors.fill: parent; source: "images/cardboard.png"; smooth: true }
|
||||
Image { anchors.fill: parent; source: "images/cardboard.png"; antialiasing: true }
|
||||
|
||||
TextInput {
|
||||
id: textInput; text: label; font.pixelSize: 15; anchors.centerIn: parent; smooth: true
|
||||
id: textInput; text: label; font.pixelSize: 15; anchors.centerIn: parent
|
||||
Keys.onReturnPressed: {
|
||||
container.label = textInput.text
|
||||
container.focus = true
|
||||
|
@ -75,7 +75,7 @@ Item {
|
|||
|
||||
Rectangle {
|
||||
anchors.fill: container; border.color: "steelblue"; border.width: 4
|
||||
color: "transparent"; visible: textInput.focus; smooth: true
|
||||
color: "transparent"; visible: textInput.focus; antialiasing: true
|
||||
}
|
||||
|
||||
MouseArea {
|
||||
|
|
|
@ -64,7 +64,7 @@ Package {
|
|||
fill: originalImage.status == Image.Ready ? border : placeHolder
|
||||
leftMargin: -6; topMargin: -6; rightMargin: -8; bottomMargin: -8
|
||||
}
|
||||
source: 'images/box-shadow.png'; smooth: true
|
||||
source: 'images/box-shadow.png'
|
||||
border.left: 10; border.top: 10; border.right: 10; border.bottom: 10
|
||||
}
|
||||
Rectangle {
|
||||
|
@ -74,25 +74,26 @@ Package {
|
|||
property int h: Script.getHeight(content)
|
||||
property double s: Script.calculateScale(w, h, photoWrapper.width)
|
||||
|
||||
color: 'white'; anchors.centerIn: parent; smooth: true
|
||||
color: 'white'; anchors.centerIn: parent; antialiasing: true
|
||||
width: w * s; height: h * s; visible: originalImage.status != Image.Ready
|
||||
Rectangle {
|
||||
color: "#878787"; smooth: true
|
||||
color: "#878787"; antialiasing: true
|
||||
anchors { fill: parent; topMargin: 3; bottomMargin: 3; leftMargin: 3; rightMargin: 3 }
|
||||
}
|
||||
}
|
||||
Rectangle {
|
||||
id: border; color: 'white'; anchors.centerIn: parent; smooth: true
|
||||
id: border; color: 'white'; anchors.centerIn: parent; antialiasing: true
|
||||
width: originalImage.paintedWidth + 6; height: originalImage.paintedHeight + 6
|
||||
visible: !placeHolder.visible
|
||||
}
|
||||
BusyIndicator { anchors.centerIn: parent; on: originalImage.status != Image.Ready }
|
||||
Image {
|
||||
id: originalImage; smooth: true; source: "http://" + Script.getImagePath(content); cache: false
|
||||
id: originalImage; antialiasing: true;
|
||||
source: "http://" + Script.getImagePath(content); cache: false
|
||||
fillMode: Image.PreserveAspectFit; width: photoWrapper.width; height: photoWrapper.height
|
||||
}
|
||||
Image {
|
||||
id: hqImage; smooth: true; source: ""; visible: false; cache: false
|
||||
id: hqImage; antialiasing: true; source: ""; visible: false; cache: false
|
||||
fillMode: Image.PreserveAspectFit; width: photoWrapper.width; height: photoWrapper.height
|
||||
}
|
||||
Binding {
|
||||
|
|
|
@ -55,7 +55,6 @@ Item {
|
|||
source: "../../images/finalfrontier.png"
|
||||
transformOrigin: Item.Center
|
||||
anchors.centerIn: parent
|
||||
smooth: true
|
||||
NumberAnimation on rotation {
|
||||
from: 0
|
||||
to: 360
|
||||
|
@ -137,7 +136,6 @@ Item {
|
|||
Image {
|
||||
id: rocketShip
|
||||
source: "../../images/rocket.png"
|
||||
smooth: true
|
||||
anchors.centerIn: holder
|
||||
rotation: (circle.percent+0.25) * 360
|
||||
z: 2
|
||||
|
|
|
@ -87,13 +87,11 @@ Rectangle {
|
|||
//! [vertex]
|
||||
property variant source: theSource
|
||||
property variant blurred: ShaderEffectSource {
|
||||
smooth: true
|
||||
sourceItem: ShaderEffect {
|
||||
width: theItem.width
|
||||
height: theItem.height
|
||||
property variant delta: Qt.size(0.0, 1.0 / height)
|
||||
property variant source: ShaderEffectSource {
|
||||
smooth: true
|
||||
sourceItem: ShaderEffect {
|
||||
width: theItem.width
|
||||
height: theItem.height
|
||||
|
|
|
@ -68,6 +68,7 @@ import "../../../modelviews/listview/content"
|
|||
color: "ivory"
|
||||
border.color: "orange"
|
||||
radius: 5
|
||||
antialiasing: true
|
||||
}
|
||||
Image {
|
||||
anchors.fill:parent
|
||||
|
|
|
@ -200,6 +200,7 @@ Item {
|
|||
Rectangle {
|
||||
id: container
|
||||
border.width: 2
|
||||
antialiasing: true
|
||||
property real myRand: Math.random();//'depth'
|
||||
z: Math.floor(myRand * 100)
|
||||
scale: (myRand + 1.0)/2;
|
||||
|
@ -221,7 +222,8 @@ Item {
|
|||
Image {
|
||||
id: img
|
||||
anchors.centerIn: parent
|
||||
smooth: true; source: "http://" + Script.getImagePath(content); cache: true
|
||||
antialiasing: true;
|
||||
source: "http://" + Script.getImagePath(content); cache: true
|
||||
fillMode: Image.PreserveAspectFit;
|
||||
width: parent.width-4; height: parent.height-4
|
||||
onStatusChanged: if (img.status == Image.Ready) {
|
||||
|
|
|
@ -49,7 +49,7 @@ Rectangle {
|
|||
height: text.height + 10; width: text.width + 20
|
||||
border.width: 1
|
||||
radius: 4
|
||||
smooth: true
|
||||
antialiasing: true
|
||||
|
||||
gradient: Gradient {
|
||||
GradientStop {
|
||||
|
|
|
@ -52,7 +52,6 @@ Image {
|
|||
source: image
|
||||
opacity: onLand ? 1 : 0.25
|
||||
scale: Math.max((y + height - 250) * 0.01, 0.3)
|
||||
smooth: true
|
||||
|
||||
onCreatedChanged: {
|
||||
if (created && !onLand)
|
||||
|
|
|
@ -54,7 +54,6 @@ Rectangle {
|
|||
Image {
|
||||
x: 92.5; y: 27
|
||||
source: "hour.png"
|
||||
smooth: true
|
||||
transform: Rotation {
|
||||
id: hourRotation
|
||||
origin.x: 7.5; origin.y: 73;
|
||||
|
@ -68,7 +67,6 @@ Rectangle {
|
|||
Image {
|
||||
x: 93.5; y: 17
|
||||
source: "minute.png"
|
||||
smooth: true
|
||||
transform: Rotation {
|
||||
id: minuteRotation
|
||||
origin.x: 6.5; origin.y: 83;
|
||||
|
|
|
@ -55,7 +55,7 @@ Rectangle {
|
|||
anchors.horizontalCenter: parent.horizontalCenter; anchors.bottom: parent.bottom; anchors.margins: 10
|
||||
width: buttonText.width + 10; height: buttonText.height + 10
|
||||
border.width: mouseArea.pressed ? 2 : 1
|
||||
radius : 5; smooth: true
|
||||
radius : 5; antialiasing: true
|
||||
|
||||
Text { id: buttonText; anchors.centerIn: parent; text: "Request data.xml" }
|
||||
|
||||
|
|
|
@ -66,13 +66,14 @@ Rectangle {
|
|||
border.width: 2
|
||||
border.color: "black";
|
||||
radius: 10
|
||||
antialiasing: true
|
||||
|
||||
Text {
|
||||
id: buttonText
|
||||
text: parent.description
|
||||
anchors.centerIn: parent
|
||||
font.pixelSize: parent.height * .5
|
||||
style: Text.Sunken; color: "white"; styleColor: "black"; smooth: true
|
||||
style: Text.Sunken; color: "white"; styleColor: "black"
|
||||
}
|
||||
|
||||
MouseArea {
|
||||
|
|
|
@ -1,52 +0,0 @@
|
|||
/****************************************************************************
|
||||
**
|
||||
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
|
||||
** Contact: http://www.qt-project.org/
|
||||
**
|
||||
** This file is part of the examples of the Qt Toolkit.
|
||||
**
|
||||
** $QT_BEGIN_LICENSE:BSD$
|
||||
** You may use this file under the terms of the BSD license as follows:
|
||||
**
|
||||
** "Redistribution and use in source and binary forms, with or without
|
||||
** modification, are permitted provided that the following conditions are
|
||||
** met:
|
||||
** * Redistributions of source code must retain the above copyright
|
||||
** notice, this list of conditions and the following disclaimer.
|
||||
** * Redistributions in binary form must reproduce the above copyright
|
||||
** notice, this list of conditions and the following disclaimer in
|
||||
** the documentation and/or other materials provided with the
|
||||
** distribution.
|
||||
** * Neither the name of Nokia Corporation and its Subsidiary(-ies) nor
|
||||
** the names of its contributors may be used to endorse or promote
|
||||
** products derived from this software without specific prior written
|
||||
** permission.
|
||||
**
|
||||
** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
||||
** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
||||
** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
||||
** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||
** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||
** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
|
||||
**
|
||||
** $QT_END_LICENSE$
|
||||
**
|
||||
****************************************************************************/
|
||||
|
||||
import QtQuick 2.0
|
||||
Image {
|
||||
source: "quit.png"
|
||||
scale: quitMouse.pressed ? 0.8 : 1.0
|
||||
smooth: quitMouse.pressed
|
||||
MouseArea {
|
||||
id: quitMouse
|
||||
anchors.fill: parent
|
||||
anchors.margins: -10
|
||||
onClicked: Qt.quit()
|
||||
}
|
||||
}
|
Binary file not shown.
Before Width: | Height: | Size: 583 B |
|
@ -39,7 +39,6 @@
|
|||
****************************************************************************/
|
||||
|
||||
import QtQuick 2.0
|
||||
import "content"
|
||||
|
||||
Rectangle {
|
||||
id: window
|
||||
|
@ -104,20 +103,20 @@ Rectangle {
|
|||
|
||||
Rectangle {
|
||||
id: slot1; color: "#121212"; x: 30; height: 46; width: 46
|
||||
border.color: "#343434"; border.width: 1; radius: 12
|
||||
border.color: "#343434"; border.width: 1; radius: 12; antialiasing: true
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
}
|
||||
|
||||
Rectangle {
|
||||
id: slot2; color: "#121212"; x: window.width - 76; height: 46; width: 46
|
||||
border.color: "#343434"; border.width: 1; radius: 12
|
||||
border.color: "#343434"; border.width: 1; radius: 12; antialiasing: true
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
}
|
||||
|
||||
Rectangle {
|
||||
id: rect; x: 30; color: "#454545"
|
||||
border.color: "White"; border.width: 2
|
||||
height: 46; width: 46; radius: 12
|
||||
height: 46; width: 46; radius: 12; antialiasing: true
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
|
||||
MouseArea {
|
||||
|
|
|
@ -48,7 +48,7 @@ Rectangle {
|
|||
Canvas {
|
||||
id: canvas
|
||||
anchors.fill: parent
|
||||
smooth: true
|
||||
antialiasing: true
|
||||
|
||||
onPaint: {
|
||||
var context = canvas.getContext("2d")
|
||||
|
@ -97,7 +97,7 @@ Rectangle {
|
|||
x: 25; y: 25
|
||||
width: 50; height: 50
|
||||
border.width: 1
|
||||
smooth: true
|
||||
antialiasing: true
|
||||
|
||||
Text {
|
||||
anchors.centerIn: parent
|
||||
|
|
|
@ -48,7 +48,7 @@ Rectangle {
|
|||
Canvas {
|
||||
id: canvas
|
||||
anchors.fill: parent
|
||||
smooth: true
|
||||
antialiasing: true
|
||||
|
||||
onPaint: {
|
||||
var context = canvas.getContext("2d")
|
||||
|
@ -97,7 +97,7 @@ Rectangle {
|
|||
|
||||
width: 50; height: 50
|
||||
border.width: 1
|
||||
smooth: true
|
||||
antialiasing: true
|
||||
|
||||
//bind our attributes to follow the path as progress changes
|
||||
x: motionPath.x
|
||||
|
|
|
@ -63,8 +63,7 @@ Item {
|
|||
property real scaleX : scaleXCtrl.value
|
||||
property real scaleY : scaleYCtrl.value
|
||||
property real rotate : rotateCtrl.value
|
||||
smooth:true
|
||||
|
||||
antialiasing: true
|
||||
|
||||
Behavior on scaleX { SpringAnimation { spring: 2; damping: 0.2; loops:Animation.Infinite } }
|
||||
Behavior on scaleY { SpringAnimation { spring: 2; damping: 0.2; loops:Animation.Infinite} }
|
||||
|
|
|
@ -64,7 +64,7 @@ Item {
|
|||
property real py:yCtrl.value
|
||||
property real alpha:alphaCtrl.value
|
||||
property string imagefile:"../contents/qt-logo.png"
|
||||
smooth:true
|
||||
antialiasing: true
|
||||
Component.onCompleted:loadImage(canvas.imagefile);
|
||||
|
||||
onAlphaChanged:requestPaint();
|
||||
|
|
|
@ -63,7 +63,7 @@ Item {
|
|||
property real scaleX : scaleXCtrl.value
|
||||
property real scaleY : scaleYCtrl.value
|
||||
property real rotate : rotateCtrl.value
|
||||
smooth:true
|
||||
antialiasing: true
|
||||
|
||||
onLineWidthChanged:requestPaint();
|
||||
onFillChanged:requestPaint();
|
||||
|
|
|
@ -53,7 +53,7 @@ Item {
|
|||
id:canvas
|
||||
width:320
|
||||
height:280
|
||||
smooth:true
|
||||
antialiasing: true
|
||||
|
||||
property int radius: rCtrl.value
|
||||
property int rectx: rxCtrl.value
|
||||
|
|
|
@ -54,7 +54,7 @@ Item {
|
|||
id:canvas
|
||||
width:320
|
||||
height:280
|
||||
smooth:true
|
||||
antialiasing: true
|
||||
|
||||
property string strokeStyle:"green"
|
||||
property string fillStyle:"yellow"
|
||||
|
|
|
@ -59,7 +59,7 @@ Item {
|
|||
id:canvas
|
||||
width:320
|
||||
height:250
|
||||
smooth:true
|
||||
antialiasing: true
|
||||
|
||||
property string strokeStyle:"blue"
|
||||
property string fillStyle:"steelblue"
|
||||
|
|
|
@ -55,7 +55,7 @@ Item {
|
|||
id:canvas
|
||||
width:320
|
||||
height:280
|
||||
smooth:true
|
||||
antialiasing: true
|
||||
property string strokeStyle:"steelblue"
|
||||
property string fillStyle:"yellow"
|
||||
property bool fill:true
|
||||
|
|
|
@ -63,7 +63,7 @@ Item {
|
|||
Image {
|
||||
id: needle
|
||||
x: 98; y: 33
|
||||
smooth: true
|
||||
antialiasing: true
|
||||
source: "needle.png"
|
||||
transform: Rotation {
|
||||
id: needleRotation
|
||||
|
|
|
@ -42,7 +42,6 @@ import QtQuick 2.0
|
|||
Image {
|
||||
source: "quit.png"
|
||||
scale: quitMouse.pressed ? 0.8 : 1.0
|
||||
smooth: quitMouse.pressed
|
||||
MouseArea {
|
||||
id: quitMouse
|
||||
anchors.fill: parent
|
||||
|
|
|
@ -67,7 +67,7 @@ Rectangle {
|
|||
|
||||
radius: 8
|
||||
opacity: 0.7
|
||||
smooth: true
|
||||
antialiasing: true
|
||||
gradient: Gradient {
|
||||
GradientStop { position: 0.0; color: "gray" }
|
||||
GradientStop { position: 1.0; color: "white" }
|
||||
|
@ -77,7 +77,7 @@ Rectangle {
|
|||
id: slider
|
||||
x: 1; y: 1; width: 30; height: 14
|
||||
radius: 6
|
||||
smooth: true
|
||||
antialiasing: true
|
||||
gradient: Gradient {
|
||||
GradientStop { position: 0.0; color: "#424242" }
|
||||
GradientStop { position: 1.0; color: "black" }
|
||||
|
|
|
@ -51,8 +51,8 @@ Flipable {
|
|||
|
||||
width: front.width; height: front.height
|
||||
|
||||
front: Image { id: frontImage; smooth: true }
|
||||
back: Image { source: "back.png"; smooth: true }
|
||||
front: Image { id: frontImage }
|
||||
back: Image { source: "back.png" }
|
||||
|
||||
state: "back"
|
||||
|
||||
|
|
|
@ -58,7 +58,6 @@ Rectangle {
|
|||
|
||||
Image {
|
||||
id: moon
|
||||
smooth: true
|
||||
anchors.centerIn: parent
|
||||
scale: moonArea.pressed ? 1.1 : 1.0
|
||||
opacity: moonArea.containsMouse ? 1.0 : 0.7
|
||||
|
@ -86,7 +85,6 @@ Rectangle {
|
|||
verticalCenterOffset: 30
|
||||
horizontalCenterOffset: 80
|
||||
}
|
||||
smooth: true
|
||||
scale: rightCloudArea.pressed ? 1.1 : 1.0
|
||||
opacity: rightCloudArea.containsMouse ? 1.0 : 0.7
|
||||
source: Qt.resolvedUrl("images/cloud_2.png")
|
||||
|
@ -113,7 +111,6 @@ Rectangle {
|
|||
verticalCenterOffset: 40
|
||||
horizontalCenterOffset: -80
|
||||
}
|
||||
smooth: true
|
||||
scale: leftCloudArea.pressed ? 1.1 : 1.0
|
||||
opacity: leftCloudArea.containsMouse ? 1.0 : 0.7
|
||||
source: Qt.resolvedUrl("images/cloud_1.png")
|
||||
|
|
|
@ -50,7 +50,6 @@ Item {
|
|||
width: parent.width; height: parent.height - captionItem.height
|
||||
source: "qt-logo.png"
|
||||
clip: true // only makes a difference if mode is PreserveAspectCrop
|
||||
smooth: true
|
||||
}
|
||||
|
||||
Text {
|
||||
|
|
|
@ -48,7 +48,7 @@ Item {
|
|||
anchors.fill: rectangle
|
||||
anchors { leftMargin: -6; topMargin: -6; rightMargin: -8; bottomMargin: -8 }
|
||||
border { left: 10; top: 10; right: 10; bottom: 10 }
|
||||
source: "shadow.png"; smooth: true
|
||||
source: "shadow.png"
|
||||
}
|
||||
//! [shadow]
|
||||
|
||||
|
|
|
@ -73,11 +73,11 @@ FocusScope {
|
|||
Rectangle {
|
||||
id: content
|
||||
color: "transparent"
|
||||
smooth: true
|
||||
antialiasing: true
|
||||
anchors.fill: parent; anchors.margins: 20; radius: 10
|
||||
|
||||
Rectangle { color: "#91AA9D"; anchors.fill: parent; anchors.margins: 3; radius: 8; smooth: true }
|
||||
Image { source: "images/qt-logo.png"; anchors.centerIn: parent; smooth: true }
|
||||
Rectangle { color: "#91AA9D"; anchors.fill: parent; anchors.margins: 3; radius: 8; antialiasing: true }
|
||||
Image { source: "images/qt-logo.png"; anchors.centerIn: parent }
|
||||
}
|
||||
|
||||
MouseArea {
|
||||
|
|
|
@ -48,10 +48,10 @@ Item {
|
|||
id: content
|
||||
anchors.centerIn: parent; width: container.width - 40; height: container.height - 10
|
||||
color: "transparent"
|
||||
smooth: true
|
||||
antialiasing: true
|
||||
radius: 10
|
||||
|
||||
Rectangle { anchors.fill: parent; anchors.margins: 3; color: "#91AA9D"; smooth: true; radius: 8 }
|
||||
Rectangle { anchors.fill: parent; anchors.margins: 3; color: "#91AA9D"; antialiasing: true; radius: 8 }
|
||||
}
|
||||
|
||||
Text {
|
||||
|
|
|
@ -48,7 +48,7 @@ Rectangle {
|
|||
signal clicked
|
||||
|
||||
width: label.width + 20; height: label.height + 6
|
||||
smooth: true
|
||||
antialiasing: true
|
||||
radius: 10
|
||||
|
||||
gradient: Gradient {
|
||||
|
|
|
@ -88,7 +88,6 @@ Item {
|
|||
Image {
|
||||
x: 92.5; y: 27
|
||||
source: "hour.png"
|
||||
smooth: true
|
||||
transform: Rotation {
|
||||
id: hourRotation
|
||||
origin.x: 7.5; origin.y: 73;
|
||||
|
@ -102,7 +101,6 @@ Item {
|
|||
Image {
|
||||
x: 93.5; y: 17
|
||||
source: "minute.png"
|
||||
smooth: true
|
||||
transform: Rotation {
|
||||
id: minuteRotation
|
||||
origin.x: 6.5; origin.y: 83;
|
||||
|
@ -116,7 +114,6 @@ Item {
|
|||
Image {
|
||||
x: 97.5; y: 20
|
||||
source: "second.png"
|
||||
smooth: true
|
||||
transform: Rotation {
|
||||
id: secondRotation
|
||||
origin.x: 2.5; origin.y: 80;
|
||||
|
|
|
@ -90,7 +90,6 @@ Item {
|
|||
Image {
|
||||
id: image
|
||||
source: modelData.icon
|
||||
smooth: true
|
||||
scale: 0.8
|
||||
}
|
||||
|
||||
|
|
|
@ -1,52 +0,0 @@
|
|||
/****************************************************************************
|
||||
**
|
||||
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
|
||||
** Contact: http://www.qt-project.org/
|
||||
**
|
||||
** This file is part of the examples of the Qt Toolkit.
|
||||
**
|
||||
** $QT_BEGIN_LICENSE:BSD$
|
||||
** You may use this file under the terms of the BSD license as follows:
|
||||
**
|
||||
** "Redistribution and use in source and binary forms, with or without
|
||||
** modification, are permitted provided that the following conditions are
|
||||
** met:
|
||||
** * Redistributions of source code must retain the above copyright
|
||||
** notice, this list of conditions and the following disclaimer.
|
||||
** * Redistributions in binary form must reproduce the above copyright
|
||||
** notice, this list of conditions and the following disclaimer in
|
||||
** the documentation and/or other materials provided with the
|
||||
** distribution.
|
||||
** * Neither the name of Nokia Corporation and its Subsidiary(-ies) nor
|
||||
** the names of its contributors may be used to endorse or promote
|
||||
** products derived from this software without specific prior written
|
||||
** permission.
|
||||
**
|
||||
** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
||||
** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
||||
** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
||||
** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||
** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||
** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
|
||||
**
|
||||
** $QT_END_LICENSE$
|
||||
**
|
||||
****************************************************************************/
|
||||
|
||||
import QtQuick 2.0
|
||||
Image {
|
||||
source: "quit.png"
|
||||
scale: quitMouse.pressed ? 0.8 : 1.0
|
||||
smooth: quitMouse.pressed
|
||||
MouseArea {
|
||||
id: quitMouse
|
||||
anchors.fill: parent
|
||||
anchors.margins: -10
|
||||
onClicked: Qt.quit()
|
||||
}
|
||||
}
|
|
@ -65,12 +65,10 @@ Rectangle {
|
|||
id: myIcon
|
||||
y: 20; anchors.horizontalCenter: parent.horizontalCenter
|
||||
source: icon
|
||||
smooth: true
|
||||
}
|
||||
Text {
|
||||
anchors { top: myIcon.bottom; horizontalCenter: parent.horizontalCenter }
|
||||
text: name
|
||||
smooth: true
|
||||
}
|
||||
|
||||
MouseArea {
|
||||
|
|
|
@ -82,7 +82,6 @@ Rectangle {
|
|||
ShaderEffectSource {
|
||||
id: theSource
|
||||
sourceItem: theItem
|
||||
smooth: true
|
||||
}
|
||||
//! [source]
|
||||
|
||||
|
@ -125,13 +124,11 @@ Rectangle {
|
|||
width: 160
|
||||
height: 140
|
||||
source: "content/qt-logo.png"
|
||||
smooth: true
|
||||
}
|
||||
Image {
|
||||
width: 160
|
||||
height: 140
|
||||
source: "content/face-smile.png"
|
||||
smooth: true
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -170,13 +167,11 @@ Rectangle {
|
|||
height: 160
|
||||
property variant source: theSource
|
||||
property variant shadow: ShaderEffectSource {
|
||||
smooth: true
|
||||
sourceItem: ShaderEffect {
|
||||
width: theItem.width
|
||||
height: theItem.height
|
||||
property variant delta: Qt.size(0.0, 1.0 / height)
|
||||
property variant source: ShaderEffectSource {
|
||||
smooth: true
|
||||
sourceItem: ShaderEffect {
|
||||
width: theItem.width
|
||||
height: theItem.height
|
||||
|
|
|
@ -56,7 +56,6 @@ Rectangle {
|
|||
color: "white"
|
||||
text: "Hello world!"
|
||||
font.pixelSize: 32
|
||||
smooth: true
|
||||
|
||||
//! [letterspacing]
|
||||
SequentialAnimation on font.letterSpacing {
|
||||
|
|
|
@ -91,13 +91,11 @@ Component {
|
|||
x: 8 + -width * 0.6 / 2; y: -20
|
||||
source: "note-yellow.png"
|
||||
scale: 0.6; transformOrigin: Item.TopLeft
|
||||
smooth: true
|
||||
}
|
||||
|
||||
TextEdit {
|
||||
id: myText
|
||||
x: -104; y: 36; width: 215; height: 200
|
||||
smooth: true
|
||||
font.pixelSize: 24
|
||||
readOnly: false
|
||||
rotation: -8
|
||||
|
|
|
@ -64,7 +64,7 @@ Rectangle {
|
|||
|
||||
//set appearance properties
|
||||
radius: 6
|
||||
smooth: true
|
||||
antialiasing: true
|
||||
border { width: 2; color: borderColor }
|
||||
width: buttonWidth; height: buttonHeight
|
||||
|
||||
|
|
|
@ -55,6 +55,7 @@ Rectangle {
|
|||
Rectangle {
|
||||
id: dirBox
|
||||
radius: 10
|
||||
antialiasing: true
|
||||
anchors.centerIn:parent
|
||||
height: parent.height -15; width: parent.width -30
|
||||
|
||||
|
@ -62,6 +63,7 @@ Rectangle {
|
|||
id:header
|
||||
height: parent.height*0.1; width: parent.width
|
||||
radius:3
|
||||
antialiasing: true
|
||||
z:1
|
||||
gradient: Gradient {
|
||||
GradientStop { position: 0.0; color: "#8C8F8C" }
|
||||
|
@ -110,7 +112,7 @@ Rectangle {
|
|||
width: parent.width; height: parent.height
|
||||
anchors.centerIn: parent
|
||||
radius: 10
|
||||
smooth: true
|
||||
antialiasing: true
|
||||
scale: GridView.view.currentIndex == index ? 1 : 0.5
|
||||
opacity: GridView.view.currentIndex == index ? 1 : 0
|
||||
Text {
|
||||
|
@ -121,7 +123,6 @@ Rectangle {
|
|||
color: "#696167"
|
||||
font.weight: Font.DemiBold
|
||||
font.pointSize: 12
|
||||
smooth: true
|
||||
elide: Text.ElideMiddle
|
||||
horizontalAlignment: Text.AlignHCenter
|
||||
}
|
||||
|
|
|
@ -70,7 +70,6 @@ Rectangle {
|
|||
text: "menu: "
|
||||
color: "lightblue"
|
||||
font { weight: Font.Light; italic: true }
|
||||
smooth: true
|
||||
}
|
||||
//row displays its children in a vertical row
|
||||
Row {
|
||||
|
@ -85,7 +84,6 @@ Rectangle {
|
|||
scale: menuListView.currentIndex == 0? 1.25: 1
|
||||
labelSize: menuListView.currentIndex == 0? 16:12
|
||||
radius: 1
|
||||
smooth:true
|
||||
//on a button click, change the list's currently selected item to FileMenu
|
||||
onButtonClick: menuListView.currentIndex = 0
|
||||
gradient: Gradient {
|
||||
|
@ -101,7 +99,6 @@ Rectangle {
|
|||
label: "Edit"
|
||||
radius: 1
|
||||
labelSize: menuListView.currentIndex == 1? 16:12
|
||||
smooth:true
|
||||
//on a button click, change the list's currently selected item to EditMenu
|
||||
onButtonClick: menuListView.currentIndex = 1
|
||||
gradient: Gradient {
|
||||
|
|
|
@ -60,7 +60,7 @@ Rectangle {
|
|||
|
||||
//set appearance properties
|
||||
radius: 10
|
||||
smooth: true
|
||||
antialiasing: true
|
||||
border{color: "white"; width: 3}
|
||||
width: buttonWidth; height: buttonHeight
|
||||
|
||||
|
|
|
@ -60,7 +60,7 @@ Rectangle {
|
|||
|
||||
//set appearance properties
|
||||
radius:10
|
||||
smooth: true
|
||||
antialiasing: true
|
||||
border{color: "white"; width: 3}
|
||||
width: buttonWidth; height: buttonHeight
|
||||
|
||||
|
|
|
@ -60,7 +60,7 @@ Rectangle {
|
|||
|
||||
//set appearance properties
|
||||
radius:10
|
||||
smooth: true
|
||||
antialiasing: true
|
||||
border{color: "white"; width: 3}
|
||||
width: buttonWidth; height: buttonHeight
|
||||
|
||||
|
|
|
@ -62,7 +62,7 @@ Rectangle {
|
|||
|
||||
//set appearance properties
|
||||
radius:10
|
||||
smooth: true
|
||||
antialiasing: true
|
||||
border.color: "white"
|
||||
border.width: 3
|
||||
width: buttonWidth; height: buttonHeight
|
||||
|
|
|
@ -63,7 +63,7 @@ Rectangle {
|
|||
property real labelSize: 14
|
||||
//set appearance properties
|
||||
radius:6
|
||||
smooth: true
|
||||
antialiasing: true
|
||||
border.width: 2
|
||||
border.color: borderColor
|
||||
width: buttonWidth; height: buttonHeight
|
||||
|
|
|
@ -55,6 +55,7 @@ Rectangle {
|
|||
Rectangle{
|
||||
id: dirBox
|
||||
radius: 10
|
||||
antialiasing: true
|
||||
anchors.centerIn:parent
|
||||
height: parent.height -15; width: parent.width -30
|
||||
|
||||
|
@ -63,6 +64,7 @@ Rectangle {
|
|||
height:parent.height*0.1
|
||||
width: parent.width
|
||||
radius:3
|
||||
antialiasing: true
|
||||
z:1
|
||||
gradient: Gradient {
|
||||
GradientStop { position: 0.0; color: "#8C8F8C" }
|
||||
|
@ -117,7 +119,7 @@ Rectangle {
|
|||
width:parent.width; height:parent.height
|
||||
anchors.centerIn: parent
|
||||
radius: 10
|
||||
smooth: true
|
||||
antialiasing: true
|
||||
scale: GridView.view.currentIndex == index ? 1 : 0.5
|
||||
opacity: GridView.view.currentIndex == index ? 1 : 0
|
||||
Text{
|
||||
|
@ -128,7 +130,6 @@ Rectangle {
|
|||
color: "#696167"
|
||||
font.weight: Font.DemiBold
|
||||
font.pointSize: 12
|
||||
smooth:true
|
||||
elide: Text.ElideMiddle
|
||||
horizontalAlignment: Text.AlignHCenter
|
||||
}
|
||||
|
|
|
@ -70,7 +70,6 @@ Rectangle {
|
|||
text: "menu: "
|
||||
color: "lightblue"
|
||||
font {weight: Font.Light; italic: true}
|
||||
smooth: true
|
||||
}
|
||||
|
||||
//row displays its children in a vertical row
|
||||
|
@ -86,7 +85,6 @@ Rectangle {
|
|||
scale: menuListView.currentIndex == 0? 1.25: 1
|
||||
labelSize: menuListView.currentIndex == 0? 16:12
|
||||
radius: 1
|
||||
smooth:true
|
||||
//on a button click, change the list's currently selected item to FileMenu
|
||||
onButtonClick: menuListView.currentIndex = 0
|
||||
gradient: Gradient{
|
||||
|
@ -102,7 +100,6 @@ Rectangle {
|
|||
label: "Edit"
|
||||
radius: 1
|
||||
labelSize: menuListView.currentIndex == 1? 16:12
|
||||
smooth:true
|
||||
//on a button click, change the list's currently selected item to EditMenu
|
||||
onButtonClick: menuListView.currentIndex = 1
|
||||
gradient: Gradient{
|
||||
|
|
|
@ -50,7 +50,7 @@ Rectangle {
|
|||
|
||||
width: buttonLabel.width + 20; height: buttonLabel.height + 5
|
||||
border { width: 1; color: Qt.darker(activePalette.button) }
|
||||
smooth: true
|
||||
antialiasing: true
|
||||
radius: 8
|
||||
|
||||
// color the button with a gradient
|
||||
|
|
|
@ -49,7 +49,7 @@ Rectangle {
|
|||
|
||||
width: buttonLabel.width + 20; height: buttonLabel.height + 5
|
||||
border { width: 1; color: Qt.darker(activePalette.button) }
|
||||
smooth: true
|
||||
antialiasing: true
|
||||
radius: 8
|
||||
|
||||
// color the button with a gradient
|
||||
|
|
|
@ -49,7 +49,7 @@ Rectangle {
|
|||
|
||||
width: buttonLabel.width + 20; height: buttonLabel.height + 5
|
||||
border { width: 1; color: Qt.darker(activePalette.button) }
|
||||
smooth: true
|
||||
antialiasing: true
|
||||
radius: 8
|
||||
|
||||
// color the button with a gradient
|
||||
|
|
|
@ -49,7 +49,7 @@ Rectangle {
|
|||
|
||||
width: buttonLabel.width + 20; height: buttonLabel.height + 5
|
||||
border { width: 1; color: Qt.darker(activePalette.button) }
|
||||
smooth: true
|
||||
antialiasing: true
|
||||
radius: 8
|
||||
|
||||
// color the button with a gradient
|
||||
|
|
|
@ -47,7 +47,7 @@ Rectangle {
|
|||
width: 100; height: 30
|
||||
border.width: 1
|
||||
radius: 5
|
||||
smooth: true
|
||||
antialiasing: true
|
||||
|
||||
gradient: Gradient {
|
||||
GradientStop { position: 0.0; color: "darkGray" }
|
||||
|
|
|
@ -48,7 +48,7 @@ Rectangle {
|
|||
//! [properties]
|
||||
width: 145; height: 60
|
||||
color: "blue"
|
||||
smooth: true; radius: 9
|
||||
antialiasing: true; radius: 9
|
||||
property alias text: label.text
|
||||
//! [properties]
|
||||
//! [object alias]
|
||||
|
|
|
@ -59,7 +59,7 @@ FocusScope {
|
|||
//! [properties]
|
||||
width: 145; height: 60
|
||||
color: "blue"
|
||||
smooth: true; radius: 9
|
||||
antialiasing: true; radius: 9
|
||||
property alias text: label.text
|
||||
//! [properties]
|
||||
border {color: "#B9C5D0"; width: 1}
|
||||
|
|
|
@ -52,7 +52,7 @@ FocusScope {
|
|||
Rectangle {
|
||||
id: rectangle
|
||||
anchors.centerIn: parent
|
||||
color: "lightsteelblue"; width: 175; height: 25; radius: 10; smooth: true
|
||||
color: "lightsteelblue"; width: 175; height: 25; radius: 10; antialiasing: true
|
||||
Text { id: label; anchors.centerIn: parent }
|
||||
focus: true
|
||||
Keys.onPressed: {
|
||||
|
|
|
@ -43,7 +43,7 @@ import QtQuick 2.0
|
|||
//! [mywidget]
|
||||
Rectangle {
|
||||
id: widget
|
||||
color: "lightsteelblue"; width: 175; height: 25; radius: 10; smooth: true
|
||||
color: "lightsteelblue"; width: 175; height: 25; radius: 10; antialiasing: true
|
||||
Text { id: label; anchors.centerIn: parent}
|
||||
focus: true
|
||||
Keys.onPressed: {
|
||||
|
|
|
@ -51,7 +51,7 @@ FocusScope {
|
|||
Rectangle {
|
||||
id: rectangle
|
||||
anchors.centerIn: parent
|
||||
color: "lightsteelblue"; width: 175; height: 25; radius: 10; smooth: true
|
||||
color: "lightsteelblue"; width: 175; height: 25; radius: 10; antialiasing: true
|
||||
Text { id: label; anchors.centerIn: parent }
|
||||
focus: true
|
||||
Keys.onPressed: {
|
||||
|
|
|
@ -74,9 +74,9 @@ Row {
|
|||
|
||||
//![standalone]
|
||||
SequentialAnimation {
|
||||
PropertyAction { target: img; property: "smooth"; value: "true" }
|
||||
PropertyAction { target: img; property: "opacity"; value: .5 }
|
||||
NumberAnimation { target: img; property: "width"; to: 300; duration: 1000 }
|
||||
PropertyAction { target: img; property: "smooth"; value: "false" }
|
||||
PropertyAction { target: img; property: "opacity"; value: 1 }
|
||||
}
|
||||
//![standalone]
|
||||
}
|
||||
|
|
|
@ -48,22 +48,18 @@ Row {
|
|||
Image {
|
||||
source: "pics/qt.png"
|
||||
transform: Rotation { origin.x: 30; origin.y: 30; axis { x: 0; y: 1; z: 0 } angle: 18 }
|
||||
smooth: true
|
||||
}
|
||||
Image {
|
||||
source: "pics/qt.png"
|
||||
transform: Rotation { origin.x: 30; origin.y: 30; axis { x: 0; y: 1; z: 0 } angle: 36 }
|
||||
smooth: true
|
||||
}
|
||||
Image {
|
||||
source: "pics/qt.png"
|
||||
transform: Rotation { origin.x: 30; origin.y: 30; axis { x: 0; y: 1; z: 0 } angle: 54 }
|
||||
smooth: true
|
||||
}
|
||||
Image {
|
||||
source: "pics/qt.png"
|
||||
transform: Rotation { origin.x: 30; origin.y: 30; axis { x: 0; y: 1; z: 0 } angle: 72 }
|
||||
smooth: true
|
||||
}
|
||||
}
|
||||
//! [0]
|
||||
|
|
|
@ -48,7 +48,7 @@ Item {
|
|||
id: rect
|
||||
width: 150; height: 100; anchors.centerIn: parent
|
||||
color: "red"
|
||||
smooth: true
|
||||
antialiasing: true
|
||||
|
||||
states: State {
|
||||
name: "rotated"
|
||||
|
|
|
@ -140,11 +140,7 @@ QT_BEGIN_NAMESPACE
|
|||
The \l{declarative/imageelements/borderimage}{BorderImage example} shows how a BorderImage
|
||||
can be used to simulate a shadow effect on a rectangular item.
|
||||
|
||||
\section1 Quality and Performance
|
||||
|
||||
By default, any scaled regions of the image are rendered without smoothing to improve
|
||||
rendering speed. Setting the \l smooth property improves rendering quality of scaled
|
||||
regions, but may slow down rendering.
|
||||
\section1 Image Loading
|
||||
|
||||
The source image may not be loaded instantaneously, depending on its original location.
|
||||
Loading progress can be monitored with the \l progress property.
|
||||
|
@ -205,16 +201,12 @@ QQuickBorderImage::~QQuickBorderImage()
|
|||
/*!
|
||||
\qmlproperty bool QtQuick2::BorderImage::smooth
|
||||
|
||||
Set this property if you want the image to be smoothly filtered when scaled or
|
||||
transformed. Smooth filtering gives better visual quality, but is slower. If
|
||||
the image is displayed at its natural size, this property has no visual or
|
||||
performance effect.
|
||||
This property holds whether the image is smoothly filtered when scaled or
|
||||
transformed. Smooth filtering gives better visual quality, but it may be slower
|
||||
on some hardware. If the image is displayed at its natural size, this property
|
||||
has no visual or performance effect.
|
||||
|
||||
By default, this property is set to false.
|
||||
|
||||
\note Generally scaling artifacts are only visible if the image is stationary on
|
||||
the screen. A common pattern when animating an image is to disable smooth
|
||||
filtering at the beginning of the animation and enable it at the conclusion.
|
||||
By default, this property is set to true.
|
||||
*/
|
||||
|
||||
/*!
|
||||
|
|
|
@ -199,7 +199,6 @@ void QQuickImagePrivate::setImage(const QImage &image)
|
|||
\qml
|
||||
Image {
|
||||
width: 130; height: 100
|
||||
smooth: true
|
||||
source: "qtlogo.png"
|
||||
}
|
||||
\endqml
|
||||
|
@ -211,7 +210,6 @@ void QQuickImagePrivate::setImage(const QImage &image)
|
|||
Image {
|
||||
width: 130; height: 100
|
||||
fillMode: Image.PreserveAspectFit
|
||||
smooth: true
|
||||
source: "qtlogo.png"
|
||||
}
|
||||
\endqml
|
||||
|
@ -223,7 +221,6 @@ void QQuickImagePrivate::setImage(const QImage &image)
|
|||
Image {
|
||||
width: 130; height: 100
|
||||
fillMode: Image.PreserveAspectCrop
|
||||
smooth: true
|
||||
source: "qtlogo.png"
|
||||
clip: true
|
||||
}
|
||||
|
@ -247,7 +244,6 @@ void QQuickImagePrivate::setImage(const QImage &image)
|
|||
Image {
|
||||
width: 120; height: 120
|
||||
fillMode: Image.TileVertically
|
||||
smooth: true
|
||||
source: "qtlogo.png"
|
||||
}
|
||||
\endqml
|
||||
|
@ -259,7 +255,6 @@ void QQuickImagePrivate::setImage(const QImage &image)
|
|||
Image {
|
||||
width: 120; height: 120
|
||||
fillMode: Image.TileHorizontally
|
||||
smooth: true
|
||||
source: "qtlogo.png"
|
||||
}
|
||||
\endqml
|
||||
|
@ -360,14 +355,12 @@ qreal QQuickImage::paintedHeight() const
|
|||
/*!
|
||||
\qmlproperty bool QtQuick2::Image::smooth
|
||||
|
||||
Set this property if you want the image to be smoothly filtered when scaled or
|
||||
transformed. Smooth filtering gives better visual quality, but is slower. If
|
||||
the image is displayed at its natural size, this property has no visual or
|
||||
performance effect.
|
||||
This property holds whether the image is smoothly filtered when scaled or
|
||||
transformed. Smooth filtering gives better visual quality, but it may be slower
|
||||
on some hardware. If the image is displayed at its natural size, this property has
|
||||
no visual or performance effect.
|
||||
|
||||
\note Generally scaling artifacts are only visible if the image is stationary on
|
||||
the screen. A common pattern when animating an image is to disable smooth
|
||||
filtering at the beginning of the animation and reenable it at the conclusion.
|
||||
By default, this property is set to true.
|
||||
*/
|
||||
|
||||
/*!
|
||||
|
|
|
@ -185,7 +185,6 @@ QSGGeometry *QQuickGridMesh::updateGeometry(QSGGeometry *geometry, const QVector
|
|||
property variant source: Image {
|
||||
source: "qt-logo.png"
|
||||
sourceSize { width: 200; height: 200 }
|
||||
smooth: true
|
||||
}
|
||||
vertexShader: "
|
||||
uniform highp mat4 qt_Matrix;
|
||||
|
|
|
@ -531,8 +531,9 @@ QImage QQuickShaderEffectTexture::toImage() const
|
|||
which is the case for most embedded graphics chips, edges rendered
|
||||
inside a ShaderEffectSource will not be antialiased. One way to remedy
|
||||
this is to double the size of the effect source and render it with
|
||||
\c {smooth: true}. This will be equivalent to 4x multisampling, at
|
||||
the cost of lower performance and higher memory use.
|
||||
\c {smooth: true} (this is the default value of smooth).
|
||||
This will be equivalent to 4x multisampling, at the cost of lower performance
|
||||
and higher memory use.
|
||||
|
||||
\warning In most cases, using a ShaderEffectSource will decrease
|
||||
performance, and in all cases, it will increase video memory usage.
|
||||
|
|
|
@ -1000,8 +1000,8 @@ QAbstractAnimationJob* QQuickScriptAction::transition(QQuickStateActions &action
|
|||
It is useful for setting non-animated property values during an animation.
|
||||
|
||||
For example, here is a SequentialAnimation that sets the image's
|
||||
\l {Image::}{smooth} property to \c true, animates the width of the image,
|
||||
then sets \l {Image::}{smooth} back to \c false:
|
||||
\l {Item::}{opacity} property to \c .5, animates the width of the image,
|
||||
then sets \l {Item::}{opacity} back to \c 1:
|
||||
|
||||
\snippet qml/propertyaction.qml standalone
|
||||
|
||||
|
|
Loading…
Reference in New Issue