Table of Contents

Method ClampToZero

Namespace
Alternet.Drawing
Assembly
Alternet.UI.Common.dll

ClampToZero()

Clamps the values of the current SizeD instance to zero if they are less than zero.

public readonly SizeD ClampToZero()

Returns

SizeD

A new PointD instance with the width and height clamped to zero if they are less than zero.

Remarks

This method ensures that the resulting values are non-negative by replacing any negative values with zero.