summaryrefslogtreecommitdiff
path: root/noncore/apps/opie-reader/StyleConsts.cpp
Side-by-side diff
Diffstat (limited to 'noncore/apps/opie-reader/StyleConsts.cpp') (more/less context) (show whitespace changes)
-rw-r--r--noncore/apps/opie-reader/StyleConsts.cpp16
1 files changed, 15 insertions, 1 deletions
diff --git a/noncore/apps/opie-reader/StyleConsts.cpp b/noncore/apps/opie-reader/StyleConsts.cpp
index f47acee..77c9d3b 100644
--- a/noncore/apps/opie-reader/StyleConsts.cpp
+++ b/noncore/apps/opie-reader/StyleConsts.cpp
@@ -1,33 +1,33 @@
#include <qimage.h>
#include "StyleConsts.h"
GraphicLink::~GraphicLink() { delete graphic; }
pmstore::~pmstore()
{
-//// odebug << "Deleting image" << oendl;
+//// qDebug("Deleting image");
delete graphic;
}
CStyle::~CStyle()
{
if (graphic != NULL)
{
if (--(graphic->count) == 0)
{
delete graphic;
}
}
}
CStyle::CStyle(const CStyle& rhs) : graphic(NULL)
{
*this = rhs;
}
CStyle& CStyle::operator=(const CStyle& rhs)
{
if (rhs.graphic != NULL)
{
(rhs.graphic->count)++;
@@ -71,24 +71,38 @@ void CStyle::unset()
{
sty.unset();
if (graphic != NULL)
{
if (--(graphic->count) == 0)
{
delete graphic;
}
graphic = NULL;
}
}
void CStyle::setPicture(bool canScale, QImage* _g, bool il, unsigned long tgt)
{
if (graphic != NULL)
{
if (--(graphic->count) == 0)
{
delete graphic;
}
graphic = NULL;
}
if (_g != NULL) graphic = new pmstore(canScale, _g, il, tgt);
}
+
+void CStyle::invert()
+{
+ qDebug("Before:<%02x%02x%02x>", sty.bred, sty.bgreen, sty.bblue);
+ qDebug("Before:<%02x%02x%02x>", sty.red, sty.green, sty.blue);
+ sty.bred = 255-sty.bred;
+ sty.bgreen = 255-sty.bgreen;
+ sty.bblue = 255-sty.bblue;
+ sty.red = 255-sty.red;
+ sty.green = 255-sty.green;
+ sty.blue = 255-sty.blue;
+ qDebug("After:<%02x%02x%02x>", sty.bred, sty.bgreen, sty.bblue);
+ qDebug("After:<%02x%02x%02x>", sty.red, sty.green, sty.blue);
+}