Class: QrForge::Components::Module::Circle
- Inherits:
-
ForgeComponent
- Object
- ForgeComponent
- QrForge::Components::Module::Circle
- Defined in:
- lib/qr_forge/components/module/circle.rb
Overview
Circle component for the individual module.
Instance Method Summary collapse
Methods inherited from ForgeComponent
Constructor Details
This class inherits a constructor from QrForge::Components::ForgeComponent
Instance Method Details
#draw(y:, x:, quiet_zone:, color: "black", **_) ⇒ Object
9 10 11 12 13 14 15 16 17 18 19 20 21 |
# File 'lib/qr_forge/components/module/circle.rb', line 9 def draw(y:, x:, quiet_zone:, color: "black", **_) r = 0.5 cx = x + r + quiet_zone cy = y + r + quiet_zone @xml_builder.circle( cx:, cy:, r:, fill: color, test_id: @test_id ) end |