graphics.pl
来自「PRl教学程序 PRl教学程序 PRl教学程序」· PL 代码 · 共 34 行
PL
34 行
/********************************************************************
Constraint-based Graphical Programming in B-Prolog
%
Animate fancy graphics
*********************************************************************/
:-include(binaryTree).
:-include(circleChart).
:-include(sierpinski).
:-include(squares).
:-include(triangles).
:-include(pythagoras).
:-write('type animate to start'),nl.
animate:-
animate([pythagoras,binaryTree,circleChart,sierpinski,squares,triangles]).
animate(Progs):-
cgStartRecordAnimation(graphics), % save the applet into graphics.java
member(Prog,Progs),
Call=..[Prog,Frame],
call(Call),
cgPack(Frame),
cgResize(Frame,Frame1,300,300),
cgMove(Frame1,Frame2,100,100),
cgCleanDefaultWindow,
cgShow(Frame2),
cgSleep(1000),
fail.
animate(Progs):-
cgStopRecord.
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?