Method GetUniformCornerRadius
GetUniformCornerRadius(RectD, float?, bool?)
Calculates a uniform corner radius for a rectangle, optionally treating the radius as a percentage of the rectangle's minimum dimension.
public static float? GetUniformCornerRadius(RectD rect, float? cornerRadius, bool? radiusIsPercent)
Parameters
rectRectDThe rectangle for which the corner radius is being calculated.
cornerRadiusfloat?The uniform corner radius to apply. If null, the method returns null.
radiusIsPercentbool?A value indicating whether the
cornerRadiusis expressed as a percentage of the rectangle's minimum dimension. If null, the method returns null.
Returns
- float?
The calculated corner radius as a float value. If
cornerRadiusorradiusIsPercentis null, the method returns null. IfradiusIsPercentis true, the radius is calculated as a percentage of the rectangle's minimum dimension. Otherwise, the method returns the value ofcornerRadius.
GetUniformCornerRadius(RectD)
Gets real uniform corner radius using UniformCornerRadius,
UniformRadiusIsPercent and rect.
public virtual float? GetUniformCornerRadius(RectD rect)
Parameters
rectRectDRectangle for percentage calculation.