Scanbot SDK
Loading...
Searching...
No Matches
Scanbot C SDK Geometry

Classes

struct  scanbotsdk_point_t
 Represents a point with integer coordinates. More...
 
struct  scanbotsdk_pointf_t
 Represents a point with floating point coordinates. More...
 
struct  scanbotsdk_rect_t
 Represents a rectangle with integer coordinates. More...
 
struct  scanbotsdk_rectf_t
 Represents a rectangle with floating point coordinates. More...
 

Typedefs

typedef struct scanbotsdk_point_t scanbotsdk_point_t
 Represents a point with integer coordinates.
 
typedef struct scanbotsdk_pointf_t scanbotsdk_pointf_t
 Represents a point with floating point coordinates.
 
typedef struct scanbotsdk_rect_t scanbotsdk_rect_t
 Represents a rectangle with integer coordinates.
 
typedef struct scanbotsdk_rectf_t scanbotsdk_rectf_t
 Represents a rectangle with floating point coordinates.
 
typedef struct scanbotsdk_line_segment_int_t scanbotsdk_line_segment_int_t
 scanbotsdk_line_segment_int_t class
 
typedef struct scanbotsdk_line_segment_float_t scanbotsdk_line_segment_float_t
 scanbotsdk_line_segment_float_t class
 
typedef struct scanbotsdk_aspect_ratio_t scanbotsdk_aspect_ratio_t
 scanbotsdk_aspect_ratio_t class
 

Functions

SBSDK_API scanbotsdk_error_code_t scanbotsdk_line_segment_int_create (scanbotsdk_point_t start, scanbotsdk_point_t end, scanbotsdk_line_segment_int_t **result)
 Creates a new instance of scanbotsdk_line_segment_int with given params and stores it in the location specified by the last argument.
 
SBSDK_API scanbotsdk_error_code_t scanbotsdk_line_segment_int_free (scanbotsdk_line_segment_int_t *object)
 Frees the memory allocated for the instance of scanbotsdk_line_segment_int_t. If null is passed, the function does nothing.
 
SBSDK_API scanbotsdk_error_code_t scanbotsdk_line_segment_int_get_start (scanbotsdk_line_segment_int_t *self, scanbotsdk_point_t *start)
 Returns value of start field of the given object.
 
SBSDK_API scanbotsdk_error_code_t scanbotsdk_line_segment_int_get_end (scanbotsdk_line_segment_int_t *self, scanbotsdk_point_t *end)
 Returns value of end field of the given object.
 
SBSDK_API scanbotsdk_error_code_t scanbotsdk_line_segment_float_create (scanbotsdk_pointf_t start, scanbotsdk_pointf_t end, scanbotsdk_line_segment_float_t **result)
 Creates a new instance of scanbotsdk_line_segment_float with given params and stores it in the location specified by the last argument.
 
SBSDK_API scanbotsdk_error_code_t scanbotsdk_line_segment_float_free (scanbotsdk_line_segment_float_t *object)
 Frees the memory allocated for the instance of scanbotsdk_line_segment_float_t. If null is passed, the function does nothing.
 
SBSDK_API scanbotsdk_error_code_t scanbotsdk_line_segment_float_get_start (scanbotsdk_line_segment_float_t *self, scanbotsdk_pointf_t *start)
 Returns value of start field of the given object.
 
SBSDK_API scanbotsdk_error_code_t scanbotsdk_line_segment_float_get_end (scanbotsdk_line_segment_float_t *self, scanbotsdk_pointf_t *end)
 Returns value of end field of the given object.
 
SBSDK_API scanbotsdk_error_code_t scanbotsdk_aspect_ratio_create (double width, double height, scanbotsdk_aspect_ratio_t **result)
 Creates a new instance of scanbotsdk_aspect_ratio with given params and stores it in the location specified by the last argument.
 
SBSDK_API scanbotsdk_error_code_t scanbotsdk_aspect_ratio_create_with_defaults (scanbotsdk_aspect_ratio_t **result)
 Creates a new instance of scanbotsdk_aspect_ratio_t with given required params and stores it in the location specified by the last argument.
 
SBSDK_API scanbotsdk_error_code_t scanbotsdk_aspect_ratio_free (scanbotsdk_aspect_ratio_t *object)
 Frees the memory allocated for the instance of scanbotsdk_aspect_ratio_t. If null is passed, the function does nothing.
 
SBSDK_API scanbotsdk_error_code_t scanbotsdk_aspect_ratio_get_width (scanbotsdk_aspect_ratio_t *self, double *width)
 Returns value of width field of the given object.
 
SBSDK_API scanbotsdk_error_code_t scanbotsdk_aspect_ratio_get_height (scanbotsdk_aspect_ratio_t *self, double *height)
 Returns value of height field of the given object.
 

Detailed Description


Class Documentation

◆ scanbotsdk_point_t

struct scanbotsdk_point_t

