diff options
Diffstat (limited to 'dgl/src/Widget.cpp')
-rw-r--r-- | dgl/src/Widget.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/dgl/src/Widget.cpp b/dgl/src/Widget.cpp index d200fb40..bf6fd3f8 100644 --- a/dgl/src/Widget.cpp +++ b/dgl/src/Widget.cpp @@ -189,6 +189,13 @@ Window& Widget::getParentWindow() const noexcept return pData->parent; } +#if defined(HAVE_DCAIRO) +cairo_t* Widget::getGraphics() const noexcept +{ + return pData->parent.getGraphics(); +} +#endif + bool Widget::contains(int x, int y) const noexcept { return (x >= 0 && y >= 0 && static_cast<uint>(x) < pData->size.getWidth() && static_cast<uint>(y) < pData->size.getHeight()); |