class
Celestine::Rough
- Celestine::Rough
- Reference
- Object
Overview
Algorithmic hand-drawn sketchy vector generator for Celestine Generates organic, sketchy multi-pass paths with deterministic jitter and bowing.
Defined in:
rough/rough.crConstructors
Instance Method Summary
- #bowing : Float64
- #bowing=(bowing : Float64)
-
#circle(path : Celestine::Path, cx : Number, cy : Number, r : Number) : Nil
Adds a sketchy circle centered at (cx, cy) with radius r to the given path
-
#line(path : Celestine::Path, x1 : Number, y1 : Number, x2 : Number, y2 : Number) : Nil
Adds a sketchy line between (x1, y1) and (x2, y2) to the given path
- #max_random_offset : Float64
- #max_random_offset=(max_random_offset : Float64)
- #passes : Int32
- #passes=(passes : Int32)
-
#polygon(path : Celestine::Path, points : Array(Tuple(IFNumber, IFNumber)) | Array(Celestine::Point) | Array(Celestine::FPoint)) : Nil
Adds a sketchy polygon connecting the points
-
#rect(path : Celestine::Path, x : Number, y : Number, width : Number, height : Number) : Nil
Adds a sketchy rectangle to the given path
- #rng : Random::PCG32
- #rng=(rng : Random::PCG32)
- #roughness : Float64
- #roughness=(roughness : Float64)
Constructor Detail
def self.new(roughness : Float64 = 1.0, bowing : Float64 = 1.0, passes : Int32 = 2, max_random_offset : Float64 = 2.0, seed : UInt64 = 42_u64)
#
Instance Method Detail
def circle(path : Celestine::Path, cx : Number, cy : Number, r : Number) : Nil
#
Adds a sketchy circle centered at (cx, cy) with radius r to the given path
def line(path : Celestine::Path, x1 : Number, y1 : Number, x2 : Number, y2 : Number) : Nil
#
Adds a sketchy line between (x1, y1) and (x2, y2) to the given path
def polygon(path : Celestine::Path, points : Array(Tuple(IFNumber, IFNumber)) | Array(Celestine::Point) | Array(Celestine::FPoint)) : Nil
#
Adds a sketchy polygon connecting the points
def rect(path : Celestine::Path, x : Number, y : Number, width : Number, height : Number) : Nil
#
Adds a sketchy rectangle to the given path