mirror of
https://github.com/Ardour/ardour.git
synced 2026-01-03 20:29:35 +01:00
Towards a consistent render() API.
This fixes an -Woverloaded-virtual ambiguity introduced in b5e613d45
void render (cairo_t*, cairo_rectagle*)
void render (Cairo::RefPtr<Cairo::Context> const&, cairo_rectangle_t*)
ArdourCanvas prefers cairomm and CairoWidget itself uses Cairo::Context,
this improves overall API consistency.
This commit is contained in:
parent
3294b82e25
commit
d06de26a4f
30 changed files with 55 additions and 49 deletions
|
|
@ -46,12 +46,12 @@ protected:
|
|||
|
||||
virtual void overlay (cairo_t* cr, cairo_rectangle_t* r) {}
|
||||
|
||||
virtual void render (cairo_t* cr, cairo_rectangle_t* r)
|
||||
virtual void render (Cairo::RefPtr<Cairo::Context> const& ctx, cairo_rectangle_t* r)
|
||||
{
|
||||
cairo_rectangle (cr, r->x, r->y, r->width, r->height);
|
||||
cairo_clip (cr);
|
||||
background (cr, r);
|
||||
overlay (cr, r);
|
||||
ctx->rectangle (r->x, r->y, r->width, r->height);
|
||||
ctx->clip ();
|
||||
background (ctx->cobj(), r);
|
||||
overlay (ctx->cobj(), r);
|
||||
}
|
||||
|
||||
Cairo::RefPtr<Cairo::ImageSurface> _surface;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue