abstract class Celestine::Drawable

Overview

Basic SVG drawable, inheritted by stuff like circles, rectangles, etc.

Direct Known Subclasses

Defined in:

drawables/drawable.cr

Instance Method Summary

Instance Method Detail

def class_attribute(io : IO) #

Rendered class options


[View source]
def classes : Array(String) #

[View source]
def classes=(val : Array(String)) #

[View source]
def custom_attribute(io : IO) #

Rendered custom attributes


[View source]
def custom_attrs : Hash(String, String) #

[View source]
def custom_attrs=(val : Hash(String, String)) #

[View source]
abstract def draw(io : IO) : Nil #

Main draw method for a drawable. Takes in and interacts with an io.


[View source]
def has_inner_elements? : Bool #

Returns true if this drawable has child elements written to its inner buffer


[View source]
def id : String | Nil #

ID of this object


[View source]
def id=(id : String | Nil) #

ID of this object


[View source]
def id_attribute(io : IO) #

Render ID options


[View source]
def inner_elements : IO::Memory #

[View source]
def inner_elements=(val : IO::Memory) #

[View source]
def style : Hash(String, String) #

[View source]
def style=(val : Hash(String, String)) #

[View source]
def style_attribute(io : IO) #

Rendered style options


[View source]
def to_s(io : IO) : Nil #

Serializes this drawable to an IO


[View source]
def to_s : String #

Serializes this drawable to a String


[View source]