class Nya::Render::Rect

Overview

Rectangle

Included Modules

Defined in:

nya/render/rect.cr

Constant Summary

NYA_REGISTERED = true
PROPERTIES = {"x" => "Float64", "y" => "Float64", "width" => "Float64", "height" => "Float64"} of String => String

Constructors

Class Method Summary

Instance Method Summary

Constructor Detail

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

[View source]
def self.new #

[View source]

Class Method Detail

def self.deserialize(xml, ctx : SerializationContext | Nil = nil) #

[View source]
def self.transform_name(name) #

def self.xml_name #

Returns XML compatible name of a type (see Nya::Serializable.translate_type)


Instance Method Detail

def *(vec : CrystalEdge::Vector2) #

Multiplies rectangle by a vector


[View source]
def |(other : self) #

Returns a rectangle containing self and other


[View source]
def height : Float64 #

[View source]
def height=(height : Float64) #

[View source]
def max_x #

[View source]
def max_x=(x) #

[View source]
def max_y #

[View source]
def max_y=(y) #

[View source]
def width : Float64 #

[View source]
def width=(width : Float64) #

[View source]
def x : Float64 #

[View source]
def x=(x : Float64) #

[View source]
def y : Float64 #

[View source]
def y=(y : Float64) #

[View source]