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

« back to all changes in this revision

Viewing changes to libs/libmythtv/mhi.cpp

  • Committer: Bazaar Package Importer
  • Author(s): Dave Walker (Daviey), Jamie Bennett, Mario Limonciello, Dave Walker (Daviey)
  • Date: 2010-03-23 19:32:33 UTC
  • mfrom: (1.1.49 upstream)
  • Revision ID: james.westby@ubuntu.com-20100323193233-5sv9djoxtlmwt3ca
Tags: 0.23.0+fixes23789-0ubuntu1
[ Jamie Bennett ]
* Fix FTBFS on armel (LP: #537714)

[ Mario Limonciello ]
* mythtv-{common,backend}.{config,templates,postinst}: (LP: #483748)
  - Simplify debconf questions by avoiding showing the generated pw
  - Don't warn about mythtv group.
  - Don't notify about running mythtv-setup.  This is optional (but
    of course encouraged!)
* Set version to include a "+" delimitter.
* Restore libfaad-dev dependency. (LP: #546552)

[ Dave Walker (Daviey) ]
* New snapshot (r23789), based from 0.23-fixes.
* debian/control:
  - mythtv-frontend set to Conflict with mythflix, as it's dropped
    upstream. (LP: #544521)
  - Remove unnecessary and potentially problematic use of Pre-Depends.
  - Set the debug package to Priority extra.
  - Change *-perl Section's from libs to perl
  - add ${shlibs:Depends} for mythtv-common Depends field
  - Minor spelling fix.
  - Fixes the long description for one of the packages, ensuring the
    description doesn't exceed 80 characters.
  - Vcs-* set to -fixes, rather than -trunk.
* debian/rules:
  - Use debconf-updatepo to update translations when required
  - Ensure license files are not included in the binary packages, except 
    for debian/copyright.
  - Fixes the permissions of certain files in the packaging.
* debian/copyright:
  - updated to reflect that mythtv is GPL-2 only.
  - inserted better licence statement and Copyright reference.
* debian/mythtv-*.templates
  - Simplified strings; removed verbosity and improved readability.
* Prevent the maintainer scripts from failing in case any questions 
  can't be displayed.
* Added holding debian/mythtv-frontend.config, mainly to appease lintian.
* debian/mythtv-frontend.menu: Changed section to Applications/Graphics.
* debian/mythtv-backend.postinst: Load debconf libraries.
* debian/source.lintian-overrides: Removes the unecessary override of the 
  binNMU warnings.
* Fix perl binding installation.

Show diffs side-by-side

added added

removed removed

Lines of Context:
91
91
    FT_Error errorD = FT_New_Face(ft_library, fnameD.constData(), 0, &m_face);
92
92
    if (!errorD)
93
93
        return true;
94
 
   
 
94
 
95
95
    VERBOSE(VB_IMPORTANT, QString("Unable to find font: %1").arg(name));
96
96
    return false;
97
97
}
360
360
}
361
361
 
362
362
// Called from tv_play when a key is pressed.
363
 
// If it is one in the current profile we queue it for the engine 
 
363
// If it is one in the current profile we queue it for the engine
364
364
// and return true otherwise we return false.
365
365
bool MHIContext::OfferKey(QString key)
366
366
{
481
481
 
482
482
// An area of the screen/image needs to be redrawn.
483
483
// Called from the MHEG engine.
484
 
// We always redraw the whole scene. 
 
484
// We always redraw the whole scene.
485
485
void MHIContext::RequireRedraw(const QRegion &)
486
486
{
487
487
    m_display_lock.lock();
505
505
    QImage img = image;
506
506
    int xboundary = dispx & 1;
507
507
    int yboundary = dispx & 1;
508
 
    
 
508
 
509
509
    if (xboundary || yboundary)
510
510
    {
511
511
        int width = img.width(), height = img.height();
548
548
    m_display.push_back(data);
549
549
}
550
550
 
551
 
// In MHEG the video is just another item in the display stack 
 
551
// In MHEG the video is just another item in the display stack
552
552
// but when we create the OSD we overlay everything over the video.
553
553
// We need to cut out anything belowthe video on the display stack
554
554
// to leave the video area clear.
884
884
        return;
885
885
 
886
886
    QRect bounds = reg.boundingRect();
887
 
    DrawRect(bounds.x(), bounds.y(), bounds.width(), bounds.height(), 
 
887
    DrawRect(bounds.x(), bounds.y(), bounds.width(), bounds.height(),
888
888
             MHRgba(0, 0, 0, 255)/* black. */);
889
889
}
890
890
 
920
920
// Return the bounding rectangle for a piece of text drawn in the
921
921
// current font. If maxSize is non-negative it sets strLen to the
922
922
// number of characters that will fit in the space and returns the
923
 
// bounds for those characters. 
 
923
// bounds for those characters.
924
924
// N.B.  The box is relative to the origin so the y co-ordinate will
925
925
// be negative. It's also possible that the x co-ordinate could be
926
926
// negative for slanted fonts but that doesn't currently happen.
953
953
            FT_Get_Kerning(face, previous, glyphIndex,
954
954
                           FT_KERNING_DEFAULT, &delta);
955
955
            kerning = delta.x;
956
 
        } 
 
956
        }
957
957
 
958
958
        error = FT_Load_Glyph(face, glyphIndex, 0); // Don't need to render.
959
959
 
1036
1036
            FT_Get_Kerning(face, previous, glyphIndex,
1037
1037
                           FT_KERNING_DEFAULT, &delta);
1038
1038
            posX += delta.x;
1039
 
        } 
 
1039
        }
1040
1040
        error = FT_Load_Glyph(face, glyphIndex, FT_LOAD_RENDER);
1041
1041
 
1042
1042
        if (error)
1375
1375
            lastX = thisX;
1376
1376
            lastY = thisY;
1377
1377
        }
1378
 
        
 
1378
 
1379
1379
        // Find the intersections of each line in the line segment array
1380
1380
        // with the scan line.  Because UK MHEG says that figures should be
1381
1381
        // convex we only need to consider two intersections.
1388
1388
            {
1389
1389
                if (y >= lineArray[l].yBottom && y < lineArray[l].yTop)
1390
1390
                {
1391
 
                    int x = (int)round((float)(y - lineArray[l].yBottom) * 
 
1391
                    int x = (int)round((float)(y - lineArray[l].yBottom) *
1392
1392
                        lineArray[l].slope) + lineArray[l].xBottom;
1393
1393
                    if (crossings == 0 || x < xMin)
1394
1394
                        xMin = x;