summaryrefslogtreecommitdiff
diff options
-rw-r--r--resources/dash_left_edge.pngbin504 -> 0 bytes
-rwxr-xr-xunity-shared/DashStyle.cpp86
-rwxr-xr-xunity-shared/DashStyle.h14
-rw-r--r--unity-shared/OverlayRenderer.cpp148
4 files changed, 134 insertions, 114 deletions
diff --git a/resources/dash_left_edge.png b/resources/dash_left_edge.png
deleted file mode 100644
index 53a1fcb34..000000000
--- a/resources/dash_left_edge.png
+++ /dev/null
Binary files differ
diff --git a/unity-shared/DashStyle.cpp b/unity-shared/DashStyle.cpp
index de44ecc87..e1c15cb37 100755
--- a/unity-shared/DashStyle.cpp
+++ b/unity-shared/DashStyle.cpp
@@ -175,6 +175,13 @@ struct Style::Impl : sigc::trackable
void UpdateFormFactor(FormFactor);
void OnFontChanged(GtkSettings* object, GParamSpec* pspec);
+ BaseTexturePtr LoadScaledTexture(std::string const& name, double scale)
+ {
+ int w, h;
+ gdk_pixbuf_get_file_info((PKGDATADIR"/" + name).c_str(), &w, &h);
+ return TextureCache::GetDefault().FindTexture(name, RawPixel(w).CP(scale), RawPixel(h).CP(scale));
+ }
+
// Members
Style* owner_;
@@ -218,20 +225,13 @@ struct Style::Impl : sigc::trackable
LazyLoadTexture category_texture_;
LazyLoadTexture category_texture_no_filters_;
- LazyLoadTexture dash_bottom_texture_;
- LazyLoadTexture dash_bottom_texture_mask_;
- LazyLoadTexture dash_right_texture_;
- LazyLoadTexture dash_right_texture_mask_;
LazyLoadTexture dash_corner_texture_;
LazyLoadTexture dash_corner_texture_mask_;
LazyLoadTexture dash_fullscreen_icon_;
- LazyLoadTexture dash_left_edge_;
LazyLoadTexture dash_left_corner_;
LazyLoadTexture dash_left_corner_mask_;
- LazyLoadTexture dash_left_tile_;
LazyLoadTexture dash_top_corner_;
LazyLoadTexture dash_top_corner_mask_;
- LazyLoadTexture dash_top_tile_;
LazyLoadTexture dash_shine_;
@@ -267,20 +267,13 @@ Style::Impl::Impl(Style* owner)
, text_height_(0)
, category_texture_("/category_gradient.png")
, category_texture_no_filters_("/category_gradient_no_refine.png")
- , dash_bottom_texture_("/dash_bottom_border_tile.png")
- , dash_bottom_texture_mask_("/dash_bottom_border_tile_mask.png")
- , dash_right_texture_("/dash_right_border_tile.png")
- , dash_right_texture_mask_("/dash_right_border_tile_mask.png")
, dash_corner_texture_("/dash_bottom_right_corner.png")
, dash_corner_texture_mask_("/dash_bottom_right_corner_mask.png")
, dash_fullscreen_icon_("/dash_fullscreen_icon.png")
- , dash_left_edge_("/dash_left_edge.png")
, dash_left_corner_("/dash_bottom_left_corner.png")
, dash_left_corner_mask_("/dash_bottom_left_corner_mask.png")
- , dash_left_tile_("/dash_left_tile.png")
, dash_top_corner_("/dash_top_right_corner.png")
, dash_top_corner_mask_("/dash_top_right_corner_mask.png")
- , dash_top_tile_("/dash_top_tile.png")
, dash_shine_("/dash_sheen.png")
, search_magnify_texture_("/search_magnify.png")
, search_circle_texture_("/search_circle.svg", 32)
@@ -2123,6 +2116,36 @@ bool Style::SeparatorHoriz(cairo_t* cr)
return true;
}
+BaseTexturePtr Style::GetDashBottomTile(double scale) const
+{
+ return pimpl->LoadScaledTexture("dash_bottom_border_tile.png", scale);
+}
+
+BaseTexturePtr Style::GetDashBottomTileMask(double scale) const
+{
+ return pimpl->LoadScaledTexture("dash_bottom_border_tile_mask.png", scale);
+}
+
+BaseTexturePtr Style::GetDashRightTile(double scale) const
+{
+ return pimpl->LoadScaledTexture("dash_right_border_tile.png", scale);
+}
+
+BaseTexturePtr Style::GetDashRightTileMask(double scale) const
+{
+ return pimpl->LoadScaledTexture("dash_right_border_tile_mask.png", scale);
+}
+
+BaseTexturePtr Style::GetDashLeftTile(double scale) const
+{
+ return pimpl->LoadScaledTexture("dash_left_tile.png", scale);
+}
+
+BaseTexturePtr Style::GetDashTopTile(double scale) const
+{
+ return pimpl->LoadScaledTexture("dash_top_tile.png", scale);
+}
+
RawPixel Style::GetButtonGarnishSize() const
{
int maxBlurSize = 0;
@@ -2213,26 +2236,6 @@ BaseTexturePtr const& Style::GetCategoryBackgroundNoFilters() const
return pimpl->category_texture_no_filters_.texture();
}
-BaseTexturePtr const& Style::GetDashBottomTile() const
-{
- return pimpl->dash_bottom_texture_.texture();
-}
-
-BaseTexturePtr const& Style::GetDashBottomTileMask() const
-{
- return pimpl->dash_bottom_texture_mask_.texture();
-}
-
-BaseTexturePtr const& Style::GetDashRightTile() const
-{
- return pimpl->dash_right_texture_.texture();
-}
-
-BaseTexturePtr const& Style::GetDashRightTileMask() const
-{
- return pimpl->dash_right_texture_mask_.texture();
-}
-
BaseTexturePtr const& Style::GetDashCorner() const
{
return pimpl->dash_corner_texture_.texture();
@@ -2243,11 +2246,6 @@ BaseTexturePtr const& Style::GetDashCornerMask() const
return pimpl->dash_corner_texture_mask_.texture();
}
-BaseTexturePtr const& Style::GetDashLeftEdge() const
-{
- return pimpl->dash_left_edge_.texture();
-}
-
BaseTexturePtr const& Style::GetDashLeftCorner() const
{
return pimpl->dash_left_corner_.texture();
@@ -2258,11 +2256,6 @@ BaseTexturePtr const& Style::GetDashLeftCornerMask() const
return pimpl->dash_left_corner_mask_.texture();
}
-BaseTexturePtr const& Style::GetDashLeftTile() const
-{
- return pimpl->dash_left_tile_.texture();
-}
-
BaseTexturePtr const& Style::GetDashTopCorner() const
{
return pimpl->dash_top_corner_.texture();
@@ -2273,11 +2266,6 @@ BaseTexturePtr const& Style::GetDashTopCornerMask() const
return pimpl->dash_top_corner_mask_.texture();
}
-BaseTexturePtr const& Style::GetDashTopTile() const
-{
- return pimpl->dash_top_tile_.texture();
-}
-
BaseTexturePtr const& Style::GetDashFullscreenIcon() const
{
return pimpl->dash_fullscreen_icon_.texture();
diff --git a/unity-shared/DashStyle.h b/unity-shared/DashStyle.h
index cd3a189c8..d1971acab 100755
--- a/unity-shared/DashStyle.h
+++ b/unity-shared/DashStyle.h
@@ -170,20 +170,20 @@ public:
BaseTexturePtr const& GetCategoryBackground() const;
BaseTexturePtr const& GetCategoryBackgroundNoFilters() const;
- BaseTexturePtr const& GetDashBottomTile() const;
- BaseTexturePtr const& GetDashBottomTileMask() const;
- BaseTexturePtr const& GetDashRightTile() const;
- BaseTexturePtr const& GetDashRightTileMask() const;
+ BaseTexturePtr GetDashBottomTile(double scale) const;
+ BaseTexturePtr GetDashBottomTileMask(double scale) const;
+ BaseTexturePtr GetDashRightTile(double scale) const;
+ BaseTexturePtr GetDashRightTileMask(double scale) const;
+ BaseTexturePtr GetDashLeftTile(double scale) const;
+ BaseTexturePtr GetDashTopTile(double scale) const;
+
BaseTexturePtr const& GetDashCorner() const;
BaseTexturePtr const& GetDashCornerMask() const;
BaseTexturePtr const& GetDashFullscreenIcon() const;
- BaseTexturePtr const& GetDashLeftEdge() const;
BaseTexturePtr const& GetDashLeftCorner() const;
BaseTexturePtr const& GetDashLeftCornerMask() const;
- BaseTexturePtr const& GetDashLeftTile() const;
BaseTexturePtr const& GetDashTopCorner() const;
BaseTexturePtr const& GetDashTopCornerMask() const;
- BaseTexturePtr const& GetDashTopTile() const;
RawPixel GetDashBottomTileHeight() const;
RawPixel GetDashRightTileWidth() const;
diff --git a/unity-shared/OverlayRenderer.cpp b/unity-shared/OverlayRenderer.cpp
index 41959012a..6a6bd33d9 100644
--- a/unity-shared/OverlayRenderer.cpp
+++ b/unity-shared/OverlayRenderer.cpp
@@ -36,7 +36,10 @@ DECLARE_LOGGER(logger, "unity.overlayrenderer");
namespace
{
const RawPixel INNER_CORNER_RADIUS = 5_em;
-const int EXCESS_BORDER = 10;
+const RawPixel EXCESS_BORDER = 10_em;
+
+const RawPixel LEFT_CORNER_OFFSET = 10_em;
+const RawPixel TOP_CORNER_OFFSET = 10_em;
const nux::Color LINE_COLOR = nux::color::White * 0.07f;
const RawPixel GRADIENT_HEIGHT = 50_em;
@@ -53,8 +56,9 @@ class OverlayRendererImpl : public sigc::trackable
public:
OverlayRendererImpl(OverlayRenderer *parent_);
- void ComputeLargerGeometries(nux::Geometry& larger_absolute_geo, nux::Geometry& larger_content_geo, bool force_edges);
void UpdateTextures();
+ void LoadScaledTextures();
+ void ComputeLargerGeometries(nux::Geometry& larger_absolute_geo, nux::Geometry& larger_content_geo, bool force_edges);
void OnBgColorChanged(nux::Color const& new_color);
void Draw(nux::GraphicsEngine& gfx_context, nux::Geometry const& content_geo, nux::Geometry const& absolute_geo, nux::Geometry const& geometry, bool force_draw);
@@ -71,6 +75,13 @@ public:
std::unique_ptr<nux::TextureLayer> bg_refine_gradient_;
+ nux::ObjectPtr<nux::BaseTexture> bottom_texture_;
+ nux::ObjectPtr<nux::BaseTexture> bottom_texture_mask_;
+ nux::ObjectPtr<nux::BaseTexture> right_texture_;
+ nux::ObjectPtr<nux::BaseTexture> right_texture_mask_;
+ nux::ObjectPtr<nux::BaseTexture> left_texture_;
+ nux::ObjectPtr<nux::BaseTexture> top_texture_;
+
// temporary variable that stores the number of backgrounds we have rendered
int bgs;
bool visible;
@@ -96,8 +107,22 @@ OverlayRendererImpl::OverlayRendererImpl(OverlayRenderer *parent_)
: visible(false)
, parent(parent_)
{
- parent_->scale = 1.0;
+ parent->scale = 1.0;
+ parent->scale.changed.connect(sigc::hide(sigc::mem_fun(this, &OverlayRendererImpl::LoadScaledTextures)));
UpdateTextures();
+ LoadScaledTextures();
+}
+
+void OverlayRendererImpl::LoadScaledTextures()
+{
+ double scale = parent->scale;
+ auto& style = dash::Style::Instance();
+ bottom_texture_ = style.GetDashBottomTile(scale);
+ bottom_texture_mask_ = style.GetDashBottomTileMask(scale);
+ right_texture_ = style.GetDashRightTile(scale);
+ right_texture_mask_ = style.GetDashRightTileMask(scale);
+ left_texture_ = style.GetDashLeftTile(scale);
+ top_texture_ = style.GetDashTopTile(scale);
}
void OverlayRendererImpl::OnBgColorChanged(nux::Color const& new_color)
@@ -145,6 +170,7 @@ void OverlayRendererImpl::UpdateTextures()
bg_shine_texture_ = dash::Style::Instance().GetDashShine()->GetDeviceTexture();
auto const& bg_refine_tex = dash::Style::Instance().GetRefineTextureDash();
+
if (bg_refine_tex)
{
rop.Blend = true;
@@ -406,7 +432,7 @@ void OverlayRendererImpl::RenderInverseMask(nux::GraphicsEngine& gfx_context, in
void OverlayRendererImpl::ComputeLargerGeometries(nux::Geometry& larger_absolute_geo, nux::Geometry& larger_content_geo, bool force_edges)
{
- int excess_border = (Settings::Instance().form_factor() != FormFactor::NETBOOK || force_edges) ? EXCESS_BORDER : 0;
+ int excess_border = (Settings::Instance().form_factor() != FormFactor::NETBOOK || force_edges) ? EXCESS_BORDER.CP(parent->scale) : 0;
larger_absolute_geo.OffsetSize(excess_border, excess_border);
larger_content_geo.OffsetSize(excess_border, excess_border);
}
@@ -565,36 +591,40 @@ void OverlayRendererImpl::Draw(nux::GraphicsEngine& gfx_context, nux::Geometry c
gfx_context.GetRenderStates().SetBlend(true);
gfx_context.GetRenderStates().SetPremultipliedBlend(nux::SRC_OVER);
- dash::Style& style = dash::Style::Instance();
- auto const& bottom = style.GetDashBottomTile();
- auto const& bottom_mask = style.GetDashBottomTileMask();
- auto const& right = style.GetDashRightTile();
- auto const& right_mask = style.GetDashRightTileMask();
+ nux::TexCoordXForm texxform;
+ auto& style = dash::Style::Instance();
+ auto const& bottom = bottom_texture_;
+ auto const& bottom_mask = bottom_texture_mask_;
+ auto const& right = right_texture_;
+ auto const& right_mask = right_texture_mask_;
auto const& corner = style.GetDashCorner();
auto const& corner_mask = style.GetDashCornerMask();
auto const& left_corner = style.GetDashLeftCorner();
auto const& left_corner_mask = style.GetDashLeftCornerMask();
- auto const& left_tile = style.GetDashLeftTile();
+ auto const& left_tile = left_texture_;
auto const& top_corner = style.GetDashTopCorner();
auto const& top_corner_mask = style.GetDashTopCornerMask();
- auto const& top_tile = style.GetDashTopTile();
- nux::TexCoordXForm texxform;
+ auto const& top_tile = top_texture_;
- int left_corner_offset = 10;
- int top_corner_offset = 10;
+ int left_corner_offset = LEFT_CORNER_OFFSET.CP(scale);
+ int top_corner_offset = TOP_CORNER_OFFSET.CP(scale);
+ nux::Size corner_size(RawPixel(corner->GetWidth()).CP(scale), RawPixel(corner->GetHeight()).CP(scale));
+ nux::Size top_corner_size(RawPixel(top_corner->GetWidth()).CP(scale), RawPixel(top_corner->GetHeight()).CP(scale));
+ nux::Size left_corner_size(RawPixel(left_corner->GetWidth()).CP(scale), RawPixel(left_corner->GetHeight()).CP(scale));
- geo.width += corner->GetWidth() - 10;
- geo.height += corner->GetHeight() - 10;
+ geo.width += corner_size.width - left_corner_offset;
+ geo.height += corner_size.height - top_corner_offset;
{
// Corner
- texxform.SetTexCoordType(nux::TexCoordXForm::OFFSET_COORD);
+ texxform.SetTexCoordType(nux::TexCoordXForm::OFFSET_SCALE_COORD);
texxform.SetWrap(nux::TEXWRAP_CLAMP_TO_BORDER, nux::TEXWRAP_CLAMP_TO_BORDER);
+ texxform.SetFilter(nux::TEXFILTER_LINEAR, nux::TEXFILTER_LINEAR);
// Selectively erase blur region in the curbe
- gfx_context.QRP_ColorModTexAlpha(geo.x + (geo.width - corner->GetWidth()),
- geo.y + (geo.height - corner->GetHeight()),
- corner->GetWidth(),
- corner->GetHeight(),
+ gfx_context.QRP_ColorModTexAlpha(geo.x + (geo.width - corner_size.width),
+ geo.y + (geo.height - corner_size.height),
+ corner_size.width,
+ corner_size.height,
corner_mask->GetDeviceTexture(),
texxform,
nux::color::Black);
@@ -602,10 +632,10 @@ void OverlayRendererImpl::Draw(nux::GraphicsEngine& gfx_context, nux::Geometry c
// Write correct alpha
gfx_context.GetRenderStates().SetBlend(false);
gfx_context.GetRenderStates().SetColorMask(false, false, false, true);
- RenderInverseMask(gfx_context, geo.x + (geo.width - corner->GetWidth()),
- geo.y + (geo.height - corner->GetHeight()),
- corner->GetWidth(),
- corner->GetHeight(),
+ RenderInverseMask(gfx_context, geo.x + (geo.width - corner_size.width),
+ geo.y + (geo.height - corner_size.height),
+ corner_size.width,
+ corner_size.height,
corner_mask->GetDeviceTexture(),
texxform,
nux::color::White);
@@ -614,24 +644,24 @@ void OverlayRendererImpl::Draw(nux::GraphicsEngine& gfx_context, nux::Geometry c
gfx_context.GetRenderStates().SetPremultipliedBlend(nux::SRC_OVER);
gfx_context.GetRenderStates().SetColorMask(true, true, true, true);
- gfx_context.QRP_1Tex(geo.x + (geo.width - corner->GetWidth()),
- geo.y + (geo.height - corner->GetHeight()),
- corner->GetWidth(),
- corner->GetHeight(),
+ gfx_context.QRP_1Tex(geo.x + (geo.width - corner_size.width),
+ geo.y + (geo.height - corner_size.height),
+ corner_size.width,
+ corner_size.height,
corner->GetDeviceTexture(),
texxform,
nux::color::White);
}
{
// Bottom repeated texture
- int real_width = geo.width - (left_corner->GetWidth() - left_corner_offset) - corner->GetWidth();
+ int real_width = geo.width - (left_corner_size.width - left_corner_offset) - corner_size.width;
int offset = real_width % bottom->GetWidth();
texxform.SetTexCoordType(nux::TexCoordXForm::OFFSET_COORD);
texxform.SetWrap(nux::TEXWRAP_REPEAT, nux::TEXWRAP_REPEAT);
// Selectively erase blur region in the curbe
- gfx_context.QRP_ColorModTexAlpha(left_corner->GetWidth() - left_corner_offset - offset,
+ gfx_context.QRP_ColorModTexAlpha(left_corner_size.width - left_corner_offset - offset,
geo.y + (geo.height - bottom->GetHeight()),
real_width + offset,
bottom->GetHeight(),
@@ -642,7 +672,7 @@ void OverlayRendererImpl::Draw(nux::GraphicsEngine& gfx_context, nux::Geometry c
// Write correct alpha
gfx_context.GetRenderStates().SetBlend(false);
gfx_context.GetRenderStates().SetColorMask(false, false, false, true);
- RenderInverseMask(gfx_context, left_corner->GetWidth() - left_corner_offset - offset,
+ RenderInverseMask(gfx_context, left_corner_size.width - left_corner_offset - offset,
geo.y + (geo.height - bottom->GetHeight()),
real_width + offset,
bottom->GetHeight(),
@@ -654,7 +684,7 @@ void OverlayRendererImpl::Draw(nux::GraphicsEngine& gfx_context, nux::Geometry c
gfx_context.GetRenderStates().SetPremultipliedBlend(nux::SRC_OVER);
gfx_context.GetRenderStates().SetColorMask(true, true, true, true);
- gfx_context.QRP_1Tex(left_corner->GetWidth() - left_corner_offset - offset,
+ gfx_context.QRP_1Tex(left_corner_size.width - left_corner_offset - offset,
geo.y + (geo.height - bottom->GetHeight()),
real_width + offset,
bottom->GetHeight(),
@@ -664,14 +694,15 @@ void OverlayRendererImpl::Draw(nux::GraphicsEngine& gfx_context, nux::Geometry c
}
{
// Bottom left corner
- texxform.SetTexCoordType(nux::TexCoordXForm::OFFSET_COORD);
+ texxform.SetTexCoordType(nux::TexCoordXForm::OFFSET_SCALE_COORD);
texxform.SetWrap(nux::TEXWRAP_CLAMP_TO_BORDER, nux::TEXWRAP_CLAMP_TO_BORDER);
+ texxform.SetFilter(nux::TEXFILTER_LINEAR, nux::TEXFILTER_LINEAR);
// Selectively erase blur region in the curbe
gfx_context.QRP_ColorModTexAlpha(geo.x - left_corner_offset,
- geo.y + (geo.height - left_corner->GetHeight()),
- left_corner->GetWidth(),
- left_corner->GetHeight(),
+ geo.y + (geo.height - left_corner_size.height),
+ left_corner_size.width,
+ left_corner_size.height,
left_corner_mask->GetDeviceTexture(),
texxform,
nux::color::Black);
@@ -680,9 +711,9 @@ void OverlayRendererImpl::Draw(nux::GraphicsEngine& gfx_context, nux::Geometry c
gfx_context.GetRenderStates().SetBlend(false);
gfx_context.GetRenderStates().SetColorMask(false, false, false, true);
RenderInverseMask(gfx_context, geo.x - left_corner_offset,
- geo.y + (geo.height - left_corner->GetHeight()),
- left_corner->GetWidth(),
- left_corner->GetHeight(),
+ geo.y + (geo.height - left_corner_size.height),
+ left_corner_size.width,
+ left_corner_size.height,
left_corner_mask->GetDeviceTexture(),
texxform,
nux::color::White);
@@ -692,9 +723,9 @@ void OverlayRendererImpl::Draw(nux::GraphicsEngine& gfx_context, nux::Geometry c
gfx_context.GetRenderStates().SetColorMask(true, true, true, true);
gfx_context.QRP_1Tex(geo.x - left_corner_offset,
- geo.y + (geo.height - left_corner->GetHeight()),
- left_corner->GetWidth(),
- left_corner->GetHeight(),
+ geo.y + (geo.height - left_corner_size.height),
+ left_corner_size.width,
+ left_corner_size.height,
left_corner->GetDeviceTexture(),
texxform,
nux::color::White);
@@ -708,7 +739,7 @@ void OverlayRendererImpl::Draw(nux::GraphicsEngine& gfx_context, nux::Geometry c
texxform.SetTexCoordType(nux::TexCoordXForm::OFFSET_COORD);
texxform.SetWrap(nux::TEXWRAP_REPEAT, nux::TEXWRAP_REPEAT);
- gfx_context.QRP_1Tex(geo.x - 10,
+ gfx_context.QRP_1Tex(geo.x - left_corner_offset,
geo.y + geo.height,
left_tile->GetWidth(),
real_height + offset,
@@ -723,9 +754,9 @@ void OverlayRendererImpl::Draw(nux::GraphicsEngine& gfx_context, nux::Geometry c
// Selectively erase blur region in the curbe
gfx_context.QRP_ColorModTexAlpha(geo.x + geo.width - right->GetWidth(),
- geo.y + top_corner->GetHeight() - top_corner_offset,
+ geo.y + top_corner_size.height - top_corner_offset,
right->GetWidth(),
- geo.height - corner->GetHeight() - (top_corner->GetHeight() - top_corner_offset),
+ geo.height - corner_size.height - (top_corner_size.height - top_corner_offset),
right_mask->GetDeviceTexture(),
texxform,
nux::color::Black);
@@ -734,9 +765,9 @@ void OverlayRendererImpl::Draw(nux::GraphicsEngine& gfx_context, nux::Geometry c
gfx_context.GetRenderStates().SetBlend(false);
gfx_context.GetRenderStates().SetColorMask(false, false, false, true);
RenderInverseMask(gfx_context, geo.x + geo.width - right->GetWidth(),
- geo.y + top_corner->GetHeight() - top_corner_offset,
+ geo.y + top_corner_size.height - top_corner_offset,
right->GetWidth(),
- geo.height - corner->GetHeight() - (top_corner->GetHeight() - top_corner_offset),
+ geo.height - corner_size.height - (top_corner_size.height - top_corner_offset),
right_mask->GetDeviceTexture(),
texxform,
nux::color::White);
@@ -746,23 +777,24 @@ void OverlayRendererImpl::Draw(nux::GraphicsEngine& gfx_context, nux::Geometry c
gfx_context.GetRenderStates().SetColorMask(true, true, true, true);
gfx_context.QRP_1Tex(geo.x + geo.width - right->GetWidth(),
- geo.y + top_corner->GetHeight() - top_corner_offset,
+ geo.y + top_corner_size.height - top_corner_offset,
right->GetWidth(),
- geo.height - corner->GetHeight() - (top_corner->GetHeight() - top_corner_offset),
+ geo.height - corner_size.height - (top_corner_size.height - top_corner_offset),
right->GetDeviceTexture(),
texxform,
nux::color::White);
}
{
// Top right corner
- texxform.SetTexCoordType(nux::TexCoordXForm::OFFSET_COORD);
+ texxform.SetTexCoordType(nux::TexCoordXForm::OFFSET_SCALE_COORD);
texxform.SetWrap(nux::TEXWRAP_CLAMP_TO_BORDER, nux::TEXWRAP_CLAMP_TO_BORDER);
+ texxform.SetFilter(nux::TEXFILTER_LINEAR, nux::TEXFILTER_LINEAR);
// Selectively erase blur region in the curbe
gfx_context.QRP_ColorModTexAlpha(geo.x + geo.width - right->GetWidth(),
geo.y - top_corner_offset,
- top_corner->GetWidth(),
- top_corner->GetHeight(),
+ top_corner_size.width,
+ top_corner_size.height,
top_corner_mask->GetDeviceTexture(),
texxform,
nux::color::Black);
@@ -772,8 +804,8 @@ void OverlayRendererImpl::Draw(nux::GraphicsEngine& gfx_context, nux::Geometry c
gfx_context.GetRenderStates().SetColorMask(false, false, false, true);
RenderInverseMask(gfx_context, geo.x + geo.width - right->GetWidth(),
geo.y - top_corner_offset,
- top_corner->GetWidth(),
- top_corner->GetHeight(),
+ top_corner_size.width,
+ top_corner_size.height,
top_corner_mask->GetDeviceTexture(),
texxform,
nux::color::White);
@@ -783,8 +815,8 @@ void OverlayRendererImpl::Draw(nux::GraphicsEngine& gfx_context, nux::Geometry c
gfx_context.GetRenderStates().SetColorMask(true, true, true, true);
gfx_context.QRP_1Tex(geo.x + geo.width - right->GetWidth(),
geo.y - top_corner_offset,
- top_corner->GetWidth(),
- top_corner->GetHeight(),
+ top_corner_size.width,
+ top_corner_size.height,
top_corner->GetDeviceTexture(),
texxform,
nux::color::White);
@@ -796,7 +828,7 @@ void OverlayRendererImpl::Draw(nux::GraphicsEngine& gfx_context, nux::Geometry c
gfx_context.GetRenderStates().SetPremultipliedBlend(nux::SRC_OVER);
gfx_context.QRP_1Tex(geo.x + geo.width,
- geo.y - 10,
+ geo.y - top_corner_offset,
geometry.width - (geo.x + geo.width),
top_tile->GetHeight(),
top_tile->GetDeviceTexture(),