renderborder: Remove some unused API

This commit is contained in:
Timm Bäder 2018-07-07 14:34:18 +02:00
parent dbf32933bf
commit bb31ce1168
2 changed files with 0 additions and 68 deletions

View File

@ -856,18 +856,6 @@ snapshot_border (GtkSnapshot *snapshot,
snapshot_frame_fill (snapshot, border_box, border_width, colors, hidden_side);
}
gboolean
gtk_css_style_render_has_border (GtkCssStyle *style)
{
if (_gtk_css_image_value_get_image (gtk_css_style_get_value (style, GTK_CSS_PROPERTY_BORDER_IMAGE_SOURCE)))
return TRUE;
return _gtk_css_number_value_get (gtk_css_style_get_value (style, GTK_CSS_PROPERTY_BORDER_TOP_WIDTH), 100) > 0
|| _gtk_css_number_value_get (gtk_css_style_get_value (style, GTK_CSS_PROPERTY_BORDER_RIGHT_WIDTH), 100) > 0
|| _gtk_css_number_value_get (gtk_css_style_get_value (style, GTK_CSS_PROPERTY_BORDER_BOTTOM_WIDTH), 100) > 0
|| _gtk_css_number_value_get (gtk_css_style_get_value (style, GTK_CSS_PROPERTY_BORDER_LEFT_WIDTH), 100) > 0;
}
void
gtk_css_style_render_border (GtkCssStyle *style,
cairo_t *cr,
@ -982,25 +970,6 @@ gtk_css_style_snapshot_border (GtkCssStyle *style,
}
}
gboolean
gtk_css_style_render_border_get_clip (GtkCssStyle *style,
gdouble x,
gdouble y,
gdouble width,
gdouble height,
GdkRectangle *out_clip)
{
if (!gtk_css_style_render_has_border (style))
return FALSE;
out_clip->x = floor (x);
out_clip->y = floor (y);
out_clip->width = ceil (x + width) - out_clip->x;
out_clip->height = ceil (y + height) - out_clip->y;
return TRUE;
}
gboolean
gtk_css_style_render_has_outline (GtkCssStyle *style)
{
@ -1109,26 +1078,3 @@ gtk_css_style_snapshot_outline (GtkCssStyle *style,
snapshot_border (snapshot, &border_box, border_width, colors, border_style);
}
}
gboolean
gtk_css_style_render_outline_get_clip (GtkCssStyle *style,
gdouble x,
gdouble y,
gdouble width,
gdouble height,
GdkRectangle *out_clip)
{
cairo_rectangle_t rect;
if (!gtk_css_style_render_has_outline (style))
return FALSE;
compute_outline_rect (style, x, y, width, height, &rect);
out_clip->x = floor (rect.x);
out_clip->y = floor (rect.y);
out_clip->width = ceil (rect.x + rect.width) - out_clip->x;
out_clip->height = ceil (rect.y + rect.height) - out_clip->y;
return TRUE;
}

View File

@ -29,19 +29,12 @@
G_BEGIN_DECLS
gboolean gtk_css_style_render_has_border (GtkCssStyle *style);
void gtk_css_style_render_border (GtkCssStyle *style,
cairo_t *cr,
gdouble x,
gdouble y,
gdouble width,
gdouble height);
gboolean gtk_css_style_render_border_get_clip (GtkCssStyle *style,
gdouble x,
gdouble y,
gdouble width,
gdouble height,
GdkRectangle *out_clip) G_GNUC_WARN_UNUSED_RESULT;
void gtk_css_style_snapshot_border (GtkCssStyle *style,
GtkSnapshot *snapshot,
gdouble width,
@ -58,13 +51,6 @@ void gtk_css_style_snapshot_outline (GtkCssStyle
GtkSnapshot *snapshot,
gdouble width,
gdouble height);
gboolean gtk_css_style_render_outline_get_clip (GtkCssStyle *style,
gdouble x,
gdouble y,
gdouble width,
gdouble height,
GdkRectangle *out_clip) G_GNUC_WARN_UNUSED_RESULT;
G_END_DECLS