From patchwork Wed Aug 26 19:08:39 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: jlacvdr X-Patchwork-Id: 12749 Received: from mail-fx0-f228.google.com ([209.85.220.228]) by mail.linuxtv.org with esmtp (Exim 4.69) (envelope-from ) id 1MgNrt-0000sE-2E for vdr@linuxtv.org; Wed, 26 Aug 2009 21:09:13 +0200 Received: by fxm28 with SMTP id 28so381567fxm.17 for ; Wed, 26 Aug 2009 12:08:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :date:message-id:subject:from:to:content-type; bh=35vrvzEooNSTnws+jiXxxnk7G5r2ZULip/7l2NOeEp8=; b=VOg7chzTYywVHymfA5KxnaB9hk/f/MuXTrKD5ZlyVSHrBEeY618hhKOnTxb0mMxwIf 9G8sOgZcYFZee+63qNHSUEtJAVXrrt5i4r9K0fJlEI+aUFfICNSGwbDkzlAG4YsO7ehz z4yGCbVA2StzRRgrgTKVZnqlPSAjxCTlmTm1U= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; b=s3lc/iEB8ygX30Sj5R7PTuf2I5Kyjxz/NaIqfDazpYFnBqGBl/nCmcfZIgIaIlEVqM 34KXNWKherV3JgvxyZAyuqLzn5ovEB8u2YvbxpHfDNHbEePvWdM3rAI7c2BQ1y853FXv W24AL9uKNlz2uLkUNKGzYaqwWK1IVKJxD72xk= MIME-Version: 1.0 Received: by 10.204.11.9 with SMTP id r9mr3994297bkr.34.1251313719406; Wed, 26 Aug 2009 12:08:39 -0700 (PDT) In-Reply-To: References: Date: Wed, 26 Aug 2009 21:08:39 +0200 Message-ID: From: jlacvdr To: vdr@linuxtv.org X-LSpam-Score: -2.5 (--) X-LSpam-Report: No, score=-2.5 required=5.0 tests=AWL=0.108, BAYES_00=-2.599 autolearn=ham Subject: Re: [vdr] [skinenigmang] [PATCH] rounds to squares corners & jpeg logos for skinenigmang-0.1.0 X-BeenThere: vdr@linuxtv.org X-Mailman-Version: 2.1.11 Precedence: list Reply-To: VDR Mailing List List-Id: VDR Mailing List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 26 Aug 2009 19:09:13 -0000 Status: O X-Status: X-Keywords: X-UID: 21208 Hi, This is an additional patch for huge osd (hd device) : skinenigmang-0.1.0-jlac-hdosd-090826.diff - change the logo size, now proportional to the osd font height. - change the symbol line height, now proportional to the osd font height. Regards, JLac 2009/5/2 jlacvdr : > Hi, > > attached file: skinenigmang-0.1.0-jlac-corners-090502.diff > - change rounds corners to squares corners. > > attached file: skinenigmang-0.1.0-jlac-logos-090502.diff > - replace xpm format by logos in 256colors and jpeg > - simplify the logo filenames on disk: at runtine make it lower case, > without space, without underscore.... so avoid many times the same > logo file (or symbolic link) on the disk > - add a svdr command to check the name logos > - theme added (grey/white/black) > > Regards, > > JLac > diff -bBurN skinenigmang-0.1.0/enigma.c skinenigmang-0.1.0-hdosd/enigma.c --- skinenigmang-0.1.0/enigma.c 2009-08-25 21:10:00.000000000 +0200 +++ skinenigmang-0.1.0-hdosd/enigma.c 2009-08-25 21:18:00.000000000 +0200 @@ -794,11 +794,14 @@ osd->DrawRectangle(0, 0, osd->Width(), osd->Height(), clrTransparent); if (fShowLogo) { + int logoWidth = (xLogoRight - xLogoLeft); + int logoHeight = (yLogoBottom - yLogoTop); + // draw logo area osd->DrawRectangle(xLogoLeft, yLogoTop, xLogoRight - 1, yLogoBottom - 1, Theme.Color(clrLogoBg)); osd->DrawRectangle(xLogoDecoLeft, yLogoTop, xLogoDecoRight - 1, yLogoBottom - 1, Theme.Color(clrLogoBg)); - if (EnigmaLogoCache.LoadChannelLogo(Channel)) { + if (EnigmaLogoCache.LoadChannelLogo(Channel,logoWidth,logoHeight)) { int lw = EnigmaLogoCache.Get().Width(); int lh = EnigmaLogoCache.Get().Height(); osd->DrawBitmap(xLogoLeft + (xLogoRight - xLogoLeft - lw) / 2, diff -bBurN skinenigmang-0.1.0/logo.c skinenigmang-0.1.0-hdosd/logo.c --- skinenigmang-0.1.0/logo.c 2009-08-25 21:10:00.000000000 +0200 +++ skinenigmang-0.1.0-hdosd/logo.c 2009-08-25 21:18:00.000000000 +0200 @@ -110,7 +110,7 @@ *name = 0; } -bool cEnigmaLogoCache::LoadChannelLogo(const cChannel *Channel) +bool cEnigmaLogoCache::LoadChannelLogo(const cChannel *Channel, int w, int h) { if (Channel == NULL) return false; @@ -128,12 +128,12 @@ if (filename != NULL) { strcpy(filename, "hqlogos/"); strcat(filename, logoname); - if (!(fFoundLogo = Load(filename, ChannelLogoWidth, ChannelLogoHeight, false))) { + if (!(fFoundLogo = Load(filename, w, h, false))) { strcpy(filename, "logos/"); strcat(filename, logoname); - if (!(fFoundLogo = Load(filename, ChannelLogoWidth, ChannelLogoHeight, false))) { + if (!(fFoundLogo = Load(filename, w, h, false))) { error("cPluginSkinEnigma::LoadChannelLogo: LOGO \"%s.jpg\" NOT FOUND in %s/[hq]logos", logoname, EnigmaConfig.GetLogoDir()); - fFoundLogo = Load("hqlogos/no_logo", ChannelLogoWidth, ChannelLogoHeight); //TODO? different default logo for channel/group? + fFoundLogo = Load("hqlogos/no_logo", w, h); //TODO? different default logo for channel/group? } } free(filename); @@ -226,14 +226,14 @@ return false; struct stat stbuf; - cBitmap *bmp = new cBitmap(1, 1, 8); + cBitmap *bmp = new cBitmap(w, h, 8); // create absolute filename debug("cPluginSkinEnigma::LoadJpg(%s)", fileNameP); // check validity if(lstat(fileNameP, &stbuf) == 0) { - DrawImage(fileNameP,0,0,80,80,230,bmp); + DrawImage(fileNameP,0,0,w,h,230,bmp); if ((bmp->Width() <= w) && (bmp->Height() <= h)) { int numColors; diff -bBurN skinenigmang-0.1.0/logo.h skinenigmang-0.1.0-hdosd/logo.h --- skinenigmang-0.1.0/logo.h 2009-08-25 21:10:00.000000000 +0200 +++ skinenigmang-0.1.0-hdosd/logo.h 2009-08-25 21:18:00.000000000 +0200 @@ -50,7 +50,7 @@ bool Resize(unsigned int cacheSizeP); bool DrawEventImage(const cEvent *Event, int x, int y, int w, int h, int c, cBitmap *bmp); bool DrawRecordingImage(const cRecording *Recording, int x, int y, int w, int h, int c, cBitmap *bmp); - bool LoadChannelLogo(const cChannel *Channel); + bool LoadChannelLogo(const cChannel *Channel, int w, int h); bool LoadSymbol(const char *fileNameP); bool LoadIcon(const char *fileNameP); cBitmap& Get(void);