[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-kimageshop
Subject:    [calligra/krita-chili-kazakov] krita/plugins/paintops/libpaintop: Added an option that adds antialia
From:       Dmitry Kazakov <dimula73 () gmail ! com>
Date:       2014-08-25 10:59:10
Message-ID: E1XLrzS-0005pO-5F () scm ! kde ! org
[Download RAW message or body]

Git commit 108a4831b41bb439931ac7cef98062c6b1f52aba by Dmitry Kazakov.
Committed on 25/08/2014 at 10:59.
Pushed by dkazakov into branch 'krita-chili-kazakov'.

Added an option that adds antialiasing border to a clipboard brush

There was some bug reported by Mifth telling that in some circumstances
clipboard brush can be aliased. I cannot remember the way to reproduce it.

Could anyone test whether this option of the clipboard brush can be
useful in any circumstances?

CCMAIL:kimageshop@kde.org

M  +12   -9    krita/plugins/paintops/libpaintop/forms/wdgclipboardbrush.ui
M  +6    -0    krita/plugins/paintops/libpaintop/kis_clipboard_brush_widget.cpp

http://commits.kde.org/calligra/108a4831b41bb439931ac7cef98062c6b1f52aba

diff --git a/krita/plugins/paintops/libpaintop/forms/wdgclipboardbrush.ui \
b/krita/plugins/paintops/libpaintop/forms/wdgclipboardbrush.ui index c4466b0..583a074 \
                100644
--- a/krita/plugins/paintops/libpaintop/forms/wdgclipboardbrush.ui
+++ b/krita/plugins/paintops/libpaintop/forms/wdgclipboardbrush.ui
@@ -12,15 +12,18 @@
   </property>
   <layout class="QVBoxLayout" name="verticalLayout">
    <item>
-    <layout class="QHBoxLayout" name="horizontalLayout_2">
-     <item>
-      <widget class="QCheckBox" name="colorAsmask">
-       <property name="text">
-        <string>Use color as mask</string>
-       </property>
-      </widget>
-     </item>
-    </layout>
+    <widget class="QCheckBox" name="colorAsmask">
+     <property name="text">
+      <string>Use color as mask</string>
+     </property>
+    </widget>
+   </item>
+   <item>
+    <widget class="QCheckBox" name="chkSmoothBrush">
+     <property name="text">
+      <string>Brush antialiasing</string>
+     </property>
+    </widget>
    </item>
    <item>
     <layout class="QHBoxLayout" name="horizontalLayout">
diff --git a/krita/plugins/paintops/libpaintop/kis_clipboard_brush_widget.cpp \
b/krita/plugins/paintops/libpaintop/kis_clipboard_brush_widget.cpp index \
                a561a59..50ce7b7 100644
--- a/krita/plugins/paintops/libpaintop/kis_clipboard_brush_widget.cpp
+++ b/krita/plugins/paintops/libpaintop/kis_clipboard_brush_widget.cpp
@@ -58,6 +58,8 @@ KisClipboardBrushWidget::KisClipboardBrushWidget(QWidget *parent, \
const QString  
     spacingWidget->setSpacing(true, 1.0);
     connect(spacingWidget, SIGNAL(sigSpacingChanged()), SLOT(slotSpacingChanged()));
+
+    connect(chkSmoothBrush, SIGNAL(toggled(bool)), SLOT(slotUseBrushClicked()));
 }
 
 KisClipboardBrushWidget::~KisClipboardBrushWidget()
@@ -86,6 +88,10 @@ void KisClipboardBrushWidget::slotUseBrushClicked()
         if (pd) {
             QRect rc = pd->exactBounds();
 
+            if (chkSmoothBrush->isChecked()) {
+                rc = kisGrowRect(rc, 1);
+            }
+
             m_brush = new KisGbrBrush(pd, rc.x(), rc.y(), rc.width(), rc.height());
 
             m_brush->setSpacing(spacingWidget->spacing());
_______________________________________________
Krita mailing list
kimageshop@kde.org
https://mail.kde.org/mailman/listinfo/kimageshop


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic