struct Sketchbook::Rect

Overview

Represents a logical rectangle with an origin and corner points.

Defined in:

sys/rect.cr

Constructors

Instance Method Summary

Constructor Detail

def self.new(origin : Point, corner : Point) #

[View source]

Instance Method Detail

def clone #

[View source]
def copy_with(origin _origin = @origin, corner _corner = @corner) #

[View source]
def corner : Point #

def includes?(point : Point) #

[View source]
def includes?(other : Rect) #

Returns whether this rectangle includes other rectangle (in its entirety).


[View source]
def intersects?(other : Rect) #

Returns whether this rectangle intersects with other rectangle.


[View source]
def origin : Point #