diff options
| author | Marco Trevisan (Treviño) <mail@3v1n0.net> | 2012-02-03 21:46:52 +0100 |
|---|---|---|
| committer | Marco Trevisan (Treviño) <mail@3v1n0.net> | 2012-02-03 21:46:52 +0100 |
| commit | 8993dbc88baddadc03b719cd4059878cc5c91095 (patch) | |
| tree | 6967937fe201ebf955e83b1105ee033bf33bfcbf | |
| parent | c0d3514a5451739fa346174cee25031a3c1733e2 (diff) | |
OverlayRenderer: some math cleanup...
(bzr r1886.2.8)
| -rw-r--r-- | plugins/unityshell/src/OverlayRenderer.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/plugins/unityshell/src/OverlayRenderer.cpp b/plugins/unityshell/src/OverlayRenderer.cpp index 71dd7a24d..ac7716ac3 100644 --- a/plugins/unityshell/src/OverlayRenderer.cpp +++ b/plugins/unityshell/src/OverlayRenderer.cpp @@ -256,7 +256,7 @@ void OverlayRendererImpl::Draw(nux::GraphicsEngine& gfx_context, nux::Geometry c nux::Geometry blur_geo(absolute_geo.x, absolute_geo.y, content_geo.width, content_geo.height); bg_blur_texture_ = bg_effect_helper_.GetBlurRegion(blur_geo); - if (bg_blur_texture_.IsValid() && paint_blur) + if (bg_blur_texture_.IsValid()) { nux::Geometry bg_clip = geo; gfx_context.PushClippingRectangle(bg_clip); @@ -340,14 +340,14 @@ void OverlayRendererImpl::Draw(nux::GraphicsEngine& gfx_context, nux::Geometry c gfx_context.GetRenderStates().SetPremultipliedBlend(nux::SRC_OVER); // Fill in corners (meh) - for (int i = 1; i <= INNER_CORNER_RADIUS; ++i) + for (int i = 0; i < INNER_CORNER_RADIUS; ++i) { - nux::Geometry fill_geo (geo.x + geo.width, geo.y + i - 1, 6 - i, 1); + nux::Geometry fill_geo (geo.x + geo.width, geo.y + i, INNER_CORNER_RADIUS - i, 1); nux::GetPainter().Paint2DQuadColor(gfx_context, fill_geo, bg_color_); nux::Color dark = bg_color_ * 0.8f; dark.alpha = bg_color_.alpha; - fill_geo = nux::Geometry(geo.x + i - 1 , geo.y + geo.height, 1, 6 - i); + fill_geo = nux::Geometry(geo.x + i, geo.y + geo.height, 1, INNER_CORNER_RADIUS - i); nux::GetPainter().Paint2DQuadColor(gfx_context, fill_geo, dark); } } |
