TYPE REQUIRED
)
-find_package(QImageBlitz)
-set_package_properties(QImageBlitz PROPERTIES DESCRIPTION "An image effects library"
- URL "http://sourceforge.net/projects/qimageblitz"
- TYPE REQUIRED
- )
-
find_package(KDeclarative QUIET CONFIG)
set_package_properties(KDeclarative PROPERTIES DESCRIPTION "KDE Declarative (QML) support from kdelibs"
URL "http://www.kde.org"
include_directories(
${KDEBASE_WORKSPACE_SOURCE_DIR}/libs
- ${QIMAGEBLITZ_INCLUDES}
${KDECLARATIVE_INCLUDE_DIR}
)
kde4_add_kdeinit_executable( ksmserver ${ksmserver_KDEINIT_SRCS})
target_link_libraries(kdeinit_ksmserver ${SCREEN_LOCKER} ${KDE4_PLASMA_LIBS} kworkspace
- ${KDE4_KDEUI_LIBS} ${KDE4_KIO_LIBS} ${QIMAGEBLITZ_LIBRARIES} ${KDE4_SOLID_LIBS} ${X11_LIBRARIES} ${X11_Xrender_LIB}
+ ${KDE4_KDEUI_LIBS} ${KDE4_KIO_LIBS} ${KDE4_SOLID_LIBS} ${X11_LIBRARIES} ${X11_Xrender_LIB}
${QT_QTDECLARATIVE_LIBRARY} ${KDECLARATIVE_LIBRARIES}
)
#include <QTimer>
#include "config-workspace.h"
-#include <qimageblitz.h>
-
CurtainEffect::CurtainEffect(QWidget *parent, QPixmap *pixmap)
: LogoutEffect(parent, pixmap)
{
{
QImage image = QPixmap::grabWindow(QApplication::desktop()->winId(), 0, currentY,
parent->width(), 10 ).toImage();
- Blitz::intensity(image, -0.4);
- Blitz::grayscale(image);
+
+ // gray scale
+ QColor oldColor;
+ for(int x = 0; x < image.width(); x++){
+ for(int y = 0; y < image.height(); y++){
+ oldColor = QColor(image.pixel(x, y));
+ int average = (oldColor.red() + oldColor.green() + oldColor.blue()) / 3;
+ image.setPixel(x, y, qRgb(average,average,average));
+ }
+ }
QPainter painter(pixmap);
painter.drawImage(0, currentY, image);