]> git.vomp.tv Git - vompclient-marten.git/commitdiff
MVp compile fixes supplied by sirwio
authorMarten Richter <marten.richter@freenet.de>
Tue, 9 Oct 2012 06:35:14 +0000 (08:35 +0200)
committerMarten Richter <marten.richter@freenet.de>
Tue, 9 Oct 2012 06:35:14 +0000 (08:35 +0200)
13 files changed:
GNUmakefile
defines.h
osdmvp.cc
surface.h
surfacemvp.h
vcolourtuner.cc
vcolourtuner.h
vmedialist.cc
vmediaview.cc
vmediaview.h
wjpeg.h
wjpegcomplex.cc
wjpegcomplex.h

index 5b124afc1c932b7aa821c7d22fd67edb7db2cde7..cc09c00de89865ba06a2a9b9b0383dc57c658a92 100644 (file)
@@ -45,7 +45,7 @@ $(info MVP flags)
 LDFLAGS = -Wall -static\r
 LIBS = -lpthread -lrt\r
 \r
-OBJECTS += wwss.o main.o threadp.o remotemvp.o ledmvp.o mtdmvp.o videomvp.o audiomvp.o osdmvp.o surfacemvp.o vmedialist.o vcolourtuner.o vmediaview.o vvideomedia.o mediafile.o \r
+OBJECTS += wwss.o main.o threadp.o remotemvp.o ledmvp.o mtdmvp.o videomvp.o audiomvp.o osdmvp.o surfacemvp.o wjpegcomplex.o vmedialist.o vcolourtuner.o vmediaview.o vvideomedia.o mediafile.o \r
 TIOBJECT = ticonfig.o\r
 CROSSLIBS = ../jpeg/jpeg-6b/libjpeg.a\r
 INCLUDES = -I../jpeg/jpeg-6b  -DVOMP_PLATTFORM_MVP \r
index 1bbdec6bd60d6c9119cca445bb0a5e56de679fb7..24c1bf0a1c5e696402cae49cd33a9d7302cc5385 100644 (file)
--- a/defines.h
+++ b/defines.h
@@ -126,10 +126,12 @@ long long getTimeMS();
   #define OsdStartDev "/dev/stbgfx"\r
   #define Audio_TYPE AudioMVP\r
   #define Video_TYPE VideoMVP\r
+  #define Surface_TYPE SurfaceMVP //deprecated\r
   #define DEFAULT_TCP_WINDOWSIZENR 1  /*=2048*/\r
   #define PAL_WSS\r
   #define MVP_REMOTE_TYPES\r
 \r
+  #define VOMP_MEDIAPLAYER\r
   #define VOMP_LINUX_CLOCK  CLOCK_REALTIME\r
 #endif\r
 \r
@@ -142,6 +144,7 @@ long long getTimeMS();
   #define OsdStartDev ""\r
   #define Audio_TYPE AudioNMT\r
   #define Video_TYPE VideoNMT\r
+  #define Surface_TYPE SurfaceDirectFB //deprecated\r
   #define DEFAULT_TCP_WINDOWSIZENR 1  /*=2048*/\r
 \r
   #define VOMP_LINUX_CLOCK  CLOCK_REALTIME\r
index 0317ea2d1d036421b6c4cb8953a248c9a68e0230..476045d9c330919351adc3e4140a0fbfe8eda077 100644 (file)
--- a/osdmvp.cc
+++ b/osdmvp.cc
@@ -37,11 +37,11 @@ int OsdMVP::getFD()
   return fdOsd;
 }
 
