summaryrefslogtreecommitdiffstats
path: root/krita/plugins/viewplugins/scripting/samples/ruby
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-06-25 05:28:35 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-06-25 05:28:35 +0000
commitf008adb5a77e094eaf6abf3fc0f36958e66896a5 (patch)
tree8e9244c4d4957c36be81e15b566b4aa5ea26c982 /krita/plugins/viewplugins/scripting/samples/ruby
parent1210f27b660efb7b37ff43ec68763e85a403471f (diff)
downloadkoffice-f008adb5a77e094eaf6abf3fc0f36958e66896a5.tar.gz
koffice-f008adb5a77e094eaf6abf3fc0f36958e66896a5.zip
TQt4 port koffice
This should enable compilation under both Qt3 and Qt4; fixes for any missed components will be forthcoming git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/applications/koffice@1238284 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'krita/plugins/viewplugins/scripting/samples/ruby')
-rw-r--r--krita/plugins/viewplugins/scripting/samples/ruby/randompaint.rb16
-rw-r--r--krita/plugins/viewplugins/scripting/samples/ruby/torture-painting.rb16
2 files changed, 16 insertions, 16 deletions
diff --git a/krita/plugins/viewplugins/scripting/samples/ruby/randompaint.rb b/krita/plugins/viewplugins/scripting/samples/ruby/randompaint.rb
index 9e2f504f..ab5f6205 100644
--- a/krita/plugins/viewplugins/scripting/samples/ruby/randompaint.rb
+++ b/krita/plugins/viewplugins/scripting/samples/ruby/randompaint.rb
@@ -60,11 +60,11 @@ for i in 1..100
painter.setBrush( Krosskritacore::newCircleBrush(rand*20,rand*20,rand*10,rand*10) )
end
# paint a point
- shape = rand * 7
+ tqshape = rand * 7
painter.setStrokeStyle(1)
- if( shape < 1 )
+ if( tqshape < 1 )
painter.paintAt(rand * width , rand * height,1.1)
- elsif(shape < 2 )
+ elsif(tqshape < 2 )
xs = Array.new
ys = Array.new
for i in 0..6
@@ -72,14 +72,14 @@ for i in 1..100
ys[i] = rand*height
end
painter.paintPolyline(xs,ys)
- elsif(shape < 3)
+ elsif(tqshape < 3)
painter.paintLine(rand * width, rand * height, 1.1, rand * width, rand * height,1.1)
- elsif(shape < 4)
+ elsif(tqshape < 4)
painter.paintBezierCurve(rand * width, rand * height, 1.1, rand * width, rand * height, rand * width , rand * height, rand * width, rand * height, 1.1)
- elsif(shape < 5)
+ elsif(tqshape < 5)
randomizeStyle(painter)
painter.paintEllipse(rand * width, rand * height, rand * width, rand * height, 1.1)
- elsif(shape < 6)
+ elsif(tqshape < 6)
xs = Array.new
ys = Array.new
for i in 0..6
@@ -88,7 +88,7 @@ for i in 1..100
end
randomizeStyle(painter)
painter.paintPolygon(xs, ys)
- elsif(shape < 7)
+ elsif(tqshape < 7)
randomizeStyle(painter)
painter.paintRect(rand * width, rand * height, rand * width, rand * height, 1.1)
end
diff --git a/krita/plugins/viewplugins/scripting/samples/ruby/torture-painting.rb b/krita/plugins/viewplugins/scripting/samples/ruby/torture-painting.rb
index 67042de2..47216761 100644
--- a/krita/plugins/viewplugins/scripting/samples/ruby/torture-painting.rb
+++ b/krita/plugins/viewplugins/scripting/samples/ruby/torture-painting.rb
@@ -91,11 +91,11 @@ class TorturePainting
painter.setBrush( Krosskritacore::newCircleBrush(rand*20,rand*20,rand*10,rand*10) )
end
# paint a point
- shape = rand * 7
+ tqshape = rand * 7
painter.setStrokeStyle(1)
- if( shape < 1 )
+ if( tqshape < 1 )
painter.paintAt(rand * @width , rand * @height,1.1)
- elsif(shape < 2 )
+ elsif(tqshape < 2 )
xs = Array.new
ys = Array.new
for i in 0..6
@@ -103,14 +103,14 @@ class TorturePainting
ys[i] = rand*@height
end
painter.paintPolyline(xs,ys)
- elsif(shape < 3)
+ elsif(tqshape < 3)
painter.paintLine(rand * @width, rand * @height, 1.1, rand * @width, rand * @height,1.1)
- elsif(shape < 4)
+ elsif(tqshape < 4)
painter.paintBezierCurve(rand * @width, rand * @height, 1.1, rand * @width, rand * @height, rand * @width , rand * @height, rand * @width, rand * @height, 1.1)
- elsif(shape < 5)
+ elsif(tqshape < 5)
randomizeStyle(painter)
painter.paintEllipse(rand * @width, rand * @height, rand * @width, rand * @height, 1.1)
- elsif(shape < 6)
+ elsif(tqshape < 6)
xs = Array.new
ys = Array.new
for i in 0..6
@@ -119,7 +119,7 @@ class TorturePainting
end
randomizeStyle(painter)
painter.paintPolygon(xs, ys)
- elsif(shape < 7)
+ elsif(tqshape < 7)
randomizeStyle(painter)
painter.paintRect(rand * @width, rand * @height, rand * @width, rand * @height, 1.1)
end