class

CrImage::Math::Fixed::Rectangle52_12

Inherits Reference / Object

Rectangle52_12 is a 52.12 fixed-point coordinate retangle. The min bound is inclusive and the max bound is exclusive. It is well-formed if min.x <= max.x and likewise for y.

It is analogous to the CrImage::Rectangle

Constructors

Class methods

zero
Source

Instance methods

+(p : Point52_12)
Source
-(p : Point52_12)
Source
clone
Source
empty

empty reports whether the rectangle contains no points

Source
eq(s : Rectangle52_12)

eq reports whether this and Rectangle s contain the same set of points. All empty rectangles are considered equal.

Source
height
Source
in(s : Rectangle52_12)

in reports whether every point in this is in s

Source
intersect(s : Rectangle52_12)

intersect return the largest rectangle contained by both self and s. If the two rectangle do not overlap then the zero rectangle will be returned

Source
max=(max : Point52_12)
Source
min=(min : Point52_12)
Source
to_s(io : IO) : Nil

Appends a short String representation of this object which includes its class name and its object address.

class Person
  def initialize(@name : String, @age : Int32)
  end
end

Person.new("John", 32).to_s # => #<Person:0x10a199f20>
Source
to_s

Returns a nicely readable and concise string representation of this object, typically intended for users.

This method should usually not be overridden. It delegates to #to_s(IO) which can be overridden for custom implementations.

Also see #inspect.

Source
union(s : Rectangle52_12) : Rectangle52_12

union returns the smalles rectangle that contains both self and s

Source
width
Source