Table of Contents

Class VFRectHelper

Namespace
VisioForge.Core.Helpers
Assembly
VisioForge.Core.dll

Provides extension methods and helper utilities for converting between VFRectIntl and other rectangle types.

public static class VFRectHelper

Inheritance

Inherited Members

Remarks

This static class contains platform-specific and cross-platform conversion methods for rectangle structures, facilitating interoperability between VisioForge's internal rectangle type (VFRectIntl) and standard .NET rectangle types.

Methods

IsEmpty(VFRectIntl)

Determines whether the specified VFRectIntl instance represents an empty rectangle.

public static bool IsEmpty(this VFRectIntl rect)

Parameters

rect VFRectIntl

The VFRectIntl instance to check.

Returns

bool

true if all coordinates (Left, Top, Right, Bottom) are zero, indicating an empty rectangle; otherwise, false.

Remarks

An empty rectangle is defined as having all coordinate values set to zero. This method is useful for checking if a rectangle has been initialized or contains valid dimensions.

ToRect(VFRectIntl)

Converts a VFRectIntl instance to a Rect instance.

public static Rect ToRect(this VFRectIntl rect)

Parameters

rect VFRectIntl

The VFRectIntl instance to convert.

Returns

Rect

A new Rect instance with the same dimensions as the input VFRectIntl.

Remarks

This method provides cross-platform rectangle conversion between VisioForge's internal rectangle type and the standard Rect type used throughout the framework.

ToRectIntl(Rect)

Converts a Rect instance to a VFRectIntl instance.

public static VFRectIntl ToRectIntl(this Rect rect)

Parameters

rect Rect

The Rect instance to convert.

Returns

VFRectIntl

A new VFRectIntl instance with the same dimensions as the input Rect.

Remarks

This method provides cross-platform rectangle conversion from the standard Rect type to VisioForge's internal rectangle representation.