Also import px and pct into PlotMeasures

Necessary for example 29 to work
This commit is contained in:
Michael K. Borregaard 2017-10-05 12:08:15 +02:00
parent 073724a84c
commit b37f2141a1
2 changed files with 5 additions and 6 deletions

View File

@ -138,12 +138,15 @@ module PlotMeasures
import Measures
import Measures: Length, AbsoluteLength, Measure, BoundingBox, mm, cm, inch, pt, width, height, w, h
const BBox = Measures.Absolute2DBox
export BBox, BoundingBox, mm, cm, inch, pt, px, pct, w, h
# allow pixels and percentages
const px = AbsoluteLength(0.254)
const pct = Length{:pct, Float64}(1.0)
export BBox, BoundingBox, mm, cm, inch, px, pct, pt, w, h
end
using .PlotMeasures
import .PlotMeasures: Length, AbsoluteLength, Measure, width, height
export BBox, BoundingBox
# ---------------------------------------------------------
include("types.jl")

View File

@ -1,10 +1,6 @@
# NOTE: (0,0) is the top-left !!!
# allow pixels and percentages
const px = AbsoluteLength(0.254)
const pct = Length{:pct, Float64}(1.0)
to_pixels(m::AbsoluteLength) = m.value / 0.254
const _cbar_width = 5mm