mirror of
https://bitbucket.org/smil3y/kde-extraapps.git
synced 2025-02-23 18:32:53 +00:00
okular: replace use of QImageBlitz with KIconEffect
for build with Katie that means one less library to build and ship since only KolourPaint is using it now, the pattern wallpaper addon was ported in the previous commit Signed-off-by: Ivailo Monev <xakepa10@laimg.moc>
This commit is contained in:
parent
49dd966368
commit
9f30da3c07
4 changed files with 5 additions and 17 deletions
|
@ -1,20 +1,11 @@
|
|||
project(okular)
|
||||
|
||||
macro_optional_find_package(QImageBlitz)
|
||||
set_package_properties(QImageBlitz PROPERTIES
|
||||
DESCRIPTION "An image effects library"
|
||||
URL "http://sourceforge.net/projects/qimageblitz"
|
||||
PURPOSE "Required to build Okular."
|
||||
TYPE REQUIRED
|
||||
)
|
||||
|
||||
add_definitions(${QT_DEFINITIONS} ${KDE4_DEFINITIONS})
|
||||
add_definitions(-DQT_USE_FAST_CONCATENATION -DQT_USE_FAST_OPERATOR_PLUS)
|
||||
include_directories(
|
||||
${CMAKE_CURRENT_SOURCE_DIR}
|
||||
${CMAKE_CURRENT_BINARY_DIR}
|
||||
${KDE4_INCLUDES}
|
||||
${QIMAGEBLITZ_INCLUDES}
|
||||
${CMAKE_SOURCE_DIR}/libkscreen
|
||||
${CMAKE_SOURCE_DIR}
|
||||
)
|
||||
|
@ -188,7 +179,7 @@ qt4_add_dbus_interfaces(okularpart_SRCS ${KDE4_DBUS_INTERFACES_DIR}/org.kde.KSpe
|
|||
|
||||
kde4_add_plugin(okularpart SHARED ${okularpart_SRCS})
|
||||
|
||||
target_link_libraries(okularpart okularcore ${KDE4_KPARTS_LIBS} ${KDE4_KPRINTUTILS_LIBS} ${MATH_LIB} ${QIMAGEBLITZ_LIBRARIES} ${KDE4_PHONON_LIBRARY} ${KDE4_SOLID_LIBRARY})
|
||||
target_link_libraries(okularpart okularcore ${KDE4_KPARTS_LIBS} ${KDE4_KPRINTUTILS_LIBS} ${MATH_LIB} ${KDE4_PHONON_LIBRARY} ${KDE4_SOLID_LIBRARY})
|
||||
|
||||
install(TARGETS okularpart DESTINATION ${PLUGIN_INSTALL_DIR})
|
||||
|
||||
|
|
|
@ -1,7 +1,6 @@
|
|||
include_directories(
|
||||
${CMAKE__SOURCE_DIR}/../..
|
||||
${CMAKE_BINARY_DIR}
|
||||
${QIMAGEBLITZ_INCLUDES}
|
||||
${KEXIV2_INCLUDE_DIR}
|
||||
)
|
||||
|
||||
|
@ -34,7 +33,6 @@ if(ENABLE_TESTING)
|
|||
${KDE4_KIO_LIBS}
|
||||
${QT_QTGUI_LIBRARY}
|
||||
${QT_QTTEST_LIBRARY}
|
||||
${QIMAGEBLITZ_LIBRARIES}
|
||||
okularcore
|
||||
)
|
||||
endif()
|
||||
|
|
|
@ -4,7 +4,6 @@ include_directories(
|
|||
${CMAKE_CURRENT_BINARY_DIR}
|
||||
${CMAKE_BINARY_DIR}
|
||||
${KDE4_INCLUDES}
|
||||
${QIMAGEBLITZ_INCLUDES}
|
||||
)
|
||||
|
||||
set(okular_SRCS
|
||||
|
@ -28,7 +27,6 @@ target_link_libraries(okularplugin
|
|||
${KDE4_KDECORE_LIBRARY}
|
||||
${KDE4_KDEUI_LIBRARY}
|
||||
${KDE4_KIO_LIBRARY}
|
||||
${QIMAGEBLITZ_LIBRARIES}
|
||||
okularcore
|
||||
)
|
||||
|
||||
|
|
|
@ -18,7 +18,7 @@
|
|||
#include <kiconloader.h>
|
||||
#include <kdebug.h>
|
||||
#include <QApplication>
|
||||
#include <qimageblitz.h>
|
||||
#include <kiconeffect.h>
|
||||
|
||||
// system includes
|
||||
#include <math.h>
|
||||
|
@ -350,8 +350,9 @@ void PagePainter::paintCroppedPageOnPainter( QPainter * destPainter, const Okula
|
|||
backImage.invertPixels(QImage::InvertRgb);
|
||||
break;
|
||||
case Okular::SettingsCore::EnumRenderMode::Recolor:
|
||||
// Recolor image using Blitz::flatten with dither:0
|
||||
Blitz::flatten( backImage, Okular::Settings::recolorForeground(), Okular::Settings::recolorBackground() );
|
||||
// Recolor image using KIconEffect with dither:0.5
|
||||
KIconEffect::toMonochrome(backImage, Okular::Settings::recolorForeground(),
|
||||
Okular::Settings::recolorBackground(), 0.5);
|
||||
break;
|
||||
case Okular::SettingsCore::EnumRenderMode::BlackWhite:
|
||||
// Manual Gray and Contrast
|
||||
|
|
Loading…
Add table
Reference in a new issue