Merge pull request #1039 from jheinen/master

gr: always use NDCs when inquiring text extents
This commit is contained in:
Josef Heinen 2017-08-25 05:05:13 +02:00 committed by GitHub
commit 25afd5c0e7

View File

@ -567,12 +567,15 @@ function gr_set_yticks_font(sp)
end
function gr_get_ticks_size(ticks, i)
GR.savestate()
GR.selntran(0)
l = 0.0
for (cv, dv) in zip(ticks...)
tb = gr_inqtext(0, 0, string(dv))[i]
tb_min, tb_max = extrema(tb)
l = max(l, tb_max - tb_min)
end
GR.restorestate()
return l
end