June 2018 Update

This commit is contained in:
Ingy döt Net 2018-06-22 20:57:24 +00:00
parent ba8067c3b7
commit 22f33d4004
5278 changed files with 84726 additions and 14379 deletions

View file

@ -0,0 +1,61 @@
# Project : Draw a cuboid
# Date : 2018/01/18
# Author : Gal Zsolt [~ CalmoSoft ~]
# Email : <calmosoft@gmail.com>
load "guilib.ring"
paint = null
new qapp
{
win1 = new qwidget() {
setwindowtitle("Draw a cuboid")
setgeometry(100,100,500,600)
label1 = new qlabel(win1) {
setgeometry(10,10,400,400)
settext("")
}
new qpushbutton(win1) {
setgeometry(150,500,100,30)
settext("draw")
setclickevent("draw()")
}
show()
}
exec()
}
func draw
p1 = new qpicture()
color = new qcolor() {
setrgb(0,0,255,255)
}
pen = new qpen() {
setcolor(color)
setwidth(1)
}
paint = new qpainter() {
begin(p1)
setpen(pen)
color = new qcolor()
color.setrgb(255,0,0,255)
mybrush = new qbrush() {setstyle(1) setcolor(color)}
setbrush(mybrush)
paint.drawPolygon([[200,200],[300,200],[300,100],[200,100]], 0)
color = new qcolor()
color.setrgb(0,255,0,255)
mybrush = new qbrush() {setstyle(1) setcolor(color)}
setbrush(mybrush)
paint.drawPolygon([[200,100],[250,50],[350,50],[300,100]], 0)
color = new qcolor()
color.setrgb(0, 0, 255,255)
mybrush = new qbrush() {setstyle(1) setcolor(color)}
setbrush(mybrush)
paint.drawPolygon([[350,50],[350,150],[300,200],[300,100]], 0)
endpaint()
}
label1 { setpicture(p1) show() }
return