Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

update for Base.Graphics

  • Loading branch information...
commit 9db012b09efc49c6aac9507e1f57cdff424323f8 1 parent 5fa4440
@JeffBezanson JeffBezanson authored
Showing with 6 additions and 6 deletions.
  1. +2 −2 examples/sketch.jl
  2. +3 −3 src/Tk.jl
  3. +1 −1  src/tkwidget.jl
View
4 examples/sketch.jl
@@ -1,6 +1,6 @@
require("Tk")
using Tk
-using Cairo
+using Base.Graphics
function sketch_window()
w = Window("drawing", 400, 300)
@@ -8,7 +8,7 @@ function sketch_window()
pack(c)
lastx = 0
lasty = 0
- cr = cairo_context(c)
+ cr = getgc(c)
set_source_rgb(cr, 1, 1, 1)
paint(cr)
reveal(c)
View
6 src/Tk.jl
@@ -17,7 +17,8 @@ using Base
using Cairo
-import Base.string, Base.show
+import Base: string, show
+import Base.Graphics: width, height, getgc
include("tkwidget.jl") # old Tk
include("types.jl")
@@ -30,8 +31,7 @@ include("menu.jl")
export Window, TkCanvas, Canvas, pack, place, tcl_eval, TclError,
- cairo_surface_for, width, height, windowwidth, windowheight, reveal,
- cairo_context, cairo_surface,
+ cairo_surface_for, width, height, reveal, cairo_surface, getgc,
tcl_doevent, MouseHandler
export tcl, tclvar, tk_configure, tk_cget, tk_identify, tk_state, tk_instate, tk_winfo, tk_wm, tk_exists,
View
2  src/tkwidget.jl
@@ -325,7 +325,7 @@ function update()
tcl_eval("update")
end
-cairo_context(c::Canvas) = c.backcc
+getgc(c::Canvas) = c.backcc
cairo_surface(c::Canvas) = c.back
Please sign in to comment.
Something went wrong with that request. Please try again.