Grooper Help - Version 25.0
25.0.0017 2,127
  • Overview
  • Help Status

Unit Range

Unit Measurement Grooper.IP

Represents a range of distances using unit-aware string values for minimum and maximum.

Remarks

Unit Range is used to define a range of distances or sizes in Grooper, where each bound can be specified using a value and unit (such as 10px, 2.5in, or 5pt). This allows for flexible configuration of measurements that adapt to different resolutions and contexts.

The range is defined by two properties: 'Minimum' and 'Maximum'. Each can be set independently, or both can be set to the same value to specify an exact distance. If only one bound is set, the range is considered open-ended on the other side.

Usage

  • To specify an exact value, set both 'Minimum' and 'Maximum' to the same value (e.g., 10px).
  • To specify a range, set 'Minimum' and 'Maximum' to different values (e.g., 10px and 15px).
  • To specify only a minimum, leave 'Maximum' blank (e.g., > 5pt).
  • To specify only a maximum, leave 'Minimum' blank (e.g., < 2in).

The values are parsed and validated using Grooper's unit system, and are automatically converted to pixel values as needed for processing.

Examples

  • 10px - 15px: Defines a range from 10 to 15 pixels.
  • 10px: Sets both minimum and maximum to 10 pixels.
  • < 5pt: Sets a maximum of 5 points, with no minimum.
  • > 1in: Sets a minimum of 1 inch, with no maximum.

Supported Unit Types

The following unit types are supported when specifying values for Unit Range:

  • px: Pixels
  • in: Inches
  • pt: Points (1/72 of an inch)
  • cm: Centimeters
  • mm: Millimeters
  • %: Percent (context-dependent, typically relative to a parent or container)

When configuring a Unit Range, ensure that the units are appropriate for the context in which the range will be used. The system will automatically convert between units as needed, but specifying consistent units can help avoid confusion. If the minimum value is greater than the maximum, validation will fail.

The Unit Range is commonly used in image processing, layout analysis, and other scenarios where flexible, unit-aware measurement ranges are required.

Properties

NameTypeDescription

Used By

Notification