Constant radian/degree factor
This commit is contained in:
parent
425c54883a
commit
b32b9ceb58
@ -686,7 +686,7 @@ Gtkmm2ext::rounded_right_half_rectangle (Cairo::RefPtr<Cairo::Context> context,
|
||||
void
|
||||
Gtkmm2ext::rounded_rectangle (cairo_t* cr, double x, double y, double w, double h, double r)
|
||||
{
|
||||
double degrees = M_PI / 180.0;
|
||||
static const double degrees = M_PI / 180.0;
|
||||
|
||||
cairo_new_sub_path (cr);
|
||||
cairo_arc (cr, x + w - r, y + r, r, -90 * degrees, 0 * degrees); //tr
|
||||
@ -699,7 +699,7 @@ Gtkmm2ext::rounded_rectangle (cairo_t* cr, double x, double y, double w, double
|
||||
void
|
||||
Gtkmm2ext::rounded_left_half_rectangle (cairo_t* cr, double x, double y, double w, double h, double r)
|
||||
{
|
||||
double degrees = M_PI / 180.0;
|
||||
static const double degrees = M_PI / 180.0;
|
||||
|
||||
cairo_new_sub_path (cr);
|
||||
cairo_line_to (cr, x+w, y); // tr
|
||||
@ -712,7 +712,7 @@ Gtkmm2ext::rounded_left_half_rectangle (cairo_t* cr, double x, double y, double
|
||||
void
|
||||
Gtkmm2ext::rounded_right_half_rectangle (cairo_t* cr, double x, double y, double w, double h, double r)
|
||||
{
|
||||
double degrees = M_PI / 180.0;
|
||||
static const double degrees = M_PI / 180.0;
|
||||
|
||||
cairo_new_sub_path (cr);
|
||||
cairo_arc (cr, x + w - r, y + r, r, -90 * degrees, 0 * degrees); //tr
|
||||
@ -725,7 +725,7 @@ Gtkmm2ext::rounded_right_half_rectangle (cairo_t* cr, double x, double y, double
|
||||
void
|
||||
Gtkmm2ext::rounded_top_half_rectangle (cairo_t* cr, double x, double y, double w, double h, double r)
|
||||
{
|
||||
double degrees = M_PI / 180.0;
|
||||
static const double degrees = M_PI / 180.0;
|
||||
|
||||
cairo_new_sub_path (cr);
|
||||
cairo_move_to (cr, x+w, y+h);
|
||||
@ -738,7 +738,7 @@ Gtkmm2ext::rounded_top_half_rectangle (cairo_t* cr, double x, double y, double w
|
||||
void
|
||||
Gtkmm2ext::rounded_bottom_half_rectangle (cairo_t* cr, double x, double y, double w, double h, double r)
|
||||
{
|
||||
double degrees = M_PI / 180.0;
|
||||
static const double degrees = M_PI / 180.0;
|
||||
|
||||
cairo_new_sub_path (cr);
|
||||
cairo_move_to (cr, x, y);
|
||||
@ -752,7 +752,7 @@ Gtkmm2ext::rounded_bottom_half_rectangle (cairo_t* cr, double x, double y, doubl
|
||||
void
|
||||
Gtkmm2ext::rounded_top_rectangle (cairo_t* cr, double x, double y, double w, double h, double r)
|
||||
{
|
||||
double degrees = M_PI / 180.0;
|
||||
static const double degrees = M_PI / 180.0;
|
||||
|
||||
cairo_new_sub_path (cr);
|
||||
cairo_move_to (cr, x+w, y+h);
|
||||
|
Loading…
Reference in New Issue
Block a user