home *** CD-ROM | disk | FTP | other *** search
- /****************************************************************
-
- Turbo Prolog Toolbox
- (C) Copyright 1987 Borland International.
-
- Demo of loadPic
- ****************************************************************/
-
- project "xpicdemo"
-
- include "tdoms.pro"
- include "gdoms.pro"
- include "gglobs.pro"
- include "tpreds.pro"
-
- PREDICATES
- picture(filename)
-
- GOAL
- picture(X),
- graphics(1,1,2),
- loadpic(X,0,0,0,0,200,320),readchar(_),
- graphics(1,1,3),
- write("\nPIC 1: Whole screen"),readchar(_),
- loadpic(X,0,0, 0,0,200,320),readchar(_),clearwindow,
- write("\nPIC 2: Upper Left Hand Corner "),readchar(_),
- loadpic(X,0,0, 0,0,100,160),readchar(_),clearwindow,
- write("\nPIC 3: Bottom Left Hand Corner "),readchar(_),
- loadpic(X,100,0, 100,0,100,160),readchar(_),clearwindow,
- write("\nPIC 4: Bottom Right Hand Corner "),readchar(_),
- loadpic(X,100,160,100,160,100,160),readchar(_),clearwindow,
- write("\nPIC 5: Upper Right Hand Corner "),readchar(_),
- loadpic(X,0,160, 0,160,100,160),readchar(_),clearwindow,
- write("\nPIC 6: Top Left Corner ===> Bottom Right Corner "),readchar(_),
- loadpic(X,0,0,100,160,100,160),readchar(_),clearwindow,
- write("\nPIC 7: Middle ===> Upper Left Hand\n Corner "),readchar(_),
- loadpic(X,50,80, 0,0,100,160),readchar(_),clearwindow,fail.
-
- CLAUSES
- picture("Welcome.pic").
- picture("Test.pic").
-