2 * Copyright (C) 2016 Canonical Ltd.
4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License as published by
6 * the Free Software Foundation; version 3.
8 * This program is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * GNU General Public License for more details.
13 * You should have received a copy of the GNU General Public License
14 * along with this program. If not, see <http://www.gnu.org/licenses/>.
23 readonly property string fragColorShader:
25 varying highp vec2 qt_TexCoord0;
26 uniform sampler2D source;
27 uniform lowp vec4 color;
28 uniform lowp float qt_Opacity;
32 lowp vec4 sourceColor = texture2D(source, qt_TexCoord0);
33 gl_FragColor = color * sourceColor.a * qt_Opacity;
37 fillMode: Image.PreserveAspectFit
38 height: sourceSize.height
41 readonly property color color: root.color
42 readonly property Image source: parent
44 height: source.height; width: source.width
45 fragmentShader: fragColorShader