class Layout::Primitive

Overview

A constrainable value of measurement.

Defined in:

primitive.cr

Constructors

Instance Method Summary

Constructor Detail

def self.new(name) #

[View source]
def self.new #

[View source]

Instance Method Detail

def *(primitive : Layout::Primitive) #

[View source]
def *(*args, **options) #

[View source]
def *(*args, **options, &) #

[View source]
def +(primitive : Layout::Primitive) #

[View source]
def +(*args, **options) #

[View source]
def +(*args, **options, &) #

[View source]
def -(primitive : Layout::Primitive) #

[View source]
def -(*args, **options) #

[View source]
def -(*args, **options, &) #

[View source]
def /(*args, **options) #

[View source]
def /(*args, **options, &) #

[View source]
def constraints : Array(Kiwi::Constraint) #

The constraints on this primitive. This is used internally to load the constraints into the constraint solver.


[View source]
def eq(primitive : Layout::Primitive, strength) #

[View source]
def eq(expression, strength) : Kiwi::Constraint #

[View source]
def eq(expression) : Kiwi::Constraint #

[View source]
def gte(primitive : Layout::Primitive, strength) #

[View source]
def gte(expression, strength) : Kiwi::Constraint #

[View source]
def gte(expression) : Kiwi::Constraint #

[View source]
def lte(primitive : Layout::Primitive, strength) #

[View source]
def lte(expression, strength) : Kiwi::Constraint #

[View source]
def lte(expression) : Kiwi::Constraint #

[View source]
def value #

The final calculated value of the primitive. This is the value you'll use after solving the constraints.


[View source]
def variable : Kiwi::Variable #

Returns the internal constraint variable. This is used by the constraint solver to calculate the final value.


[View source]