~ubuntu-branches/ubuntu/raring/lmms/raring-proposed

« back to all changes in this revision

Viewing changes to plugins/zynaddsubfx/fltk/src/Fl_Image.cxx

  • Committer: Charlie Smotherman
  • Date: 2012-12-05 22:08:38 UTC
  • mfrom: (33.1.7 lmms_0.4.13)
  • Revision ID: cjsmo@cableone.net-20121205220838-09pjfzew9m5023hr
* New  Upstream release.
  - Minor tweaking to ZynAddSubFX, CALF, SWH plugins  and Stefan Fendt's RC
    filters.
  - Added UI fixes: Magnentic effect of knobs and Piano-roll fixes
  - Updated German localization and copyright year
* debian/lmms-common.install:
  - added /usr/share/applications so the lmms.desktop file will correctly
    install (LP: #863366)
  - This should also fix the Software Center not displaying lmms in sound
    and video (LP: #824231)

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
//
2
 
// "$Id: Fl_Image.cxx 7659 2010-07-01 13:21:32Z manolo $"
 
2
// "$Id: Fl_Image.cxx 8611 2011-04-20 14:01:04Z AlbrechtS $"
3
3
//
4
4
// Image drawing code for the Fast Light Tool Kit (FLTK).
5
5
//
6
 
// Copyright 1998-2009 by Bill Spitzak and others.
 
6
// Copyright 1998-2010 by Bill Spitzak and others.
7
7
//
8
8
// This library is free software; you can redistribute it and/or
9
9
// modify it under the terms of the GNU Library General Public
379
379
// Composite an image with alpha on systems that don't have accelerated
380
380
// alpha compositing...
381
381
static void alpha_blend(Fl_RGB_Image *img, int X, int Y, int W, int H, int cx, int cy) {
382
 
  uchar *srcptr = (uchar*)img->array + img->d() * (img->w() * cy + cx);
383
 
  int srcskip = img->d() * (img->w() - W);
 
382
  int ld = img->ld();
 
383
  if (ld == 0) ld = img->w() * img->d();
 
384
  uchar *srcptr = (uchar*)img->array + cy * ld + cx * img->d();
 
385
  int srcskip = ld - img->d() * W;
384
386
 
385
387
  uchar *dst = new uchar[W * H * 3];
386
388
  uchar *dstptr = dst;
392
394
 
393
395
  if (img->d() == 2) {
394
396
    // Composite grayscale + alpha over RGB...
395
 
    // Composite RGBA over RGB...
396
397
    for (int y = H; y > 0; y--, srcptr+=srcskip)
397
398
      for (int x = W; x > 0; x--) {
398
399
        srcg = *srcptr++;
586
587
 
587
588
 
588
589
//
589
 
// End of "$Id: Fl_Image.cxx 7659 2010-07-01 13:21:32Z manolo $".
 
590
// End of "$Id: Fl_Image.cxx 8611 2011-04-20 14:01:04Z AlbrechtS $".
590
591
//