immerse gui fix
This commit is contained in:
parent
479ab989df
commit
6ce235bb68
File diff suppressed because one or more lines are too long
@ -150,7 +150,7 @@ _plotDefaults[:xscale] = :identity
|
|||||||
_plotDefaults[:yscale] = :identity
|
_plotDefaults[:yscale] = :identity
|
||||||
_plotDefaults[:xflip] = false
|
_plotDefaults[:xflip] = false
|
||||||
_plotDefaults[:yflip] = true
|
_plotDefaults[:yflip] = true
|
||||||
_plotDefaults[:size] = (800,600)
|
_plotDefaults[:size] = (600,400)
|
||||||
_plotDefaults[:pos] = (0,0)
|
_plotDefaults[:pos] = (0,0)
|
||||||
_plotDefaults[:windowtitle] = "Plots.jl"
|
_plotDefaults[:windowtitle] = "Plots.jl"
|
||||||
_plotDefaults[:show] = false
|
_plotDefaults[:show] = false
|
||||||
|
|||||||
@ -143,24 +143,13 @@ end
|
|||||||
getGadflyContext(plt::Plot{ImmersePackage}) = plt.o[2]
|
getGadflyContext(plt::Plot{ImmersePackage}) = plt.o[2]
|
||||||
getGadflyContext(subplt::Subplot{ImmersePackage}) = buildGadflySubplotContext(subplt)
|
getGadflyContext(subplt::Subplot{ImmersePackage}) = buildGadflySubplotContext(subplt)
|
||||||
|
|
||||||
# function Base.writemime(io::IO, ::MIME"image/png", plt::Plot{ImmersePackage})
|
|
||||||
# gplt = getGadflyContext(plt)
|
|
||||||
# setGadflyDisplaySize(plt.initargs[:size]...)
|
|
||||||
# Gadfly.draw(Gadfly.PNG(io, Compose.default_graphic_width, Compose.default_graphic_height), gplt)
|
|
||||||
# end
|
|
||||||
|
|
||||||
# function Base.writemime(io::IO, ::MIME"image/svg+xml", plt::Plot{ImmersePackage})
|
|
||||||
# gplt = getGadflyContext(plt)
|
|
||||||
# setGadflyDisplaySize(plt.initargs[:size]...)
|
|
||||||
# Gadfly.draw(Gadfly.SVG(io, Compose.default_graphic_width, Compose.default_graphic_height), gplt)
|
|
||||||
# end
|
|
||||||
|
|
||||||
|
|
||||||
function Base.display(::PlotsDisplay, plt::Plot{ImmersePackage})
|
function Base.display(::PlotsDisplay, plt::Plot{ImmersePackage})
|
||||||
|
|
||||||
fig, gplt = plt.o
|
fig, gplt = plt.o
|
||||||
if fig == nothing
|
if fig == nothing
|
||||||
fig = createImmerseFigure(plt.initargs)
|
fig = createImmerseFigure(plt.initargs)
|
||||||
|
Gtk.on_signal_destroy((x...) -> (Immerse.dropfig(Immerse._display, fig.figno); plt.o = (nothing,gplt)), fig.canvas)
|
||||||
plt.o = (fig, gplt)
|
plt.o = (fig, gplt)
|
||||||
end
|
end
|
||||||
|
|
||||||
@ -169,19 +158,6 @@ function Base.display(::PlotsDisplay, plt::Plot{ImmersePackage})
|
|||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
# function Base.writemime(io::IO, ::MIME"image/png", plt::Subplot{ImmersePackage})
|
|
||||||
# gplt = getGadflyContext(plt)
|
|
||||||
# setGadflyDisplaySize(plt.initargs[1][:size]...)
|
|
||||||
# Gadfly.draw(Gadfly.PNG(io, Compose.default_graphic_width, Compose.default_graphic_height), gplt)
|
|
||||||
# end
|
|
||||||
|
|
||||||
|
|
||||||
# function Base.writemime(io::IO, ::MIME"image/svg+xml", plt::Subplot{ImmersePackage})
|
|
||||||
# gplt = getGadflyContext(plt)
|
|
||||||
# setGadflyDisplaySize(plt.initargs[1][:size]...)
|
|
||||||
# Gadfly.draw(Gadfly.SVG(io, Compose.default_graphic_width, Compose.default_graphic_height), gplt)
|
|
||||||
# end
|
|
||||||
|
|
||||||
function Base.display(::PlotsDisplay, subplt::Subplot{ImmersePackage})
|
function Base.display(::PlotsDisplay, subplt::Subplot{ImmersePackage})
|
||||||
|
|
||||||
# if we haven't created the window yet, do it
|
# if we haven't created the window yet, do it
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user