Skip to content

Commit

Permalink
Fix great spells showing start/end point
Browse files Browse the repository at this point in the history
  • Loading branch information
object-Object committed Sep 12, 2024
1 parent dbdbc63 commit b0d9e6c
Showing 1 changed file with 23 additions and 14 deletions.
37 changes: 23 additions & 14 deletions src/HexBug/rendering/draw.py
Original file line number Diff line number Diff line change
Expand Up @@ -85,20 +85,38 @@ def get_grid_options(
if arrow_radius is None:
arrow_radius = line_width * 2

start_point = EndPoint.BorderedMatch(
match_radius=point_radius,
border=Marker(
point = Point.Single(
marker=Marker(
color=theme.marker_color,
radius=point_radius * 1.5,
radius=point_radius,
),
)

if per_world:
intersections = Intersections.UniformPoints(
point=point,
)

lines = Lines.Monocolor(
color=palette.per_world_color,
bent=False,
)

else:
start_point = EndPoint.BorderedMatch(
match_radius=point_radius,
border=Marker(
color=theme.marker_color,
radius=point_radius * 1.5,
),
)

intersections = Intersections.EndsAndMiddle(
start=start_point,
middle=point,
end=start_point,
)

lines = Lines.SegmentColors(
colors=palette.line_colors,
triangles=Triangle.BorderStartMatch(
Expand All @@ -120,16 +138,7 @@ def get_grid_options(
return GridOptions(
line_thickness=line_width,
pattern_options=GridPatternOptions.Uniform(
intersections=Intersections.EndsAndMiddle(
start=start_point,
middle=Point.Single(
marker=Marker(
color=theme.marker_color,
radius=point_radius,
),
),
end=start_point,
),
intersections=intersections,
lines=lines,
),
center_dot=Point.None_(),
Expand Down

0 comments on commit b0d9e6c

Please sign in to comment.