Skip to content

Commit

Permalink
GeoDrawer.Content can be hashable (#22)
Browse files Browse the repository at this point in the history
  • Loading branch information
nighthawk committed Jan 21, 2024
1 parent 81395c8 commit c051b4d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Sources/GeoDrawer/GeoDrawer.swift
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@ extension GeoDrawer {
#if canImport(CoreGraphics)
public typealias Color = CGColor
#else
public struct Color {
public struct Color: Hashable {
public init(red: Double, green: Double, blue: Double, alpha: Double = 1) {
self.red = red
self.green = green
Expand All @@ -167,7 +167,7 @@ extension GeoDrawer {
}
#endif

public enum Content {
public enum Content: Hashable {
case line(GeoJSON.LineString, stroke: Color)
case polygon(GeoJSON.Polygon, fill: Color, stroke: Color? = nil, strokeWidth: Double = 2)
case circle(GeoJSON.Position, radius: Double, fill: Color, stroke: Color? = nil, strokeWidth: Double = 2)
Expand Down

0 comments on commit c051b4d

Please sign in to comment.