Docstoc

投影片1

Document Sample
投影片1 Powered By Docstoc
					多媒體安全 DialogDemo
     指導老師:黃文楨
    學生:李婕 9724803
        程式碼
    requires("1.34m");
     title = "Untitled";
     width=512; height=512;
     Dialog.create("New Image");
     Dialog.addString("Title:", title);
    Dialog.addChoice("Type:", newArray("8-bit",
    "16-bit", "32-bit", "RGB"));
       程式碼
   Dialog.addNumber("Width:", 512);
   Dialog.addNumber("Height:", 512);
   Dialog.addCheckbox("Ramp", true);
   Dialog.show();
   title = Dialog.getString();
   width = Dialog.getNumber();
   height = Dialog.getNumber();;
   type = Dialog.getChoice();
       程式碼
 ramp = Dialog.getCheckbox();
 if (ramp==true) type = type + " ramp";
 newImage(title, type, width, height, 1);

  – newImage(title, type, width, height, depth)
    Opens a new image or stack using the name title. The
    string type should contain "8-bit", "16-bit", "32-bit" or
    "RGB". In addition, it can contain "white", "black" or
    "ramp" (the default is "white").
執行結果
執行結果

				
DOCUMENT INFO
Shared By:
Categories:
Tags:
Stats:
views:0
posted:5/12/2013
language:Unknown
pages:6