Skip to content

Commit

Permalink
get rid of setLineWidth, which is no longer used and seems dodgy anyway
Browse files Browse the repository at this point in the history
In particular it used 'setAttr' which created a normal Attribute instead
of a GTAttribute!
  • Loading branch information
byorgey committed Mar 25, 2014
1 parent 1e2e468 commit c9407f8
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions src/Diagrams/TwoD/Attributes.hs
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@

module Diagrams.TwoD.Attributes (
-- ** Width
LineWidth, getLineWidth, lineWidth, lineWidthA, setLineWidth
LineWidth, getLineWidth, lineWidth, lineWidthA
, lw, lwN, lwO, lwL
, ultraThin, veryThin, thin, medium, thick, veryThick

Expand All @@ -32,7 +32,6 @@ import Data.Default.Class
import Data.Semigroup

import Diagrams.Core
import Diagrams.Core.Style (setAttr)
import Diagrams.TwoD.Types (R2)

------------------------------------------------------------
Expand All @@ -55,12 +54,9 @@ instance Transformable LineWidth where
instance Default LineWidth where
def = LineWidth (Last (Output 1))

getLineWidth :: LineWidth -> (Measure Double)
getLineWidth :: LineWidth -> Measure Double
getLineWidth (LineWidth (Last w)) = w

setLineWidth :: (Measure Double) -> Style R2 -> Style R2
setLineWidth = setAttr . LineWidth . Last

-- | Set the line (stroke) width.
lineWidth :: (HasStyle a, V a ~ R2) => (Measure Double) -> a -> a
lineWidth = applyGTAttr . LineWidth . Last
Expand Down

0 comments on commit c9407f8

Please sign in to comment.