mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2024-12-27 06:00:22 +00:00
Fix handling of junctions in frame drawing code
This commit is contained in:
parent
e522381183
commit
30fe448750
@ -1206,8 +1206,7 @@ _cairo_round_rectangle_sides (cairo_t *cr,
|
|||||||
if (sides & SIDE_RIGHT)
|
if (sides & SIDE_RIGHT)
|
||||||
{
|
{
|
||||||
if (radius == 0 ||
|
if (radius == 0 ||
|
||||||
(junction & GTK_JUNCTION_TOP) ||
|
(junction & GTK_JUNCTION_CORNER_TOPRIGHT))
|
||||||
(junction & GTK_JUNCTION_RIGHT))
|
|
||||||
cairo_move_to (cr, x + width, y);
|
cairo_move_to (cr, x + width, y);
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@ -1216,8 +1215,7 @@ _cairo_round_rectangle_sides (cairo_t *cr,
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (radius == 0 ||
|
if (radius == 0 ||
|
||||||
(junction & GTK_JUNCTION_BOTTOM) ||
|
(junction & GTK_JUNCTION_CORNER_BOTTOMRIGHT))
|
||||||
(junction & GTK_JUNCTION_RIGHT))
|
|
||||||
cairo_line_to (cr, x + width, y + height);
|
cairo_line_to (cr, x + width, y + height);
|
||||||
else
|
else
|
||||||
cairo_arc (cr, x + width - radius, y + height - radius, radius, 0, G_PI / 4);
|
cairo_arc (cr, x + width - radius, y + height - radius, radius, 0, G_PI / 4);
|
||||||
@ -1226,8 +1224,7 @@ _cairo_round_rectangle_sides (cairo_t *cr,
|
|||||||
if (sides & SIDE_BOTTOM)
|
if (sides & SIDE_BOTTOM)
|
||||||
{
|
{
|
||||||
if (radius != 0 &&
|
if (radius != 0 &&
|
||||||
! (junction & GTK_JUNCTION_RIGHT) &&
|
! (junction & GTK_JUNCTION_CORNER_BOTTOMRIGHT))
|
||||||
! (junction & GTK_JUNCTION_BOTTOM))
|
|
||||||
{
|
{
|
||||||
if ((sides & SIDE_RIGHT) == 0)
|
if ((sides & SIDE_RIGHT) == 0)
|
||||||
cairo_new_sub_path (cr);
|
cairo_new_sub_path (cr);
|
||||||
@ -1238,8 +1235,7 @@ _cairo_round_rectangle_sides (cairo_t *cr,
|
|||||||
cairo_move_to (cr, x + width, y + height);
|
cairo_move_to (cr, x + width, y + height);
|
||||||
|
|
||||||
if (radius == 0 ||
|
if (radius == 0 ||
|
||||||
(junction & GTK_JUNCTION_BOTTOM) ||
|
(junction & GTK_JUNCTION_CORNER_BOTTOMLEFT))
|
||||||
(junction & GTK_JUNCTION_LEFT))
|
|
||||||
cairo_line_to (cr, x, y + height);
|
cairo_line_to (cr, x, y + height);
|
||||||
else
|
else
|
||||||
cairo_arc (cr, x + radius, y + height - radius, radius, G_PI / 2, 3 * (G_PI / 4));
|
cairo_arc (cr, x + radius, y + height - radius, radius, G_PI / 2, 3 * (G_PI / 4));
|
||||||
@ -1250,8 +1246,7 @@ _cairo_round_rectangle_sides (cairo_t *cr,
|
|||||||
if (sides & SIDE_LEFT)
|
if (sides & SIDE_LEFT)
|
||||||
{
|
{
|
||||||
if (radius != 0 &&
|
if (radius != 0 &&
|
||||||
! (junction & GTK_JUNCTION_LEFT) &&
|
! (junction & GTK_JUNCTION_CORNER_BOTTOMLEFT))
|
||||||
! (junction & GTK_JUNCTION_BOTTOM))
|
|
||||||
{
|
{
|
||||||
if ((sides & SIDE_BOTTOM) == 0)
|
if ((sides & SIDE_BOTTOM) == 0)
|
||||||
cairo_new_sub_path (cr);
|
cairo_new_sub_path (cr);
|
||||||
@ -1262,8 +1257,7 @@ _cairo_round_rectangle_sides (cairo_t *cr,
|
|||||||
cairo_move_to (cr, x, y + height);
|
cairo_move_to (cr, x, y + height);
|
||||||
|
|
||||||
if (radius == 0 ||
|
if (radius == 0 ||
|
||||||
(junction & GTK_JUNCTION_TOP) ||
|
(junction & GTK_JUNCTION_CORNER_TOPLEFT))
|
||||||
(junction & GTK_JUNCTION_LEFT))
|
|
||||||
cairo_line_to (cr, x, y);
|
cairo_line_to (cr, x, y);
|
||||||
else
|
else
|
||||||
cairo_arc (cr, x + radius, y + radius, radius, G_PI, G_PI + G_PI / 4);
|
cairo_arc (cr, x + radius, y + radius, radius, G_PI, G_PI + G_PI / 4);
|
||||||
@ -1272,8 +1266,7 @@ _cairo_round_rectangle_sides (cairo_t *cr,
|
|||||||
if (sides & SIDE_TOP)
|
if (sides & SIDE_TOP)
|
||||||
{
|
{
|
||||||
if (radius != 0 &&
|
if (radius != 0 &&
|
||||||
! (junction & GTK_JUNCTION_TOP) &&
|
! (junction & GTK_JUNCTION_CORNER_TOPLEFT))
|
||||||
! (junction & GTK_JUNCTION_LEFT))
|
|
||||||
{
|
{
|
||||||
if ((sides & SIDE_LEFT) == 0)
|
if ((sides & SIDE_LEFT) == 0)
|
||||||
cairo_new_sub_path (cr);
|
cairo_new_sub_path (cr);
|
||||||
@ -1284,8 +1277,7 @@ _cairo_round_rectangle_sides (cairo_t *cr,
|
|||||||
cairo_move_to (cr, x, y);
|
cairo_move_to (cr, x, y);
|
||||||
|
|
||||||
if (radius == 0 ||
|
if (radius == 0 ||
|
||||||
(junction & GTK_JUNCTION_TOP) ||
|
(junction & GTK_JUNCTION_CORNER_TOPRIGHT))
|
||||||
(junction & GTK_JUNCTION_RIGHT))
|
|
||||||
cairo_line_to (cr, x + width, y);
|
cairo_line_to (cr, x + width, y);
|
||||||
else
|
else
|
||||||
cairo_arc (cr, x + width - radius, y + radius, radius, 3 * (G_PI / 2), - G_PI / 4);
|
cairo_arc (cr, x + width - radius, y + radius, radius, 3 * (G_PI / 2), - G_PI / 4);
|
||||||
|
Loading…
Reference in New Issue
Block a user