-Surface * OsdMvp::createNewSurface();{
-       return (Surface*)new SurfaceMVP();
+Surface * OsdMVP::createNewSurface()
+{
+  return (Surface*)new SurfaceMVP();
 }
 
-
 int OsdMVP::init(void* device)
 {
   if (initted) return 0;
index f970f4db979d51c72c368ffba6fec8fcee42753e..83afa52580700bcee741f091e25dcf98fe3e951d 100644 (file)
--- a/surface.h
+++ b/surface.h
@@ -51,6 +51,7 @@ class Surface
 {\r
   friend class Wwss; // classes that need surface access, their usage is forbidden for vector based\r
   friend class WJpegComplex;// implementations of osd\r
+  friend class VColourTuner;
   public:\r
     Surface(int id = 0);\r
     virtual ~Surface();\r
index 02db48b1f5be2d842b7874c7568e9c799125c604..12c7c88cb5603ec5e4f143cbbb254410defa6d94 100644 (file)
@@ -164,7 +164,7 @@ class SurfaceMVP : public Surface
 \r
     void drawHorzLine(int x1, int x2, int y, const DrawStyle& c);\r
     void drawVertLine(int x, int y1, int y2, const DrawStyle& c);\r
-    void drawBitmap(int x, int y, const Bitmap& bm);\r
+    void drawBitmap(int x, int y, const Bitmap& bm, const DisplayRegion& region);\r
     int updateToScreen(int sx, int sy, int w, int h, int dx, int dy);\r
     void readPixel(int x, int y, unsigned char* r, unsigned char* g, unsigned char* b);\r
     void screenShot(const char* fileName);\r
index d79f7fd79f65d8465e4a2c81f2491a5828e4a809..73dfef7724dcac50c65b3b5c5ddcd38f65ed59ec 100644 (file)
 #include "i18n.h"\r
 #include "log.h"\r
 #include "mediaoptions.h"\r
+
+#ifdef VOMP_PLATTFORM_MVP
+#include "surfacemvp.h"
+#endif
+
 \r
 #define PICTUREFILE "/colourtest.jpg"\r
 \r
@@ -78,28 +83,28 @@ void VColourTuner::draw()
     int bw=50;\r
     int bh=50;\r
     int picx=picture.getX();\r
-    Colour bc=Colour(140,140,140);\r
+    DrawStyle bc=DrawStyle(140,140,140);\r
     fillColour(bc);\r
-    bc=Colour(255,255,255);\r
-    drawText(tr("Colour Tuning"), x+20, y+5, Colour::LIGHTTEXT);\r
-    drawBox(x, y+50, bw, bh, Colour::RED);\r
-    drawBox(x, y+130, bw, bh, Colour::GREEN);\r
-    drawBox(x, y+190, bw, bh, Colour::BLUE);\r
+    bc=DrawStyle(255,255,255);\r
+    drawText(tr("Colour Tuning"), x+20, y+5, DrawStyle::LIGHTTEXT);\r
+    drawBox(x, y+50, bw, bh, DrawStyle::RED);\r
+    drawBox(x, y+130, bw, bh, DrawStyle::GREEN);\r
+    drawBox(x, y+190, bw, bh, DrawStyle::BLUE);\r
     drawBox(x, y+270, bw, bh, bc);\r
     sprintf(valbuf,"%03d%%",vrfactor);\r
-    drawText(valbuf,x+bw+x,y+50, Colour::LIGHTTEXT);\r
-    drawText("<1 2>",x+bw+x,y+74, Colour::LIGHTTEXT);\r
+    drawText(valbuf,x+bw+x,y+50, DrawStyle::LIGHTTEXT);\r
+    drawText("<1 2>",x+bw+x,y+74, DrawStyle::LIGHTTEXT);\r
     sprintf(valbuf,"%03d%%",vgfactor);\r
-    drawText(valbuf,x+bw+x,y+120, Colour::LIGHTTEXT);\r
-    drawText("<4 5>",x+bw+x,y+144, Colour::LIGHTTEXT);\r
+    drawText(valbuf,x+bw+x,y+120, DrawStyle::LIGHTTEXT);\r
+    drawText("<4 5>",x+bw+x,y+144, DrawStyle::LIGHTTEXT);\r
     sprintf(valbuf,"%03d%%",vbfactor);\r
-    drawText(valbuf,x+bw+x,y+190, Colour::LIGHTTEXT);\r
-    drawText("<7 8>",x+bw+x,y+214, Colour::LIGHTTEXT);\r
+    drawText(valbuf,x+bw+x,y+190, DrawStyle::LIGHTTEXT);\r
+    drawText("<7 8>",x+bw+x,y+214, DrawStyle::LIGHTTEXT);\r
     sprintf(valbuf,"%03d%%",(vbfactor+vgfactor+vrfactor)/3);\r
-    drawText(valbuf,x+bw+x,y+270, Colour::LIGHTTEXT);\r
-    drawText("<3 6>",x+bw+x,y+294, Colour::LIGHTTEXT);\r
-    drawText("9 norm",x+bw+x,y+318, Colour::LIGHTTEXT);\r
-    drawText(tr("OK to save, BACK to cancel"), x+20, area.h - 50, Colour::LIGHTTEXT);\r
+    drawText(valbuf,x+bw+x,y+270, DrawStyle::LIGHTTEXT);\r
+    drawText("<3 6>",x+bw+x,y+294, DrawStyle::LIGHTTEXT);\r
+    drawText("9 norm",x+bw+x,y+318, DrawStyle::LIGHTTEXT);\r
+    drawText(tr("OK to save, BACK to cancel"), x+20, area.h - 50, DrawStyle::LIGHTTEXT);\r
     if (drawPicture) {\r
       hasChanged=false;\r
       picture.init(PICTUREFILE);\r
@@ -108,7 +113,7 @@ void VColourTuner::draw()
     }\r
     int picy=picture.getY();\r
     int pich=picture.getHeight();\r
-    if (hasChanged) drawText(tr("0 to draw picture"), picx+30, picy+pich+10, Colour::LIGHTTEXT);\r
+    if (hasChanged) drawText(tr("0 to draw picture"), picx+30, picy+pich+10, DrawStyle::LIGHTTEXT);\r
 }\r
 \r
 int VColourTuner::handleCommand(int command)\r
index 108563e799ee08c2ed49387be829b5b56b3cb297..c816cca4d26d8ae1a124f3a51b06d8420b702c1b 100644 (file)
@@ -47,7 +47,7 @@ class VColourTuner : public TBBoxx
     //amount in +/- %
     void updateFactor(int color, int amount);
     //draw a box with the picture drawing function
-    void drawBox(int x, int y, int w, int h, Colour &c);
+    void drawBox(int x, int y, int w, int h, DrawStyle &c);
     static int rfactor;
     static int bfactor;
     static int gfactor;
@@ -56,7 +56,7 @@ class VColourTuner : public TBBoxx
     int vgfactor;
     bool drawPicture;
     bool hasChanged;
-    WJpeg picture;
+    WJpegTYPE picture;
 
 };
 
index 08479c8929cdf925af961ce1d1ff17ed2e6c324e..d454612eedf0253e59a9ec9c43c63a2edf5611a8 100644 (file)
@@ -330,7 +330,7 @@ VMediaList::VMediaList()
     setPosition(70, 35);
 
   setTitleBarOn(1);
-  setTitleBarColour(Colour::TITLEBARBACKGROUND);
+  setTitleBarColour(DrawStyle::TITLEBARBACKGROUND);
 
   sl.setPosition(10, 30 + 5);
   sl.setSize(area.w - 20, area.h - 30 - 15 - 30);
@@ -510,7 +510,7 @@ void VMediaList::draw()
   {
     sl.setVisible(false);
     TBBoxx::draw();
-    drawText(tr("Loading..."), 240, 180, Colour::LIGHTTEXT);
+    drawText(tr("Loading..."), 240, 180, DrawStyle::LIGHTTEXT);
   }
   else 
   {
@@ -571,13 +571,13 @@ void VMediaList::doShowingBar()
 //  Box b;
 //  b.setSurfaceOffset(220, 385);
 //  b.setDimensions(160, 25);
-//  b.fillColour(Colour::VIEWBACKGROUND);
-//  b.drawText(showing, 0, 0, Colour::LIGHTTEXT);
+//  b.fillColour(DrawStyle::VIEWBACKGROUND);
+//  b.drawText(showing, 0, 0, DrawStyle::LIGHTTEXT);
 
-  rectangle(200, 384, 18, 16, Colour::VIDEOBLUE);
-  rectangle(220, 385, 220+160, 385+25, Colour::VIEWBACKGROUND);
-  drawText(strmode, 220, 385, Colour::LIGHTTEXT);
-  drawText(showing, 280, 385, Colour::LIGHTTEXT);
+  rectangle(200, 384, 18, 16, DrawStyle::VIDEOBLUE);
+  rectangle(220, 385, 220+160, 385+25, DrawStyle::VIEWBACKGROUND);
+  drawText(strmode, 220, 385, DrawStyle::LIGHTTEXT);
+  drawText(showing, 280, 385, DrawStyle::LIGHTTEXT);
   if (sl.getCurrentOptionData() != 0) Log::getInstance()->log("VMediaList",Log::DEBUG,"selected %s",((Media *)sl.getCurrentOptionData())->getDisplayName());
 }
 
index 521f7afdf066b110884da723fb9c6fe50e6f7989..33e44327970bfb3d5e274561c3b410129218402f 100644 (file)
@@ -107,9 +107,9 @@ const int VMediaView::EVENT_DIRECTORYDONE=103;
 \r
 #define DRAWING_THREAD\r
 \r
-Colour VMediaView::pictureBack=Colour(140,140,140);\r
-Colour VMediaView::infoBack=Colour(110,110,110);\r
-Colour VMediaView::audioBannerBack=Colour(110,110,110,20);\r
+DrawStyle VMediaView::pictureBack=DrawStyle(140,140,140);\r
+DrawStyle VMediaView::infoBack=DrawStyle(110,110,110);\r
+DrawStyle VMediaView::audioBannerBack=DrawStyle(110,110,110,20);\r
 //the jpeg reader\r
 \r
 //how long do we wait for a single picture chunk\r
@@ -174,7 +174,7 @@ class DrawingThread : public Thread_TYPE {
     VPreader * _reader;\r
     WJpegComplex::JpegControl *_ctl;\r
     Surface *_sfc;\r
-    Colour _colour;\r
+    DrawStyle _colour;\r
     bool _interrupted;\r
   public:\r
     DrawingThread(VMediaView *parent) {\r
@@ -188,7 +188,7 @@ class DrawingThread : public Thread_TYPE {
     bool isRunning() {\r
       return (threadIsActive()!=0);\r
     }\r
-    bool start(WJpeg::JpegControl *ctl,Surface *sfc,VPreader *reader,Colour &c) {\r
+    bool start(WJpegComplex::JpegControl *ctl,Surface *sfc,VPreader *reader,DrawStyle &c) {\r
       if (isRunning()) {\r
         return false;\r
       }\r
@@ -213,7 +213,7 @@ class DrawingThread : public Thread_TYPE {
   protected:\r
     virtual void threadMethod() {\r
       Log::getInstance()->log("DrawingThread",Log::DEBUG,"started");\r
-      bool rt=WJpeg::drawJpeg(_ctl,_sfc,_reader,_colour);\r
+      bool rt=WJpegComplex::drawJpeg(_ctl,_sfc,_reader,_colour);\r
       _reader=NULL;\r
       if (! _interrupted) {\r
         Message* m = new Message(); \r
@@ -420,9 +420,9 @@ void VMediaView::draw()
   Log::getInstance()->log("VMediaView::draw", Log::DEBUG, "pictureError=%s,p=%p", pictureError,this);\r
   \r
   if (pictureShowing ) fillColour(pictureBack);\r
-  else fillColour(Colour::BLACK);\r
+  else fillColour(DrawStyle::BLACK);\r
   if (pictureError) {\r
-    drawText(pictureError,100,area.h/2,Colour::LIGHTTEXT);\r
+    drawText(pictureError,100,area.h/2,DrawStyle::LIGHTTEXT);\r
     return;\r
     }\r
 }\r
@@ -448,7 +448,7 @@ int VMediaView::handleCommand(int command)
       case Remote::DF_UP:\r
       case Remote::UP:\r
       case Remote::SKIPBACK:\r
-        rotate=WJpegCmplex::ROT_0;\r
+        rotate=WJpegComplex::ROT_0;\r
         showPicture(VMediaList::MV_PREV,slideshow,true);\r
         rt= 2;\r
         break;\r
@@ -510,7 +510,7 @@ int VMediaView::handleCommand(int command)
       case Remote::RED:\r
         switch(rotate) {\r
           case WJpegComplex::ROT_0:\r
-            rotate=WJpeg::ROT_90;\r
+            rotate=WJpegComplex::ROT_90;\r
             break;\r
           case WJpegComplex::ROT_90:\r
             rotate=WJpegComplex::ROT_180;\r
@@ -533,10 +533,10 @@ int VMediaView::handleCommand(int command)
       case Remote::BLUE:\r
         switch (cropmode) {\r
           case WJpegComplex::CROP:\r
-            cropmode=WJpeg::LETTER;\r
+            cropmode=WJpegComplex::LETTER;\r
             break;\r
           case WJpegComplex::LETTER:\r
-            cropmode=WJpeg::CROPPERCENT;\r
+            cropmode=WJpegComplex::CROPPERCENT;\r
             break;\r
           default:\r
             cropmode=WJpegComplex::CROP;\r
@@ -1247,7 +1247,7 @@ void VMediaView::drawAudioInfo(){
     len=strlen(first)+3;\r
   }\r
   else {\r
-    playerInfo=getPlayer()->getID3Info();drawText(tr("Loading"),5,3,Colour::LIGHTTEXT);\r
+    playerInfo=getPlayer()->getID3Info();drawText(tr("Loading"),5,3,DrawStyle::LIGHTTEXT);\r
     len=strlen(currentAudio->getDisplayName())+strlen(pl)+30+strlen(parent->getDirname(MEDIA_TYPE_AUDIO))+Media::TIMEBUFLEN+110;\r
     if (playerInfo) {\r
       for (UINT i=0;i<strlen(playerInfo);i++) \r
@@ -1325,16 +1325,16 @@ void VMediaView::drawAudioInfo(){
   //now the real drawing functions\r
   info->draw();\r
   //title\r
-  info->rectangle(0, 0, info->getWidth(), 30, Colour::TITLEBARBACKGROUND);\r
-  info->drawText(title, 5, 5, Colour::LIGHTTEXT);\r
-  info->drawPara(buf,5,32,Colour::LIGHTTEXT);\r
+  info->rectangle(0, 0, info->getWidth(), 30, DrawStyle::TITLEBARBACKGROUND);\r
+  info->drawText(title, 5, 5, DrawStyle::LIGHTTEXT);\r
+  info->drawPara(buf,5,32,DrawStyle::LIGHTTEXT);\r
   delete [] buf;\r
   if (! audioError) {\r
     WSymbol w;\r
     info->TEMPADD(&w);\r
     int x=10;\r
     int ybottom=info->getHeight();\r
-    info->rectangle(0, ybottom - barRegion.h, info->getWidth(), barRegion.h, Colour::TITLEBARBACKGROUND);\r
+    info->rectangle(0, ybottom - barRegion.h, info->getWidth(), barRegion.h, DrawStyle::TITLEBARBACKGROUND);\r
     bool drawSymbol=true;\r
     switch(getPlayer()->getState()) {\r
       case AudioPlayer::S_PAUSE:\r
@@ -1365,7 +1365,7 @@ void VMediaView::drawAudioInfo(){
     }\r
     else {\r
       //stop symbol\r
-      info->rectangle(x, ybottom - 23, 18, 16, Colour::LIGHTTEXT);\r
+      info->rectangle(x, ybottom - 23, 18, 16, DrawStyle::LIGHTTEXT);\r
     }\r
     x+=30;\r
     drawAudioClocks();\r
@@ -1378,7 +1378,7 @@ void VMediaView::drawAudioClocks() {
        if (! info || ! audioEnabled) return;\r
        Log::getInstance()->log("VMediaView::drawAudioClocks", Log::DEBUG, "");\r
   //draw clocks and bar\r
-  info->rectangle(clocksRegion, Colour::TITLEBARBACKGROUND);\r
+  info->rectangle(clocksRegion, DrawStyle::TITLEBARBACKGROUND);\r
 \r
   time_t currentSec = (time_t)(getPlayer()->getCurrentTimes());\r
   time_t lengthSec=(time_t)(getPlayer()->getSonglen());\r
@@ -1405,13 +1405,13 @@ void VMediaView::drawAudioClocks() {
                //Log::getInstance()->log("VMediaView", Log::DEBUG, buffer);\r
   }\r
 \r
-  info->drawText(buffer, clocksRegion.x, clocksRegion.y, Colour::LIGHTTEXT);\r
+  info->drawText(buffer, clocksRegion.x, clocksRegion.y, DrawStyle::LIGHTTEXT);\r
   \r
        // Draw progress bar\r
   int progBarXbase = 0;\r
        int barlen=250;\r
 \r
-  info->rectangle(barRegion.x + progBarXbase, barRegion.y + 3, barlen+10, 24, Colour::LIGHTTEXT);\r
+  info->rectangle(barRegion.x + progBarXbase, barRegion.y + 3, barlen+10, 24, DrawStyle::LIGHTTEXT);\r
   info->rectangle(barRegion.x + progBarXbase + 2, barRegion.y + 5, barlen+6, 20, barBlue);\r
 \r
   if (currentSec > lengthSec) currentSec=lengthSec;\r
@@ -1419,7 +1419,7 @@ void VMediaView::drawAudioClocks() {
 \r
   // Draw yellow portion\r
   int progressWidth = (barlen+2) * currentSec / lengthSec;\r
-  info->rectangle(barRegion.x + progBarXbase + 4, barRegion.y + 7, progressWidth, 16, Colour::SELECTHIGHLIGHT);\r
+  info->rectangle(barRegion.x + progBarXbase + 4, barRegion.y + 7, progressWidth, 16, DrawStyle::SELECTHIGHLIGHT);\r
 \r
 }\r
 \r
@@ -1436,12 +1436,12 @@ void VMediaView::showAudioBanner() {
   audioBanner->setTitleBarOn(0);\r
   audioBanner->setDropThrough();\r
   if ( ! currentAudio || ! currentAudio->getDisplayName() || audioError) {\r
-    audioBanner->drawText(tr("AudioPlayer - not playing"),5,3,Colour::LIGHTTEXT);\r
+    audioBanner->drawText(tr("AudioPlayer - not playing"),5,3,DrawStyle::LIGHTTEXT);\r
   }\r
   else {\r
     char * buf=new char[strlen(currentAudio->getDisplayName())+50];\r
     SNPRINTF(buf,50,"%s %s",tr("AudioPlayer"),currentAudio->getDisplayName());\r
-    audioBanner->drawText(buf,5,3,Colour::LIGHTTEXT);\r
+    audioBanner->drawText(buf,5,3,DrawStyle::LIGHTTEXT);\r
     delete buf;\r
   }\r
   BoxStack::getInstance()->add(audioBanner);\r
index 5ed240db3dbc3fd28440d2a3d7b9613a4f29ae1c..7e6d10aaa13c96cf91d6d1e2f50a424d86350aee 100644 (file)
@@ -30,6 +30,7 @@
 #include "vmedialist.h"
 #include "colour.h"
 #include "wjpeg.h"
+#include "wjpegcomplex.h"
 #include "imagereader.h"
 
 #define TESTCOLOURS
@@ -136,9 +137,9 @@ class VMediaView : public Boxx, public TimerReceiver
     WJpegComplex::Rotation rotate;
     WJpegComplex::ScaleMode cropmode;
     VInfo * info;
-    static Colour pictureBack;
-    static Colour infoBack;
-    static Colour audioBannerBack;
+    static DrawStyle pictureBack;
+    static DrawStyle infoBack;
+    static DrawStyle audioBannerBack;
     int currentScale;
     MediaOptions *options;
     WJpegComplex::JpegControl ctl;
@@ -186,7 +187,7 @@ class VMediaView : public Boxx, public TimerReceiver
                bool justPlaying;
                Region barRegion;
                Region clocksRegion;
-         Colour barBlue;
+         DrawStyle barBlue;
     //retrigger info on events?
     bool retriggerAudioInfo;
     VInfo *audioBanner;
diff --git a/wjpeg.h b/wjpeg.h
index 4de5478e8b634c9988f42774782480f0f2bc5747..b52931a06b9f3a11f111e1182c0a61ff973619ae 100644 (file)
--- a/wjpeg.h
+++ b/wjpeg.h
@@ -48,12 +48,12 @@ class WJpeg : public Boxx
 };\r
 \r
 \r
-#if !defined(WIN32) || !defined(__ANDROID)\r
-#define WJpegTYPE WJpegSimple\r
-#include "wjpegsimple.h"\r
-#else\r
+#if defined(VOMP_PLATTFORM_MVP) //Complex jpegs only on mvp\r
 #define WJpegTYPE WJpegComplex\r
 #include "wjpegcomplex.h"\r
+#else\r
+#define WJpegTYPE WJpegSimple\r
+#include "wjpegsimple.h"\r
 #endif\r
 \r
 #endif\r
index b0a58f67047fac1c9eb616fa87cdbff960c1360d..7b1516872d2b90ca4be01952836d9da875c21ca3 100644 (file)
@@ -47,7 +47,7 @@ extern "C"
 //a struct to store user data for the jpeg decompressor\r
 class jpegUserData{\r
   public:\r
-    WJpeg::JpegControl * ctl;\r
+    WJpegComplex::JpegControl * ctl;\r
     JpegReader *reader;\r
     jpegUserData() {\r
       ctl=NULL;\r
@@ -516,13 +516,13 @@ get_exif_orient (j_decompress_ptr cinfo)
         ud=(jpegUserData *)(mysrc->userdata);\r
         switch(orient) {\r
           case 3:\r
-            ud->ctl->exifRotation=WJpeg::ROT_180;\r
+            ud->ctl->exifRotation=WJpegComplex::ROT_180;\r
             break;\r
           case 6:\r
-            ud->ctl->exifRotation=WJpeg::ROT_90;\r
+            ud->ctl->exifRotation=WJpegComplex::ROT_90;\r
             break;\r
           case 8:\r
-            ud->ctl->exifRotation=WJpeg::ROT_270;\r
+            ud->ctl->exifRotation=WJpegComplex::ROT_270;\r
             break;\r
         }\r
 \r
@@ -589,9 +589,9 @@ void WJpegComplex::draw()
     SNPRINTF(errbuf,200,"jpeg reader not initialized");\r
   }\r
   if (! ok) {\r
-    drawTextCentre(tr("Jpeg ERROR"), 240, 170, Colour::LIGHTTEXT);\r
-    if (errbuf[0] != 0) drawTextCentre(errbuf,240,200, Colour::LIGHTTEXT);\r
-    if (ctl.error[0] != 0) drawTextCentre(ctl.error,240,230, Colour::LIGHTTEXT);\r
+    drawTextCentre(tr("Jpeg ERROR"), 240, 170, DrawStyle::LIGHTTEXT);\r
+    if (errbuf[0] != 0) drawTextCentre(errbuf,240,200, DrawStyle::LIGHTTEXT);\r
+    if (ctl.error[0] != 0) drawTextCentre(ctl.error,240,230, DrawStyle::LIGHTTEXT);\r
   }\r
 }\r
 \r
@@ -607,7 +607,7 @@ void WJpegComplex::draw()
 \r
 #ifndef __ANDROID__\r
 \r
-bool WJpegComplex::drawJpeg(JpegControl * ctl,Surface * sfc,JpegReader *rdr, Colour & backgroundColour) {\r
+bool WJpegComplex::drawJpeg(JpegControl * ctl,Surface * sfc,JpegReader *rdr, DrawStyle & backgroundColour) {\r
   Log* logger = Log::getInstance();\r
   if (! rdr || ! sfc) {\r
     logger->log("BJpeg", Log::ERR, "JPEG error rdr=NULL or sfc=NULL");\r
@@ -779,7 +779,7 @@ bool WJpegComplex::drawJpeg(JpegControl * ctl,Surface * sfc,JpegReader *rdr, Col
       picturew, pictureh,xpos,ypos,jpegwidth,jpegheight,(int)ctl->finalRotation*90);\r
 \r
   //fill the background\r
-  sfc->fillblt(ctl->area.x,ctl->area.y,ctl->area.w,ctl->area.h,backgroundColour.rgba());\r
+  sfc->fillblt(ctl->area.x,ctl->area.y,ctl->area.w,ctl->area.h,backgroundColour);\r
 \r
   //line len in bytes (3 bytes per Pixel) - for buffer (can be bigger then surface)\r
   int linelen=jpegwidth*3;\r
@@ -807,7 +807,7 @@ bool WJpegComplex::drawJpeg(JpegControl * ctl,Surface * sfc,JpegReader *rdr, Col
 \r
   int rowsread = 0;\r
 \r
-  Colour c;\r
+  DrawStyle c;\r
   sfc->startFastDraw();//Tell the surface, that we will draw a lot of pixel,\r
   //so that performance, can be optimized\r
   logger->log("BJpeg", Log::DEBUG, "start drawing ");\r
@@ -876,7 +876,7 @@ bool WJpegComplex::drawJpeg(JpegControl * ctl,Surface * sfc,JpegReader *rdr, Col
 \r
 \r
 #else\r
-bool WJpegComplex::drawJpeg(JpegControl * ctl,Surface * sfc,JpegReader *rdr, Colour & backgroundColour) {\r
+bool WJpegComplex::drawJpeg(JpegControl * ctl,Surface * sfc,JpegReader *rdr, DrawStyle & backgroundColour) {\r
        return true;\r
 }\r
 #endif\r
index 06f9ebd6940e813b236580c2fdbc88214932575d..008e4a594def5750d81ea55ac96a923857a39291 100644 (file)
@@ -141,7 +141,7 @@ class WJpegComplex : public WJpeg
     //the reader has to be initialized before\r
     //calling this function does not need a WJpeg being instantiated\r
     //it simply draws into the surface\r
-    bool static drawJpeg(JpegControl * control, Surface* sfc, JpegReader *rdr, Colour & backgroundColour);\r
+    bool static drawJpeg(JpegControl * control, Surface* sfc, JpegReader *rdr, DrawStyle & backgroundColour);\r
 \r
   private:\r
     //our drawPixel with considers rotation\r