Merge lp:~compiz-team/compiz-grid-plugin/compiz-grid-plugin.less-eye-burning into lp:compiz-grid-plugin

Proposed by Sam Spilsbury
Status: Merged
Approved by: Gord Allott
Approved revision: no longer in the source branch.
Merged at revision: 87
Proposed branch: lp:~compiz-team/compiz-grid-plugin/compiz-grid-plugin.less-eye-burning
Merge into: lp:compiz-grid-plugin
Diff against target: 45 lines (+17/-8)
1 file modified
src/grid.cpp (+17/-8)
To merge this branch: bzr merge lp:~compiz-team/compiz-grid-plugin/compiz-grid-plugin.less-eye-burning
Reviewer Review Type Date Requested Status
Compiz Maintainers Pending
Review via email: mp+72858@code.launchpad.net

Description of the change

premultiply colors

To post a comment you must log in.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'src/grid.cpp'
--- src/grid.cpp 2011-05-26 11:30:01 +0000
+++ src/grid.cpp 2011-08-25 10:56:46 +0000
@@ -379,10 +379,13 @@
379 {379 {
380 GLushort *color;380 GLushort *color;
381 Animation& anim = *iter;381 Animation& anim = *iter;
382 float alpha = (float) optionGetFillColorAlpha () / 65535.0f * anim.opacity;
382383
383 color = optionGetFillColor ();384 /* fill rectangle */
384 glColor4us (anim.opacity * color[0], anim.opacity * color[1],385 glColor4f (((float) optionGetFillColorRed () / 65535.0f) * alpha,
385 anim.opacity * color[2], anim.opacity * color[3]);386 ((float) optionGetFillColorGreen () / 65535.0f) * alpha,
387 ((float) optionGetFillColorBlue () / 65535.0f) * alpha,
388 alpha);
386389
387 /* fill rectangle */390 /* fill rectangle */
388 glRecti (anim.currentRect.x1 (), anim.currentRect.y2 (),391 glRecti (anim.currentRect.x1 (), anim.currentRect.y2 (),
@@ -390,14 +393,20 @@
390393
391 /* Set outline rect smaller to avoid damage issues */394 /* Set outline rect smaller to avoid damage issues */
392 anim.currentRect.setGeometry (anim.currentRect.x () + 1,395 anim.currentRect.setGeometry (anim.currentRect.x () + 1,
393 anim.currentRect.y () + 1,396 anim.currentRect.y () + 1,
394 anim.currentRect.width () - 2,397 anim.currentRect.width () - 2,
395 anim.currentRect.height () - 2);398 anim.currentRect.height () - 2);
396399
397 /* draw outline */400 /* draw outline */
398 color = optionGetOutlineColor ();401 color = optionGetOutlineColor ();
399 glColor4us (anim.opacity * color[0], anim.opacity * color[1],402
400 anim.opacity * color[2], anim.opacity * color[3]);403 /* draw outline */
404 glColor4f (((float) optionGetOutlineColorRed () / 65535.0f) * alpha,
405 ((float) optionGetOutlineColorGreen () / 65535.0f) * alpha,
406 ((float) optionGetOutlineColorBlue () / 65535.0f) * alpha,
407 ((float) optionGetOutlineColorAlpha () / 65535.0f) * anim.opacity);
408
409 glColor4us (color[0], color[1], color[2], anim.opacity * color[3]);
401410
402 glLineWidth (2.0);411 glLineWidth (2.0);
403412

Subscribers

People subscribed via source and target branches

to all changes: