From 46406d1d2144b8515782e346bdbf241533b2e75a Mon Sep 17 00:00:00 2001 From: ManoloFLTK <41016272+ManoloFLTK@users.noreply.github.com> Date: Wed, 20 Mar 2024 15:40:04 +0100 Subject: Add compile-time check of required minimum cairo version --- src/drivers/Cairo/Fl_Cairo_Graphics_Driver.cxx | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'src/drivers') diff --git a/src/drivers/Cairo/Fl_Cairo_Graphics_Driver.cxx b/src/drivers/Cairo/Fl_Cairo_Graphics_Driver.cxx index 1c0ccd0bb..b66100999 100644 --- a/src/drivers/Cairo/Fl_Cairo_Graphics_Driver.cxx +++ b/src/drivers/Cairo/Fl_Cairo_Graphics_Driver.cxx @@ -31,6 +31,9 @@ #if ! PANGO_VERSION_CHECK(1,16,0) # error "Requires Pango 1.16 or higher" #endif +#if CAIRO_VERSION < CAIRO_VERSION_ENCODE(1,10,0) +# error "Requires Cairo 1.10 or higher" +#endif #include #include // abs(int) #include // memcpy() @@ -1393,7 +1396,7 @@ void Fl_Cairo_Graphics_Driver::text_extents(const char* txt, int n, int& dx, int // Region-handling member functions. // They are used ONLY if the cairo graphics driver is the display graphics driver. // They are not used if the cairo graphics driver is used to draw PostScript. -// +// Type cairo_region_t and associated functions require cairo ≥ 1.10 Fl_Region Fl_Cairo_Graphics_Driver::XRectangleRegion(int x, int y, int w, int h) { cairo_rectangle_int_t rect = {x, y, w, h}; -- cgit v1.2.3