class Celestine::ClipPath

Overview

Class which defines a clipping path for vector graphics

Included Modules

Defined in:

celestine.cr
effects/clip_path.cr

Constant Summary

TAG = "clipPath"

Instance Method Summary

Instance methods inherited from module Celestine::Meta::Context::Methods

<<(drawable : Celestine::Drawable) <<, rough(roughness : Float64 = 1.0, bowing : Float64 = 1.0, seed : UInt64 = 42_u64, stroke : String = "#000", stroke_width : Number = 1.5, fill : String = "none", &block : Celestine::Rough::Builder -> ) : Celestine::Path rough, use(id : String)
use(drawable : Celestine::Drawable)
use(drawable : Celestine::Drawable, &block : Celestine::Use -> )
use(id : String, &block : Celestine::Use -> )
use(&block : Celestine::Use -> )
use

Instance methods inherited from module Celestine::DataViz

donut_slice(cx : Number, cy : Number, r_inner : Number, r_outer : Number, start_angle : Number, end_angle : Number, fill : String = "#3b82f6", stroke : String | Nil = nil, stroke_width : Number = 1, &block : Celestine::Path -> ) : Celestine::Path
donut_slice(cx : Number, cy : Number, r_inner : Number, r_outer : Number, start_angle : Number, end_angle : Number, fill : String = "#3b82f6", stroke : String | Nil = nil, stroke_width : Number = 1) : Celestine::Path
donut_slice
, progress_ring(cx : Number, cy : Number, radius : Number, progress : Number, track_color : String = "#e2e8f0", fill_color : String = "#3b82f6", stroke_width : Number = 8, start_angle : Float64 = -90.0, &block : Celestine::Group -> ) : Celestine::Group
progress_ring(cx : Number, cy : Number, radius : Number, progress : Number, track_color : String = "#e2e8f0", fill_color : String = "#3b82f6", stroke_width : Number = 8, start_angle : Float64 = -90.0) : Celestine::Group
progress_ring
, sparkline(data : Array(Number), x : Number, y : Number, width : Number, height : Number, stroke : String = "#0284c7", stroke_width : Number = 2, fill : String | Nil = nil, smooth : Bool = false, &block : Celestine::Path -> ) : Celestine::Path
sparkline(data : Array(Number), x : Number, y : Number, width : Number, height : Number, stroke : String = "#0284c7", stroke_width : Number = 2, fill : String | Nil = nil, smooth : Bool = false) : Celestine::Path
sparkline

Instance methods inherited from module Celestine::Modules::Animate::Transform

animate_transform_rotate(&block : Celestine::Animate::Transform::Rotate -> ) animate_transform_rotate, animate_transform_scale(&block : Celestine::Animate::Transform::Scale -> ) animate_transform_scale, animate_transform_skew_x(&block : Celestine::Animate::Transform::SkewX -> ) animate_transform_skew_x, animate_transform_skew_y(&block : Celestine::Animate::Transform::SkewY -> ) animate_transform_skew_y, animate_transform_translate(&block : Celestine::Animate::Transform::Translate -> ) animate_transform_translate

Instance methods inherited from module Celestine::Modules::Animate::Motion

animate_motion(&block : Celestine::Animate::Motion -> ) animate_motion

Instance methods inherited from module Celestine::Modules::Animate

animate(&block : Celestine::Animate -> ) animate

Instance methods inherited from module Celestine::Modules::Transform

transform(&block : Celestine::Drawable::Transform -> ) transform, transform_attribute(io : IO) transform_attribute

Instance methods inherited from class Celestine::Drawable

class_attribute(io : IO) class_attribute, classes : Array(String) classes, classes=(val : Array(String)) classes=, custom_attribute(io : IO) custom_attribute, custom_attrs : Hash(String, String) custom_attrs, custom_attrs=(val : Hash(String, String)) custom_attrs=, draw(io : IO) : Nil draw, has_inner_elements? : Bool has_inner_elements?, id : String | Nil id, id=(id : String | Nil) id=, id_attribute(io : IO) id_attribute, inner_elements : IO::Memory inner_elements, inner_elements=(val : IO::Memory) inner_elements=, style : Hash(String, String) style, style=(val : Hash(String, String)) style=, style_attribute(io : IO) style_attribute, to_s(io : IO) : Nil
to_s : String
to_s

Instance Method Detail

def anchor(&block : Celestine::Anchor -> ) : Celestine::Anchor #

Allows a Celestine::Anchor to be made using a DSL call, and added to this drawables items.


def circle(&block : Celestine::Circle -> ) : Celestine::Circle #

Allows a Celestine::Circle to be made using a DSL call, and added to this drawables items.


def clip_path_units : String | Nil #

Defines the coordinate system for the clipping path Potential values: userSpaceOnUse | objectBoundingBox


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

Defines the coordinate system for the clipping path Potential values: userSpaceOnUse | objectBoundingBox


[View source]
def draw(io : IO) : Nil #
Description copied from class Celestine::Drawable

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


[View source]
def ellipse(&block : Celestine::Ellipse -> ) : Celestine::Ellipse #

Allows a Celestine::Ellipse to be made using a DSL call, and added to this drawables items.


def group(&block : Celestine::Group -> ) : Celestine::Group #

Allows a Celestine::Group to be made using a DSL call, and added to this drawables items.


def image(&block : Celestine::Image -> ) : Celestine::Image #

Allows a Celestine::Image to be made using a DSL call, and added to this drawables items.


def line(&block : Celestine::Line -> ) : Celestine::Line #

Allows a Celestine::Line to be made using a DSL call, and added to this drawables items.


def path(&block : Celestine::Path -> ) : Celestine::Path #

Allows a Celestine::Path to be made using a DSL call, and added to this drawables items.


def polygon(&block : Celestine::Polygon -> ) : Celestine::Polygon #

Allows a Celestine::Polygon to be made using a DSL call, and added to this drawables items.


def polyline(&block : Celestine::Polyline -> ) : Celestine::Polyline #

Allows a Celestine::Polyline to be made using a DSL call, and added to this drawables items.


def rectangle(&block : Celestine::Rectangle -> ) : Celestine::Rectangle #

Allows a Celestine::Rectangle to be made using a DSL call, and added to this drawables items.


def style(&block : Celestine::Style -> ) : Celestine::Style #

Allows a Celestine::Style to be made using a DSL call, and added to this drawables items.


def svg(&block : Celestine::Svg -> ) : Celestine::Svg #

Allows a Celestine::Svg to be made using a DSL call, and added to this drawables items.


def text(&block : Celestine::Text -> ) : Celestine::Text #

Allows a Celestine::Text to be made using a DSL call, and added to this drawables items.