mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 04:07:44 +00:00
LibJS+LibWeb: Wrap raw JS::Cell*/& fields in GCPtr/NonnullGCPtr
This commit is contained in:
parent
1df3652e27
commit
7c0c1c8f49
214 changed files with 825 additions and 827 deletions
|
@ -38,17 +38,17 @@ void CanvasPath::bezier_curve_to(double cp1x, double cp1y, double cp2x, double c
|
|||
WebIDL::ExceptionOr<void> CanvasPath::arc(float x, float y, float radius, float start_angle, float end_angle, bool counter_clockwise)
|
||||
{
|
||||
if (radius < 0)
|
||||
return WebIDL::IndexSizeError::create(m_self.realm(), DeprecatedString::formatted("The radius provided ({}) is negative.", radius));
|
||||
return WebIDL::IndexSizeError::create(m_self->realm(), DeprecatedString::formatted("The radius provided ({}) is negative.", radius));
|
||||
return ellipse(x, y, radius, radius, 0, start_angle, end_angle, counter_clockwise);
|
||||
}
|
||||
|
||||
WebIDL::ExceptionOr<void> CanvasPath::ellipse(float x, float y, float radius_x, float radius_y, float rotation, float start_angle, float end_angle, bool counter_clockwise)
|
||||
{
|
||||
if (radius_x < 0)
|
||||
return WebIDL::IndexSizeError::create(m_self.realm(), DeprecatedString::formatted("The major-axis radius provided ({}) is negative.", radius_x));
|
||||
return WebIDL::IndexSizeError::create(m_self->realm(), DeprecatedString::formatted("The major-axis radius provided ({}) is negative.", radius_x));
|
||||
|
||||
if (radius_y < 0)
|
||||
return WebIDL::IndexSizeError::create(m_self.realm(), DeprecatedString::formatted("The minor-axis radius provided ({}) is negative.", radius_y));
|
||||
return WebIDL::IndexSizeError::create(m_self->realm(), DeprecatedString::formatted("The minor-axis radius provided ({}) is negative.", radius_y));
|
||||
|
||||
if (constexpr float tau = M_TAU; (!counter_clockwise && (end_angle - start_angle) >= tau)
|
||||
|| (counter_clockwise && (start_angle - end_angle) >= tau)) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue