~ubuntu-branches/ubuntu/lucid/mythtv/lucid

« back to all changes in this revision

Viewing changes to libs/libmythui/mythimage.cpp

  • Committer: Bazaar Package Importer
  • Author(s): Mario Limonciello, Mario Limonciello, John Baab
  • Date: 2009-09-29 01:33:23 UTC
  • mfrom: (1.1.35 upstream)
  • Revision ID: james.westby@ubuntu.com-20090929013323-6pvn8encm757zbxw
Tags: 0.22.0~trunk22101-0ubuntu1
[ Mario Limonciello ]
* New upstream checkout (r22101)
* Try to guard and make sure that ~mythtv is read from /etc/passwd 
  rather than assuming it's /home/mythtv.

[ John Baab ]
* debian/mythtv-common.postinst:
  - Added symlink for /home/mythtv/.mythtv/config.xml

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
#include <cassert>
 
1
 
 
2
// Own header
 
3
#include "mythimage.h"
 
4
 
 
5
// C++ headers
2
6
#include <stdint.h>
3
7
 
4
8
// QT headers
5
9
#include <QPainter>
6
10
#include <QMatrix>
7
 
 
8
 
#include "mythimage.h"
 
11
#include <QRgb>
 
12
 
 
13
// Mythdb headers
 
14
#include "mythverbose.h"
 
15
 
 
16
// Myth headers
 
17
#include "remotefile.h"
 
18
 
 
19
// MythUI headers
 
20
#include "mythuihelper.h"
9
21
#include "mythmainwindow.h"
10
 
#include "mythuihelper.h"
11
 
#include "remotefile.h"
12
22
 
13
23
MythUIHelper *MythImage::m_ui = NULL;
14
24
 
15
25
MythImage::MythImage(MythPainter *parent)
16
26
{
17
 
    assert(parent);
 
27
    if (!parent)
 
28
        VERBOSE(VB_IMPORTANT, "ERROR: Image created without parent!");
18
29
 
19
30
    m_Parent = parent;
20
31
    m_RefCount = 0;
210
221
    if (isGrayscale())
211
222
        return;
212
223
 
213
 
    for (int y = 0; y < height(); y++)
 
224
    for (int y = 0; y < height(); ++y)
214
225
    {
215
 
        for (int x = 0; x < width(); x++)
 
226
        for (int x = 0; x < width(); ++x)
216
227
        {
217
228
            QRgb oldPixel = pixel(x, y);
218
229
            int greyVal = qGray(oldPixel);
307
318
 
308
319
    if (drawBoundary)
309
320
    {
310
 
        // Draw boundry rect
 
321
        // Draw boundary rect
311
322
        QColor black(0, 0, 0, alpha);
312
323
        painter.setPen(black);
313
324
        QPen pen = painter.pen();