Enrollment 28.2.0
Loading...
Searching...
No Matches
PrintCropConfiguration Class Reference

Holds print cropping configuration. More...

#include <PrintSegment.h>

Collaboration diagram for PrintCropConfiguration:

Public Member Functions

void SetImageDimensions (ImageWidth width, ImageHeight height)
 Function sets output image dimension.
ImageWidth GetImageWidth () const
 It gets output image width.
ImageHeight GetImageHeight () const
 It gets output image height.
void SetBackgroundColor (RGBA color)
 It sets background color rounding box area that is out of image.
RGBA GetBackgroundColor () const
 It provides background color for rounding box area that is out of image.
void EnableAlignedCropping (bool aligned)
 Enable Aligned Cropping.
bool IsAlignedCroppingEnabled () const
 Get Aligned Crop Configuration.
 PrintCropConfiguration ()=default
 Create default PrintCropConfiguration object.

Detailed Description

Holds print cropping configuration.

Constructor & Destructor Documentation

◆ PrintCropConfiguration()

Create default PrintCropConfiguration object.

Default configuration is

  • image width - will be calculated according to cropped rectangle
  • image height - will be calculated according to cropped rectangle
  • background color - Colors::White
  • aligned cropping - true

References PrintCropConfiguration().

Referenced by PrintCropConfiguration().

Here is the call graph for this function:
Here is the caller graph for this function:

Member Function Documentation

◆ EnableAlignedCropping()

void EnableAlignedCropping ( bool aligned)
inline

Enable Aligned Cropping.

This function activates aligned cropping based on the provided argument.

Parameters
alignedenable aligned crop
  • When set to true, the cropping aligns the rotated rectangle, positioning its top-left point at [0,0] in the cropped image.
  • When set to false, the cropping involves the bounding rectangle of the rotated rectangle.

◆ GetBackgroundColor()

RGBA GetBackgroundColor ( ) const
inlinenodiscard

It provides background color for rounding box area that is out of image.

Returns
background color for rounding box area that is out of image

◆ GetImageHeight()

ImageHeight GetImageHeight ( ) const
inlinenodiscard

It gets output image height.

Returns
output image height

◆ GetImageWidth()

ImageWidth GetImageWidth ( ) const
inlinenodiscard

It gets output image width.

Returns
output image width

◆ IsAlignedCroppingEnabled()

bool IsAlignedCroppingEnabled ( ) const
inlinenodiscard

Get Aligned Crop Configuration.

Returns
The current state of the aligned cropping flag.

◆ SetBackgroundColor()

void SetBackgroundColor ( RGBA color)
inline

It sets background color rounding box area that is out of image.

Parameters
colorbackground color

◆ SetImageDimensions()

void SetImageDimensions ( ImageWidth width,
ImageHeight height )
inline

Function sets output image dimension.

The given rectangle is cropped from image and paste to output image with given dimensions.

Parameters
width- width of output image
height- height of output image
Exceptions
EnrollmentInvalidArgumentExceptionwhen width is 0
EnrollmentInvalidArgumentExceptionwhen height is 0

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