Class: DxfIO::Entity::Circle

Inherits:
Other
  • Object
show all
Defined in:
lib/dxf_io/entity/circle.rb

Constant Summary collapse

ADDITIONAL_GROUP_CODES =
{radius: 40}.freeze

Constants inherited from Other

Other::END_POINT_GROUP_NUMS, Other::GROUP_CODES, Other::START_POINT_GROUP_NUMS, Other::TYPE_NAME_VALUE_MAPPING, Other::X_COORDINATE_GROUP_NUMS, Other::Y_COORDINATE_GROUP_NUMS, Other::Z_COORDINATE_GROUP_NUMS

Instance Method Summary collapse

Methods inherited from Other

#-, #bordering_xs, #bordering_ys, #frame?, #height, #left_down_point, #move_to!, #points, #to_a, #to_h, #width, #xs, #ys

Instance Method Details

#bordering_pointsObject



18
19
20
21
22
23
# File 'lib/dxf_io/entity/circle.rb', line 18

def bordering_points
  [ center + [radius, 0],
    center + [0, radius],
    center - [radius, 0],
    center - [0, radius] ]
end

#centerObject



14
15
16
# File 'lib/dxf_io/entity/circle.rb', line 14

def center
  points.first
end