Skip to content
Snippets Groups Projects
Commit f74bb6eb authored by stuebinm's avatar stuebinm
Browse files

we don't support ellipses

parent c89872d3
Branches
No related tags found
No related merge requests found
...@@ -26,7 +26,6 @@ data BadgeArea = ...@@ -26,7 +26,6 @@ data BadgeArea =
, areaY :: Double , areaY :: Double
, areaWidth :: Double , areaWidth :: Double
, areaHeight :: Double , areaHeight :: Double
, areaIsEllipse :: Bool
} }
deriving (Ord, Eq, Generic, Show) deriving (Ord, Eq, Generic, Show)
...@@ -61,9 +60,7 @@ badgeJsonArray (Badge token area) = ...@@ -61,9 +60,7 @@ badgeJsonArray (Badge token area) =
, "y" .= areaY , "y" .= areaY
, "width" .= areaWidth , "width" .= areaWidth
, "height" .= areaHeight , "height" .= areaHeight
, "type" .= if areaIsEllipse , "type" .= A.String "rectangle"
then A.String "ellipse"
else A.String "rectangle"
] ]
badgeJson :: FilePath -> Badge -> A.Value badgeJson :: FilePath -> Badge -> A.Value
......
...@@ -231,11 +231,10 @@ checkObjectGroupProperty p@(Property name _) = case name of ...@@ -231,11 +231,10 @@ checkObjectGroupProperty p@(Property name _) = case name of
ObjectPoint {..} -> ObjectPoint {..} ->
offersBadge (Badge token (BadgePoint objectX objectY)) offersBadge (Badge token (BadgePoint objectX objectY))
ObjectRectangle {..} -> ObjectRectangle {..} ->
offersBadge (Badge token area) if isJust objectEllipse
where area = BadgeRect then offersBadge
objectX objectY $ Badge token (BadgeRect objectX objectY objectWidth objectHeight)
objectWidth objectHeight else complain "ellipses are not supported."
(objectEllipse == Just True)
ObjectPolygon {} -> complain "polygons are not supported." ObjectPolygon {} -> complain "polygons are not supported."
ObjectPolyline {} -> complain "polylines are not supported." ObjectPolyline {} -> complain "polylines are not supported."
ObjectText {} -> complain "cannot use texts to define badge areas." ObjectText {} -> complain "cannot use texts to define badge areas."
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment