~lbrulet-8/compiz-plugins-main/fix-876591

« back to all changes in this revision

Viewing changes to grid/src/grid.cpp

  • Committer: Package Import Robot
  • Author(s): Didier Roche, David Barth, Didier Roche
  • Date: 2011-09-09 16:21:26 UTC
  • mfrom: (1.1.6 upstream)
  • Revision ID: package-import@ubuntu.com-20110909162126-vf2y3xv7anhjtq5c
Tags: 1:0.9.5.94-0ubuntu1
[ David Barth ] 
* Test build for release (0.9.5.94) 
* Removed patches integrated upstream:
  - debian/patches/01_grid_defaults.patch
* Add another patch for the same grid, but with other changes
  - debian/patches/01-grid-fix-rev87.patch: prevent eye bleeding

[ Didier Roche ]
* debian/control: bump build-dep for ABI break

Show diffs side-by-side

added added

removed removed

Lines of Context:
377
377
 
378
378
        for (iter = animations.begin (); iter != animations.end () && animating; iter++)
379
379
        {
380
 
                GLushort *color;
381
380
                Animation& anim = *iter;
 
381
                float alpha = ((float) optionGetFillColorAlpha () / 65535.0f) * anim.opacity;
382
382
 
383
 
                color = optionGetFillColor ();
384
 
                glColor4us (anim.opacity * color[0], anim.opacity * color[1],
385
 
                                        anim.opacity * color[2], anim.opacity * color[3]);
 
383
                /* fill rectangle */
 
384
                glColor4f (((float) optionGetFillColorRed () / 65535.0f) * alpha,
 
385
                           ((float) optionGetFillColorGreen () / 65535.0f) * alpha,
 
386
                           ((float) optionGetFillColorBlue () / 65535.0f) * alpha,
 
387
                           alpha);
386
388
 
387
389
                /* fill rectangle */
388
390
                glRecti (anim.currentRect.x1 (), anim.currentRect.y2 (),
390
392
 
391
393
                /* Set outline rect smaller to avoid damage issues */
392
394
                anim.currentRect.setGeometry (anim.currentRect.x () + 1,
393
 
                                                                          anim.currentRect.y () + 1,
394
 
                                                                          anim.currentRect.width () - 2,
395
 
                                                                          anim.currentRect.height () - 2);
 
395
                                              anim.currentRect.y () + 1,
 
396
                                              anim.currentRect.width () - 2,
 
397
                                              anim.currentRect.height () - 2);
 
398
 
 
399
                alpha = (float) (optionGetOutlineColorAlpha () / 65535.0f) * anim.opacity;
396
400
 
397
401
                /* draw outline */
398
 
                color = optionGetOutlineColor ();
399
 
                glColor4us (anim.opacity * color[0], anim.opacity * color[1],
400
 
                                        anim.opacity * color[2], anim.opacity * color[3]);
 
402
                glColor4f (((float) optionGetOutlineColorRed () / 65535.0f) * alpha,
 
403
                           ((float) optionGetOutlineColorGreen () / 65535.0f) * alpha,
 
404
                           ((float) optionGetOutlineColorBlue () / 65535.0f) * alpha,
 
405
                           alpha);
401
406
 
402
407
                glLineWidth (2.0);
403
408
 
412
417
        if (!animating)
413
418
        {
414
419
                /* fill rectangle */
415
 
                glColor4usv (optionGetFillColor ());
 
420
                float alpha = (float) optionGetFillColorAlpha () / 65535.0f;
 
421
 
 
422
                /* fill rectangle */
 
423
                glColor4f (((float) optionGetFillColorRed () / 65535.0f) * alpha,
 
424
                           ((float) optionGetFillColorGreen () / 65535.0f) * alpha,
 
425
                           ((float) optionGetFillColorBlue () / 65535.0f) * alpha,
 
426
                           alpha);
416
427
                glRecti (rect.x1 (), rect.y2 (), rect.x2 (), rect.y1 ());
417
428
 
418
429
                /* Set outline rect smaller to avoid damage issues */
420
431
                                  rect.width () - 2, rect.height () - 2);
421
432
 
422
433
                /* draw outline */
423
 
                glColor4usv (optionGetOutlineColor ());
 
434
                alpha = (float) optionGetOutlineColorAlpha () / 65535.0f;
 
435
 
 
436
                /* draw outline */
 
437
                glColor4f (((float) optionGetOutlineColorRed () / 65535.0f) * alpha,
 
438
                           ((float) optionGetOutlineColorGreen () / 65535.0f) * alpha,
 
439
                           ((float) optionGetOutlineColorBlue () / 65535.0f) * alpha,
 
440
                           alpha);
 
441
 
424
442
                glLineWidth (2.0);
425
443
                glBegin (GL_LINE_LOOP);
426
444
                glVertex2i (rect.x1 (), rect.y1 ());