[-]
[+]
|
Changed |
_service:tar_git:paint.spec
|
|
[-]
[+]
|
Changed |
_service
^
|
@@ -2,7 +2,7 @@
<service name="tar_git">
<param name="url">https://github.com/poetaster/paint.git</param>
<param name="branch">master</param>
- <param name="revision">0.9.3-1</param>
+ <param name="revision">0.9.4</param>
<param name="debian">N</param>
<param name="dumb">N</param>
</service>
|
[-]
[+]
|
Changed |
_service:tar_git:harbour-paint-0.9.4.tar.bz2/paint.pro
^
|
@@ -175,6 +175,8 @@
qml/glsl/compoundeye.frag \
qml/glsl/crosshatch.frag \
qml/glsl/mirror.frag \
+ qml/glsl/mosaic.frag \
+ qml/glsl/mosaic.vert \
qml/glsl/swap_RGB-BGR.frag \
qml/glsl/swap_RGB-GBR.frag \
qml/glsl/swap_RGB-RBG.frag \
|
[-]
[+]
|
Changed |
_service:tar_git:harbour-paint-0.9.4.tar.bz2/qml/components/Toolbar1.qml
^
|
@@ -10,6 +10,7 @@
{
spacing: (parent.width - children.length*Theme.iconSizeLarge )/(children.length+1)
anchors.horizontalCenter: parent.horizontalCenter
+
ToolbarButtonUndo
{
mode: Painter.Pen
|
[-]
[+]
|
Changed |
_service:tar_git:harbour-paint-0.9.4.tar.bz2/qml/components/ToolbarButtonUndo.qml
^
|
@@ -15,17 +15,18 @@
icon.source: "../icons/icon-m-undo.svg"
icon.width: Theme.iconSizeMedium
icon.height: Theme.iconSizeMedium
+
height: parent.height
rotation: rotationSensor.angle
Behavior on rotation { SmoothedAnimation { duration: 500 } }
-
- Image {
- opacity: (idUndoButton.enabled) ? 1 : 0.4
- anchors.centerIn: parent
- source: "image://theme/icon-m-delete"
- mirror: true
- scale: 0.45
+ Label {
+ anchors.horizontalCenter: parent.horizontalCenter
+ anchors.verticalCenter: parent.verticalCenter
+ font.pixelSize: Theme.fontSizeSmall
+ text: cStep + 1
+ scale: 1/1.5
}
+
/*
onClicked: {
toolThicknessVisible = false
|
[-]
[+]
|
Changed |
_service:tar_git:harbour-paint-0.9.4.tar.bz2/qml/glsl/adjust-rgb.frag
^
|
@@ -1,7 +1,9 @@
-precision mediump float;
// Adjust RGB
// Red;-1.0;1.0;Green;-1.0;1.0;Blue;-1.0;1.0
+
+precision mediump float;
+
uniform sampler2D source;
uniform sampler2D mask;
varying highp vec2 qt_TexCoord0;
|
[-]
[+]
|
Added |
_service:tar_git:harbour-paint-0.9.4.tar.bz2/qml/glsl/mosaic.frag
^
|
@@ -0,0 +1,51 @@
+// Mosaic
+
+precision highp float;
+
+uniform sampler2D source;
+uniform sampler2D mask;
+varying highp vec2 qt_TexCoord0;
+uniform lowp float qt_Opacity;
+varying highp vec2 coord;
+
+void main() {
+ if (texture2D(mask, qt_TexCoord0.st).a > 0.5)
+ {
+ vec2 uv = qt_TexCoord0.xy;
+ // the texture is loaded upside down and backwards by default so lets flip it
+ uv = 1.0 - uv;
+
+ float horiz_in = coord.x;
+ float vert_in = coord.y;
+
+ float x;
+ float y;
+
+ if (horiz_in > 0.0) {
+ x = floor(qt_TexCoord0.x * horiz_in) / horiz_in;
+ } else {
+ x = qt_TexCoord0.x;
+ }
+
+ if (vert_in > 0.0) {
+ y = floor(qt_TexCoord0.y * vert_in) / vert_in;
+ } else {
+ y = qt_TexCoord0.y;
+ }
+
+ vec4 tex = texture2D(source, vec2(x, y));
+
+ // this line will make our uvs mirrored
+ // it will convert it into a number that goes 0 to 1 to 0
+ // abs() will turn our negative numbers positive
+ //vec2 mirrorUvs = abs(uv * 2.0 - 1.0);
+
+ //vec4 tex = texture2D(source, mirrorUvs);
+
+ // output to screen
+ gl_FragColor = tex;
+
+ } else {
+ gl_FragColor = texture2D(source, qt_TexCoord0.st) * qt_Opacity;
+ }
+}
|
[-]
[+]
|
Added |
_service:tar_git:harbour-paint-0.9.4.tar.bz2/qml/glsl/mosaic.vert
^
|
@@ -0,0 +1,12 @@
+// Mosaic
+
+uniform highp mat4 qt_Matrix;
+attribute highp vec4 qt_Vertex;
+attribute highp vec2 qt_MultiTexCoord0;
+varying highp vec2 qt_TexCoord0;
+varying highp vec2 coord;
+
+void main() {
+ coord = qt_MultiTexCoord0;
+ gl_Position = qt_Matrix * qt_Vertex;
+}
|
[-]
[+]
|
Changed |
_service:tar_git:harbour-paint-0.9.4.tar.bz2/qml/glsl/pixelate.frag
^
|
@@ -1,6 +1,8 @@
// Pixelate
// Granularity;5.0;50.0
+precision mediump float;
+
uniform sampler2D source;
uniform sampler2D mask;
varying highp vec2 qt_TexCoord0;
|
[-]
[+]
|
Changed |
_service:tar_git:harbour-paint-0.9.4.tar.bz2/src/ImageProvider.h
^
|
@@ -5,6 +5,7 @@
#include <QQuickImageProvider>
#include <QImageReader>
#include "nemoimagemetadata.h"
+#include <QDebug>
class ImageProvider : public QQuickImageProvider
{
@@ -88,11 +89,16 @@
img = ir.read();
+ qDebug() << Q_FUNC_INFO << "image format:" << format;
+
+ // @attah's concise solution to r<->b channel swap issues
+ img = img.convertToFormat(QImage::Format_RGB888);
+
+ //img.convertToFormat()
NemoImageMetadata meta(filename, format);
if (meta.orientation() != NemoImageMetadata::TopLeft)
img = rotate(img, meta.orientation());
-
if (requestedSize.isValid())
return img.scaled(requestedSize.width(), requestedSize.height(), Qt::KeepAspectRatio);
else
|