请更新godking.paint库到最新版本
import win.ui;
/*DSG{{*/
var winform = win.form(text="aardio form";right=319;bottom=327;)
winform.add(
plus={cls="plus";left=8;top=8;right=308;bottom=308;bgcolor=16777215;z=1;};
)
/*}}*/
winform.show();
import godking.paint
import godking.motion;
var p = godking.paint(300,300);
import inet.http;
var pic = inet.http.get("https://img.duoziwang.com/2017/03/17/B0266.jpg")
var pic2= inet.http.get("https://img.duoziwang.com/2017/03/17/B0269.jpg")
var x,y=0,0;
while(x<300){
x+=20;
var y;
if x<=150 y = godking.motion("4-"/*缓动类型*/, false/*是否按值*/, 0/*开始值*/, 7/*结束值*/, x/150/*当前值或进度*/);
elseif x>150 y = godking.motion("4+"/*缓动类型*/, false/*是否按值*/, 7/*开始值*/, 0/*结束值*/, (x-150)/150/*当前值或进度*/);
p.clear(/*颜色*/);
p.drawImagePoints4(pic2,0,50,150,50,0,200,150,200);
p.drawImagePoints4(pic,x,50-y*7,150,50,x,200-y*3,150,200);
p.drawText(0,250/*y1*/,/*x2*/,/*y2*/,"光庆 —— 翻书动画示例",::LOGFONT(name="宋体";h=16;color=0xFFFF0000;),0/*格式*/,1/*水平*/,0/*垂直*/)
winform.plus.foreground = p.getBuffer("*.png");
win.delay(1);
if x=300 {
x=-20;
if !win.delay(1000) {
win.quitMessage();
break;
}
}
if x=0 win.delay(1000);
}
win.loopMessage();
import win.ui;
/*DSG{{*/
var winform = win.form(text="aardio form";right=319;bottom=327;)
winform.add(
plus={cls="plus";left=8;top=8;right=308;bottom=308;bgcolor=16777215;z=1;};
)
/*}}*/
winform.show();
import godking.paint
import godking.motion;
var p = godking.paint(300,300);
import inet.http;
var pic = inet.http.get("https://img.duoziwang.com/2017/03/17/B0266.jpg")
var pic2= inet.http.get("https://img.duoziwang.com/2017/03/17/B0269.jpg")
var x1,x2=0,0;
var y = 0;
while(x2<300){
if x1<300 x1+=20;
if x1>20 x2+=20;
var y;
if x1<=150 y = godking.motion("4-"/*缓动类型*/, false/*是否按值*/, 0/*开始值*/, 7/*结束值*/, x1/150/*当前值或进度*/);
elseif x1>150 y = godking.motion("4+"/*缓动类型*/, false/*是否按值*/, 7/*开始值*/, 0/*结束值*/, (x1-150)/150/*当前值或进度*/);
p.clear(/*颜色*/);
p.drawImagePoints4(pic2,0,50,150,50,0,200,150,200);
p.drawImagePoints4(pic,x1,50-y*y,150,50,x2,200+y*3,150,200);
p.drawText(0,250/*y1*/,/*x2*/,/*y2*/,"光庆 —— 翻书动画示例",::LOGFONT(name="宋体";h=16;color=0xFFFF0000;),0/*格式*/,1/*水平*/,0/*垂直*/)
winform.plus.foreground = p.getBuffer("*.png");
win.delay(1);
if x2=300 {
x1=-20;
x2=0;
if !win.delay(1000) {
win.quitMessage();
break;
}
}
if x1=0 win.delay(1000);
}
win.loopMessage();