mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 05:57:45 +00:00
Meta+Userland: Pass Gfx::IntSize by value
Just two ints like Gfx::IntPoint.
This commit is contained in:
parent
e011eafd37
commit
27fae78335
63 changed files with 142 additions and 142 deletions
|
@ -209,7 +209,7 @@ void paint_border(PaintContext& context, BorderEdge edge, Gfx::IntRect const& re
|
|||
}
|
||||
}
|
||||
|
||||
RefPtr<Gfx::Bitmap> get_cached_corner_bitmap(Gfx::IntSize const& corners_size)
|
||||
RefPtr<Gfx::Bitmap> get_cached_corner_bitmap(Gfx::IntSize corners_size)
|
||||
{
|
||||
auto allocate_mask_bitmap = [&]() -> RefPtr<Gfx::Bitmap> {
|
||||
auto bitmap = Gfx::Bitmap::try_create(Gfx::BitmapFormat::BGRA8888, corners_size);
|
||||
|
|
|
@ -71,7 +71,7 @@ struct BordersData {
|
|||
CSS::BorderData left;
|
||||
};
|
||||
|
||||
RefPtr<Gfx::Bitmap> get_cached_corner_bitmap(Gfx::IntSize const& corners_size);
|
||||
RefPtr<Gfx::Bitmap> get_cached_corner_bitmap(Gfx::IntSize corners_size);
|
||||
|
||||
void paint_border(PaintContext& context, BorderEdge edge, Gfx::IntRect const& rect, BorderRadiiData const& border_radii_data, BordersData const& borders_data);
|
||||
void paint_all_borders(PaintContext& context, Gfx::FloatRect const& bordered_rect, BorderRadiiData const& border_radii_data, BordersData const&);
|
||||
|
|
|
@ -20,12 +20,12 @@ static float normalized_gradient_angle_radians(float gradient_angle)
|
|||
return real_angle * (AK::Pi<float> / 180);
|
||||
}
|
||||
|
||||
static float calulate_gradient_length(Gfx::IntSize const& gradient_size, float sin_angle, float cos_angle)
|
||||
static float calulate_gradient_length(Gfx::IntSize gradient_size, float sin_angle, float cos_angle)
|
||||
{
|
||||
return AK::fabs(gradient_size.height() * sin_angle) + AK::fabs(gradient_size.width() * cos_angle);
|
||||
}
|
||||
|
||||
static float calulate_gradient_length(Gfx::IntSize const& gradient_size, float gradient_angle)
|
||||
static float calulate_gradient_length(Gfx::IntSize gradient_size, float gradient_angle)
|
||||
{
|
||||
float angle = normalized_gradient_angle_radians(gradient_angle);
|
||||
float sin_angle, cos_angle;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue