arrow(text=nil, length=nil, head=nil)
click to toggle source
def arrow(text=nil, length=nil, head=nil)
if length || head
text = '' unless text
length = '' unless length
list(tk_call('::Diagrams::arrow', text, length, head))
else
if text
list(tk_call('::Diagrams::arrow', text))
else
list(tk_call('::Diagrams::arrow'))
end
end
end
attach(anchor=None)
click to toggle source
def attach(anchor=None)
tk_call('::Diagrams::attach', anchor)
end
box(text, width=nil, height=nil)
click to toggle source
def box(text, width=nil, height=nil)
if width || height
width = '' unless width
height = '' unless height
list(tk_call('::Diagrams::box', text, width, height))
else
list(tk_call('::Diagrams::box', text))
end
end
boxcoords(x1, y1, x2, y2)
click to toggle source
def boxcoords(x1, y1, x2, y2)
list(tk_call('::Diagrams::boxcoords', x1, y1, x2, y2))
end
bracket(dir, dist, from_pos, to_pos)
click to toggle source
def bracket(dir, dist, from_pos, to_pos)
list(tk_call('::Diagrams::bracket', dir, dist, from_pos, to_pos))
end
circle(text, radius=nil)
click to toggle source
def circle(text, radius=nil)
if radius
list(tk_call('::Diagrams::circle', text, radius))
else
list(tk_call('::Diagrams::circle', text))
end
end
color(name=None)
click to toggle source
def color(name=None)
tk_call('::Diagrams::color', name)
end
compute_pos()
click to toggle source
computepos()
click to toggle source
def computepos
list(tk_call('::Diagrams::computepos'))
end
current_pos(pos)
click to toggle source
current_pos=(pos)
click to toggle source
currentpos(pos)
click to toggle source
def currentpos(pos)
list(tk_call('::Diagrams::currentpos', pos))
end
currentpos=(pos)
click to toggle source
diamond(text, width=nil, height=nil)
click to toggle source
def diamond(text, width=nil, height=nil)
if width || height
width = '' unless width
height = '' unless height
list(tk_call('::Diagrams::diamond', text, width, height))
else
list(tk_call('::Diagrams::diamond', text))
end
end
direction(dir)
click to toggle source
def direction(dir)
tk_call('::Diagrams::direction', dir)
dir
end
draw_in(canvas)
click to toggle source
drawin(canvas)
click to toggle source
def drawin(canvas)
tk_call('::Diagrams::drawin', canvas)
canvas
end
drum(text, width=nil, height=nil)
click to toggle source
def drum(text, width=nil, height=nil)
if width || height
width = '' unless width
height = '' unless height
list(tk_call('::Diagrams::drum', text, width, height))
else
list(tk_call('::Diagrams::drum', text))
end
end
fillcolor(name=None)
click to toggle source
def fillcolor(name=None)
tk_call('::Diagrams::fillcolor', name)
end
get_pos(anchor, obj)
click to toggle source
getpos(anchor, obj)
click to toggle source
def getpos(anchor, obj)
list(tk_call('::Diagrams::getpos', anchor, obj))
end
line(*args)
click to toggle source
def line(*args)
ary = []
args.each{|arg|
if arg.kind_of?(Array) && arg.length == 2
ary.concat arg
else
ary << arg
end
}
list(tk_call('::Diagrams::line', *ary))
end
linestyle(style=None)
click to toggle source
def linestyle(style=None)
tk_call('::Diagrams::linestyle', style)
end
linewidth(pixels=None)
click to toggle source
def linewidth(pixels=None)
number(tk_call('::Diagrams::linewidth', pixels))
end
move_object(obj)
click to toggle source
moveobject(obj)
click to toggle source
def moveobject(obj)
list(tk_call('::Diagrams::moveobject', obj))
end
package_name()
click to toggle source
def self.package_name
PACKAGE_NAME
end
package_version()
click to toggle source
def self.package_version
begin
TkPackage.require('Diagrams')
rescue
''
end
end
plaintext(text, width=nil, height=nil)
click to toggle source
def plaintext(text, width=nil, height=nil)
if width || height
width = '' unless width
height = '' unless height
list(tk_call('::Diagrams::plaintext', text, width, height))
else
list(tk_call('::Diagrams::plaintext', text))
end
end
pop_state()
click to toggle source
popstate()
click to toggle source
def popstate
tk_call('::Diagrams::popstate')
end
position(x, y)
click to toggle source
def position(x, y)
list(tk_call('::Diagrams::position', x, y))
end
push_state()
click to toggle source
pushstate()
click to toggle source
def pushstate
tk_call('::Diagrams::pushstate')
end
save_ps(filename)
click to toggle source
saveps(filename)
click to toggle source
def saveps(filename)
tk_call('::Diagrams::saveps', filename)
filename
end
slanted(text, width=nil, height=nil, angle=nil)
click to toggle source
def slanted(text, width=nil, height=nil, angle=nil)
if width || height || angle
width = '' unless width
height = '' unless height
if angle
list(tk_call('::Diagrams::slanted', text, width, height, angle))
else
list(tk_call('::Diagrams::slanted', text, width, height))
end
else
list(tk_call('::Diagrams::slanted', text))
end
end
textcolor(name=None)
click to toggle source
def textcolor(name=None)
tk_call('::Diagrams::textcolor', name)
end
textfont(fnt=None)
click to toggle source
def textfont(fnt=None)
tk_call('::Diagrams::textfont', fnt)
end
use_gap(mode=None)
click to toggle source
usegap(mode=None)
click to toggle source
def usegap(mode=None)
bool(tk_call('::Diagrams::usegap', mode))
end
xgap(val=None)
click to toggle source
def xgap(val=None)
number(tk_call('::Diagrams::xgap', val))
end
ygap(val=None)
click to toggle source
def ygap(val=None)
number(tk_call('::Diagrams::ygap', val))
end