Represents a point with integer coordinates.

Public Attributes

int x
 The x-coordinate of the point.
 
int y
 The y-coordinate of the point.
 

◆ scanbotsdk_pointf_t

struct scanbotsdk_pointf_t

Represents a point with floating point coordinates.

Public Attributes

float x
 The x-coordinate of the point.
 
float y
 The y-coordinate of the point.
 

◆ scanbotsdk_rect_t

struct scanbotsdk_rect_t

Represents a rectangle with integer coordinates.

Public Attributes

int x
 The x-coordinate of the top-left corner of the rectangle.
 
int y
 The y-coordinate of the top-left corner of the rectangle.
 
int width
 The width of the rectangle.
 
int height
 The height of the rectangle.
 

◆ scanbotsdk_rectf_t

struct scanbotsdk_rectf_t

Represents a rectangle with floating point coordinates.

Public Attributes

float x
 The x-coordinate of the top-left corner of the rectangle.
 
float y
 The y-coordinate of the top-left corner of the rectangle.
 
float width
 The width of the rectangle.
 
float height
 The height of the rectangle.
 

Typedef Documentation

◆ scanbotsdk_aspect_ratio_t

scanbotsdk_aspect_ratio_t class

Aspect ratio is the ratio of the width to the height of an image or screen.

◆ scanbotsdk_line_segment_float_t

scanbotsdk_line_segment_float_t class

Represents a line segment in 2D space.

◆ scanbotsdk_line_segment_int_t

scanbotsdk_line_segment_int_t class

Represents a line segment in 2D space.

Function Documentation

◆ scanbotsdk_aspect_ratio_create()

SBSDK_API scanbotsdk_error_code_t scanbotsdk_aspect_ratio_create ( double width,
double height,
scanbotsdk_aspect_ratio_t ** result )

Creates a new instance of scanbotsdk_aspect_ratio with given params and stores it in the location specified by the last argument.

As a rule if a function argument is a pointer to a scanbotsdk structure (scanbotsdk_..._t*) then the corresponding objects after function execution are left in valid but unspecified state, the caller is still responsible for freeing them. Exceptions are scanbotsdk_image_t*, scanbotdk_random_access_source_t* (if applicable) which are guaranteed to be in the original state.

Parameters
widthWidth component of the aspect ratio.

Default is 1.0

Parameters
heightHeight component of the aspect ratio.

Default is 1.0

Parameters
resultPointer to a variable that will store the created instance of scanbotsdk_aspect_ratio_t
Returns
: Error code, SCANBOTSDK_OK if no errors were encountered

◆ scanbotsdk_aspect_ratio_create_with_defaults()

SBSDK_API scanbotsdk_error_code_t scanbotsdk_aspect_ratio_create_with_defaults ( scanbotsdk_aspect_ratio_t ** result)

Creates a new instance of scanbotsdk_aspect_ratio_t with given required params and stores it in the location specified by the last argument.

As a rule if a function argument is a pointer to a scanbotsdk structure (scanbotsdk_..._t*) then the corresponding objects after function execution are left in valid but unspecified state, the caller is still responsible for freeing them. Exceptions are scanbotsdk_image_t*, scanbotdk_random_access_source_t* (if applicable) which are guaranteed to be in the original state.

Parameters
resultPointer to a variable that will store the created instance of scanbotsdk_aspect_ratio_t
Returns
: Error code, SCANBOTSDK_OK if no errors were encountered

◆ scanbotsdk_aspect_ratio_free()

SBSDK_API scanbotsdk_error_code_t scanbotsdk_aspect_ratio_free ( scanbotsdk_aspect_ratio_t * object)

Frees the memory allocated for the instance of scanbotsdk_aspect_ratio_t. If null is passed, the function does nothing.

Parameters
objectPointer to the instance of scanbotsdk_aspect_ratio_t to be freed
Returns
: Error code, SCANBOTSDK_OK if no errors were encountered

◆ scanbotsdk_aspect_ratio_get_height()

SBSDK_API scanbotsdk_error_code_t scanbotsdk_aspect_ratio_get_height ( scanbotsdk_aspect_ratio_t * self,
double * height )

Returns value of height field of the given object.

Height component of the aspect ratio.

Default is 1.0

Parameters
selfPointer to the instance of scanbotsdk_aspect_ratio_t
heightPointer to a variable that will store the value of the field.
Returns
: Error code, SCANBOTSDK_OK if no errors were encountered.

◆ scanbotsdk_aspect_ratio_get_width()

SBSDK_API scanbotsdk_error_code_t scanbotsdk_aspect_ratio_get_width ( scanbotsdk_aspect_ratio_t * self,
double * width )

Returns value of width field of the given object.

Width component of the aspect ratio.

Default is 1.0

Parameters
selfPointer to the instance of scanbotsdk_aspect_ratio_t
widthPointer to a variable that will store the value of the field.
Returns
: Error code, SCANBOTSDK_OK if no errors were encountered.

