com.applitools.eyes.universal.mapper.RectangleRegionMapper Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of eyes-sdk-core-java5 Show documentation
Show all versions of eyes-sdk-core-java5 Show documentation
Applitools Eyes SDK base for Java
package com.applitools.eyes.universal.mapper;
import com.applitools.eyes.Region;
import com.applitools.eyes.universal.dto.RectangleRegionDto;
/**
* rectangle region mapper
*/
public class RectangleRegionMapper {
public static RectangleRegionDto toRectangleRegionDto(Region region) {
if (region == null) {
return null;
}
RectangleRegionDto rectangleRegionDto = new RectangleRegionDto();
rectangleRegionDto.setX(region.getLeft());
rectangleRegionDto.setY(region.getTop());
rectangleRegionDto.setHeight(region.getHeight());
rectangleRegionDto.setWidth(region.getWidth());
return rectangleRegionDto;
}
}