struct Espresso::Bounds

Overview

Stores the two-dimensional boundaries of an object. This is a rectangular area that the object encompasses.

Defined in:

espresso/bounds.cr

Constructors

Instance Method Summary

Constructor Detail

def self.new(x, y, width, height) #

Creates the bounds with initial values.


[View source]

Instance Method Detail

def bottom #

Y-coordinate of the lower bound.


[View source]
def height : Int32 #

Height of the rectangle.


[View source]
def left : Int32 #

X-coordinate of the left side.


[View source]
def right #

X-coordinate of the right side.


[View source]
def top : Int32 #

Y-coordinate of the upper bound.


[View source]
def width : Int32 #

Width of the rectangle.


[View source]
def x : Int32 #

X-coordinate of the upper-left corner.


[View source]
def y : Int32 #

Y-coordinate of the upper-left corner.


[View source]