void gimp_paint_options_set_default_brush_size (GimpPaintOptions *paint_options, GimpBrush *brush) { g_return_if_fail (GIMP_IS_PAINT_OPTIONS (paint_options)); g_return_if_fail (brush == NULL || GIMP_IS_BRUSH (brush)); if (! brush) brush = gimp_context_get_brush (GIMP_CONTEXT (paint_options)); if (brush) { gint height; gint width; gimp_brush_transform_size (brush, 1.0, 0.0, 0.0, &height, &width); g_object_set (paint_options, "brush-size", (gdouble) MAX (height, width), NULL); } }
GimpBezierDesc * gimp_brush_real_transform_boundary (GimpBrush *brush, gdouble scale, gdouble aspect_ratio, gdouble angle, gdouble hardness, gint *width, gint *height) { gimp_brush_transform_size (brush, scale, aspect_ratio, angle, width, height); if (*width < 256 && *height < 256) { return gimp_brush_transform_boundary_exact (brush, scale, aspect_ratio, angle, hardness); } return gimp_brush_transform_boundary_approx (brush, scale, aspect_ratio, angle, hardness); }