CrImage::Region
Inherits Struct < Value < Object
Represents a rectangular area on an Image from its upper left corner x and y coordinates, and a width and height.
See Operation::Crop#crop and Operation::Draw#draw_square for examples using it.
Constructors
center(x : UInt16, y : UInt16, width : UInt16, height : UInt16) : Region
Construct a new Region with x and y being the center of the region instead of the upper left corner.
new(x : UInt16, y : UInt16, width : UInt16, height : UInt16)
SourceInstance methods
clone
Sourcecopy_with(x _x = @x, y _y = @y, width _width = @width, height _height = @height)
Sourcecrop(image : Image) : Image
Crop a provided Image with this region, using Operation::Crop#crop
height
width
x
y