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

« back to all changes in this revision

Viewing changes to libs/libmythtv/ttfont.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:
1
1
/*
2
2
 * Copyright (C) 1999 Carsten Haitzler and various contributors
3
 
 * 
 
3
 *
4
4
 * Permission is hereby granted, free of charge, to any person obtaining a copy
5
5
 * of this software and associated documentation files (the "Software"), to
6
6
 * deal in the Software without restriction, including without limitation the
7
7
 * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
8
8
 * sell copies of the Software, and to permit persons to whom the Software is
9
9
 * furnished to do so, subject to the following conditions:
10
 
 * 
 
10
 *
11
11
 * The above copyright notice and this permission notice shall be included in
12
12
 * all copies or substantial portions of the Software.
13
 
 * 
 
13
 *
14
14
 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15
15
 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16
16
 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
66
66
    bool CacheGlyph(unsigned short c) const;
67
67
    Raster_Map *CalcSize(int *width, int *height, const QString &text,
68
68
                         bool double_size = false) const;
69
 
    void RenderText(Raster_Map *rmap, Raster_Map *rchr, const QString &text, 
 
69
    void RenderText(Raster_Map *rmap, Raster_Map *rchr, const QString &text,
70
70
                    int *xorblah, int *yor, bool double_size = false) const;
71
71
    unsigned int CalcWidth(const QString &text) const;
72
72
 
147
147
    }
148
148
}
149
149
 
150
 
void TTFFont::MergeText(OSDSurface *surface, Raster_Map * rmap, int offset_x, 
151
 
                        int offset_y, int xstart, int ystart, int width, 
 
150
void TTFFont::MergeText(OSDSurface *surface, Raster_Map * rmap, int offset_x,
 
151
                        int offset_y, int xstart, int ystart, int width,
152
152
                        int height, int alphamod, kTTF_Color k) const
153
153
{
154
154
    unsigned char * asrc, * ydst, * udst, * vdst, * adst;
176
176
 
177
177
    QRect drawRect(xstart, ystart, width, height);
178
178
    surface->AddRect(drawRect);
179
 
    
 
179
 
180
180
    asrc = rmap->bitmap + rmap->cols * offset_y + offset_x;
181
181
    ydst = surface->y + surface->width * ystart + xstart;
182
182
    adst = surface->alpha + surface->width * ystart + xstart;
209
209
                               surface->pow_lut);
210
210
}
211
211
 
212
 
void TTFFont::DrawString(OSDSurface *surface, int x, int y, 
213
 
                         const QString &text, int maxx, int maxy, 
 
212
void TTFFont::DrawString(OSDSurface *surface, int x, int y,
 
213
                         const QString &text, int maxx, int maxy,
214
214
                         int alphamod, bool double_size) const
215
215
{
216
216
   int                  width, height, w, h, inx, iny, clipx, clipy;
236
236
   is_pixmap = 1;
237
237
 
238
238
   y += m_priv->loadedfontsize;
239
 
   
 
239
 
240
240
   width = maxx;
241
241
   height = (double_size) ? maxy<<1 : maxy;
242
242
 
571
571
    *width = pw + 4;
572
572
    *height = ph;
573
573
 
574
 
    rtmp = create_font_raster(face->size->metrics.x_ppem + 32, 
 
574
    rtmp = create_font_raster(face->size->metrics.x_ppem + 32,
575
575
                              face->size->metrics.y_ppem + 32);
576
576
    return rtmp;
577
577
}
676
676
            ymax = ymin + rtmp->rows - 1;
677
677
 
678
678
        // set up clipping and cursors
679
 
 
 
679
 
680
680
        iread = 0;
681
681
        if (ymin < 0)
682
682
        {
709
709
        _read = (char *)rtmp->bitmap + iread;
710
710
        _off = (char *)rmap->bitmap + ioff;
711
711
        _off2 = _off - rmap->cols;
712
 
       
 
712
 
713
713
        for (y = ymin; y <= ymax; y++)
714
714
        {
715
715
            read = _read;