◆ scanbotsdk_line_segment_float_create()

SBSDK_API scanbotsdk_error_code_t scanbotsdk_line_segment_float_create ( scanbotsdk_pointf_t start,
scanbotsdk_pointf_t end,
scanbotsdk_line_segment_float_t ** result )

Creates a new instance of scanbotsdk_line_segment_float with given params and stores it in the location specified by the last argument.

As a rule if a function argument is a pointer to a scanbotsdk structure (scanbotsdk_..._t*) then the corresponding objects after function execution are left in valid but unspecified state, the caller is still responsible for freeing them. Exceptions are scanbotsdk_image_t*, scanbotdk_random_access_source_t* (if applicable) which are guaranteed to be in the original state.

Parameters
startStart point of the segment.
endEnd point of the segment.
resultPointer to a variable that will store the created instance of scanbotsdk_line_segment_float_t
Returns
: Error code, SCANBOTSDK_OK if no errors were encountered

◆ scanbotsdk_line_segment_float_free()

SBSDK_API scanbotsdk_error_code_t scanbotsdk_line_segment_float_free ( scanbotsdk_line_segment_float_t * object)

Frees the memory allocated for the instance of scanbotsdk_line_segment_float_t. If null is passed, the function does nothing.

Parameters
objectPointer to the instance of scanbotsdk_line_segment_float_t to be freed
Returns
: Error code, SCANBOTSDK_OK if no errors were encountered

◆ scanbotsdk_line_segment_float_get_end()

SBSDK_API scanbotsdk_error_code_t scanbotsdk_line_segment_float_get_end ( scanbotsdk_line_segment_float_t * self,
scanbotsdk_pointf_t * end )

Returns value of end field of the given object.

End point of the segment.

Parameters
selfPointer to the instance of scanbotsdk_line_segment_float_t
endPointer to a variable that will store the value of the field.
Returns
: Error code, SCANBOTSDK_OK if no errors were encountered.

◆ scanbotsdk_line_segment_float_get_start()

SBSDK_API scanbotsdk_error_code_t scanbotsdk_line_segment_float_get_start ( scanbotsdk_line_segment_float_t * self,
scanbotsdk_pointf_t * start )

Returns value of start field of the given object.

Start point of the segment.

Parameters
selfPointer to the instance of scanbotsdk_line_segment_float_t
startPointer to a variable that will store the value of the field.
Returns
: Error code, SCANBOTSDK_OK if no errors were encountered.

◆ scanbotsdk_line_segment_int_create()

SBSDK_API scanbotsdk_error_code_t scanbotsdk_line_segment_int_create ( scanbotsdk_point_t start,
scanbotsdk_point_t end,
scanbotsdk_line_segment_int_t ** result )

Creates a new instance of scanbotsdk_line_segment_int with given params and stores it in the location specified by the last argument.

As a rule if a function argument is a pointer to a scanbotsdk structure (scanbotsdk_..._t*) then the corresponding objects after function execution are left in valid but unspecified state, the caller is still responsible for freeing them. Exceptions are scanbotsdk_image_t*, scanbotdk_random_access_source_t* (if applicable) which are guaranteed to be in the original state.

Parameters
startStart point of the segment.
endEnd point of the segment.
resultPointer to a variable that will store the created instance of scanbotsdk_line_segment_int_t
Returns
: Error code, SCANBOTSDK_OK if no errors were encountered

◆ scanbotsdk_line_segment_int_free()

SBSDK_API scanbotsdk_error_code_t scanbotsdk_line_segment_int_free ( scanbotsdk_line_segment_int_t * object)

Frees the memory allocated for the instance of scanbotsdk_line_segment_int_t. If null is passed, the function does nothing.

Parameters
objectPointer to the instance of scanbotsdk_line_segment_int_t to be freed
Returns
: Error code, SCANBOTSDK_OK if no errors were encountered

◆ scanbotsdk_line_segment_int_get_end()

SBSDK_API scanbotsdk_error_code_t scanbotsdk_line_segment_int_get_end ( scanbotsdk_line_segment_int_t * self,
scanbotsdk_point_t * end )

Returns value of end field of the given object.

End point of the segment.

Parameters
selfPointer to the instance of scanbotsdk_line_segment_int_t
endPointer to a variable that will store the value of the field.
Returns
: Error code, SCANBOTSDK_OK if no errors were encountered.

◆ scanbotsdk_line_segment_int_get_start()

SBSDK_API scanbotsdk_error_code_t scanbotsdk_line_segment_int_get_start ( scanbotsdk_line_segment_int_t * self,
scanbotsdk_point_t * start )

Returns value of start field of the given object.

Start point of the segment.

Parameters
selfPointer to the instance of scanbotsdk_line_segment_int_t
startPointer to a variable that will store the value of the field.
Returns
: Error code, SCANBOTSDK_OK if no errors were encountered.