From b65d3a249d4db1ada6d0bc96031e55459e0d6381 Mon Sep 17 00:00:00 2001 From: Albrecht Schlosser Date: Tue, 1 Sep 2020 12:33:11 +0200 Subject: Customize corner radius for rounded box/frame (#130) Make maximum box corner radius and shadow width configurable. See Fl::box_border_radius_max() and Fl::box_shadow_width(). Documentation: update image of box types. Fixes #130 --- src/fl_rounded_box.cxx | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'src/fl_rounded_box.cxx') diff --git a/src/fl_rounded_box.cxx b/src/fl_rounded_box.cxx index 4c1eb6aae..df41b4f6e 100644 --- a/src/fl_rounded_box.cxx +++ b/src/fl_rounded_box.cxx @@ -1,7 +1,7 @@ // // Rounded box drawing routines for the Fast Light Tool Kit (FLTK). // -// Copyright 1998-2016 by Bill Spitzak and others. +// Copyright 1998-2020 by Bill Spitzak and others. // // This library is free software. Distribution and use rights are outlined in // the file "COPYING" which should have been included with this file. If this @@ -17,15 +17,15 @@ #include #include -// Constants for rounded corner drawing algorithm: +// Global parameters for rounded corner drawing algorithm: // // RN = number of segments per corner (must match offset array size) // RS = max. corner radius // BW = box shadow width -#define RN 5 -#define RS 15 -#define BW 3 +#define RN 5 +#define RS (Fl::box_border_radius_max()) +#define BW (Fl::box_shadow_width()) static double offset[RN] = { 0.0, 0.07612, 0.29289, 0.61732, 1.0}; -- cgit v1.2.3