Class: VectorSalad::StandardShapes::Triangle

Inherits:
Polygon show all
Defined in:
lib/vector_salad/standard_shapes/triangle.rb

Overview

Equilateral triangle shape.

Instance Attribute Summary

Attributes inherited from Polygon

#sides

Attributes inherited from BasicShape

#options

Instance Method Summary collapse

Methods inherited from Polygon

#to_path

Methods included from Mixins::At

#[], #at, #at=, #move

Methods inherited from BasicShape

#flip, #flip_x, #flip_y, #jitter, #move, #rotate, #scale, #to_a, #to_bezier_path, #to_cubic_path, #to_multi_path, #to_path, #to_simple_path, #to_svg

Constructor Details

#initialize(radius, **options) ⇒ Triangle

Create a new equilateral triangle.

Examples:

new(100)


11
12
13
# File 'lib/vector_salad/standard_shapes/triangle.rb', line 11

def initialize(radius, **options)
  super(3, radius, **options)
end