ScRectangleF Struct Reference

Public Member Functions

ScRectangleF sc_rectangle_f_make (float position_x, float position_y, float width, float height)
 
ScPointF sc_rectangle_f_get_center (ScRectangleF rectangle)
 

Data Fields

ScPointF position
 
ScSizeF size
 

Detailed Description

A 2-dimensional rectangle with floating point precision.

The rectangle is defined by the coordinates of the upper-left corner together with width and height. Width and height must always be larger or equal than zero.

Since
4.6.0
Examples:
CommandLineBarcodeScannerCameraSample.c.

Member Function Documentation

ScRectangleF sc_rectangle_f_make ( float  position_x,
float  position_y,
float  width,
float  height 
)

Helper function to initialize a rectangle.

Parameters
position_xThe x-coordinate of the top-left corner of the rectangle.
position_yThe y-coordinate of the top-left corner of the rectangle.
widthThe width of the rectangle. Must not be negative.
heightThe height of the rectangle. Must not be negative.
Returns
The created rectangle.
Since
4.6.0
ScPointF sc_rectangle_f_get_center ( ScRectangleF  rectangle)

Calculates and returns the center of the rectangle.

Parameters
rectangleThe rectangle to calculate the center of
Returns
The calculated center.
Since
4.7.0

The documentation for this struct was generated from the following file: