home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Corel Draw 6
/
corel-draw-6-cd1.iso
/
photopnt
/
filenew.csc
< prev
next >
Wrap
Text File
|
1995-08-18
|
2KB
|
70 lines
REM Simulates the filenew box in photopaint
REM Filenew.csc 24 MAY, 1995
REM Once all of the options are selected, the new file is generated
DIM types(6) AS STRING, papertypes(6) AS INTEGER
REM all the types of images
types(1) = "24-bit"
types(2) = "Grayscale"
types(3) = "Black and White"
types(4) = "256 color"
types(5) = "32 bit"
types(6) = "16 color"
REM These are used to convert the types into what paint wants
papertypes(1) = 5
papertypes(2) = 9
papertypes(3) = 8
papertypes(4) = 5
papertypes(5) = 3
papertypes(6) = 5
REM Defaults
width = "860"
height = "504"
hres = "72"
vres = "72"
red = "255"
green = "255"
blue = "255"
k = "0"
index% = 1
BEGIN DIALOG Dialog1 56, 10, 110, 212, "My FileNew Dialog"
TEXT 16, 7, 40, 8, "Width"
TEXTBOX 58, 7, 40, 13, width$
TEXT 16, 25, 40, 8, "Height"
TEXTBOX 58, 25, 40, 13, height$
TEXT 16, 153, 40, 8, "Type"
DDLISTBOX 48, 151, 55, 72, types, index%
TEXT 16, 43, 40, 8, "HRes"
TEXTBOX 58, 43, 40, 13, hres$
TEXT 16, 62, 40, 8, "VRes"
TEXTBOX 58, 61, 40, 13, vres$
TEXT 16, 81, 40, 8, "Paper Red"
TEXTBOX 58, 79, 40, 13, red$
TEXT 16, 99, 40, 8, "Paper Green"
TEXTBOX 58, 97, 40, 13, green$
TEXT 16, 118, 40, 8, "Paper Blue"
TEXTBOX 58, 115, 40, 13, blue$
TEXT 16, 134, 40, 8, "Paper K"
TEXTBOX 58, 133, 40, 13, k$
OKBUTTON 30, 175, 50, 20
END DIALOG
ret = DIALOG(dialog1)
IF ret = 2 THEN STOP
typepaper = index
papertype = papertypes(index)
REM Simply pass the Dialog box results with the .FileNew command.
WITHOBJECT PAINT
.FileNew VAL(width), VAL(height), typepaper, VAL(hres), VAL(vres), 0,0,0, -1, -1, -1, -1, VAL(red), VAL(green), VAL(blue), VAL(k)
END WITHOBJECT
STOP