元編程參考文件

影像

10 個節點

本頁內容 10

新增常駐圖層

函數

A layer always drawn, under the attributes: a body, a base.

簽名
新增常駐圖層(影像: Layered Image, 檔案: 文字) -> Layered Image
LayeredImage AddAlwaysLayer(LayeredImage image, string file)

參數

名稱型別預設值說明
影像Layered Image—
檔案文字—

返回

分層影像Layered Image
所屬發行版
元編程(教育版)元編程(專業版)
可用的圖種類
資料流 函數 事件 例程 藍圖 狀態機狀態
宣告於
影像
所屬包
Novella 視覺小說

新增圖層屬性

函數

An attribute and its layer, in a group of which one shows at a time (or several, if the group allows).

簽名
新增圖層屬性 -> Layered Image
    影像: Layered Image
    組: 文字
    屬性: 文字
    檔案: 文字
    預設: 真否
    多選: 真否
    條件: Condition
LayeredImage AddLayerAttribute(
    LayeredImage image,
    string group,
    string attribute,
    string file,
    bool isDefault = false,
    bool multiple = false,
    Condition when)

參數

名稱型別預設值說明
影像Layered Image—The layered image.
組文字—The group, such as face; made on first use.
屬性文字—The attribute lines and shows name, such as smile.
檔案文字—The layer's image.
預設真否FalseShown when no attribute of the group is asked for.
多選真否FalseLet several attributes of the group show together.
條件Condition—Shown only while this holds; empty always.

返回

分層影像Layered Image
所屬發行版
元編程(教育版)元編程(專業版)
可用的圖種類
資料流 函數 事件 例程 藍圖 狀態機狀態
宣告於
影像
所屬包
Novella 視覺小說

純色影像

函數

A solid colour, filling the screen unless a size is given.

簽名
純色影像(顏色: 文字, 寬度: 整數, 高度: 整數) -> Image Source
ImageSource ColorImage(
    string color,
    int width = 0,
    int height = 0)

參數

名稱型別預設值說明
顏色文字—
寬度整數0
高度整數0

返回

源Image Source
所屬發行版
元編程(教育版)元編程(專業版)
可用的圖種類
資料流 函數 事件 例程 藍圖 狀態機狀態
宣告於
影像
所屬包
Novella 視覺小說

組合影像

函數

Images drawn one over another on a canvas: a base and up to two more at offsets.

簽名
組合影像 -> Image Source
    寬度: 整數
    高度: 整數
    第一個: Image Source
    第二個: Image Source
    第二個 X: 整數
    第二個 Y: 整數
    第三個: Image Source
    第三個 X: 整數
    第三個 Y: 整數
ImageSource CompositeImage(
    int width,
    int height,
    ImageSource first,
    ImageSource second,
    int secondX = 0,
    int secondY = 0,
    ImageSource third,
    int thirdX = 0,
    int thirdY = 0)

參數

名稱型別預設值說明
寬度整數—
高度整數—
第一個Image Source—
第二個Image Source—
第二個 X整數0
第二個 Y整數0
第三個Image Source—
第三個 X整數0
第三個 Y整數0

返回

源Image Source
所屬發行版
元編程(教育版)元編程(專業版)
可用的圖種類
資料流 函數 事件 例程 藍圖 狀態機狀態
宣告於
影像
所屬包
Novella 視覺小說

濾鏡影像

函數

An image with filters: zoom, flips, tint, desaturation, brightness, blur and opacity.

簽名
濾鏡影像 -> Image Source
    源: Image Source
    縮放: 數字
    水平翻轉: 真否
    垂直翻轉: 真否
    色調: 文字
    飽和度: 數字
    亮度: 數字
    模糊: 數字
    不透明度: 數字
ImageSource FilteredImage(
    ImageSource source,
    double zoom = 1,
    bool flipHorizontal = false,
    bool flipVertical = false,
    string tint = "",
    double saturation = 1,
    double brightness = 0,
    double blur = 0,
    double opacity = 1)

參數

名稱型別預設值說明
源Image Source—The image.
縮放數字1Its scale.
水平翻轉真否FalseMirror it left to right.
垂直翻轉真否FalseMirror it top to bottom.
色調文字—A colour to multiply it by, such as #ffd0d0; empty for none.
飽和度數字11 keeps colour, 0 is grayscale.
亮度數字0Added to each channel, -1 to 1.
模糊數字0A blur radius in pixels.
不透明度數字10 is invisible, 1 is solid.

返回

源Image Source
所屬發行版
元編程(教育版)元編程(專業版)
可用的圖種類
資料流 函數 事件 例程 藍圖 狀態機狀態
宣告於
影像
所屬包
Novella 視覺小說

邊框影像

函數

A picture stretched as a nine-patch by borders of its own, in its pixels: its corners kept, its edges and middle stretched to the box it fills. For a style's background, as Ren'Py's Frame.

簽名
邊框影像 -> Image Source
    源: Image Source
    左側: 數字
    頂部: 數字
    右側: 數字
    底部: 數字
ImageSource FrameImage(
    ImageSource source,
    double left,
    double top,
    double right = 0,
    double bottom = 0)

參數

名稱型別預設值說明
源Image Source—The picture, such as an Image File.
左側數字—The left border.
頂部數字—The top border.
右側數字0The right border; 0 takes the left.
底部數字0The bottom border; 0 takes the top.

返回

源Image Source
所屬發行版
元編程(教育版)元編程(專業版)
可用的圖種類
資料流 函數 事件 例程 藍圖 狀態機狀態
宣告於
影像
所屬包
Novella 視覺小說

影像檔案

函數

An image file among the game's files.

簽名
影像檔案(路徑: 文字) -> Image Source
ImageSource ImageFile(string path)

參數

名稱型別預設值說明
路徑文字—

返回

源Image Source
所屬發行版
元編程(教育版)元編程(專業版)
可用的圖種類
資料流 函數 事件 例程 藍圖 狀態機狀態
宣告於
影像
所屬包
Novella 視覺小說

影片影像

函數

A video looping as an image, such as rain behind a window.

簽名
影片影像(路徑: 文字, 迴圈: 真否) -> Image Source
ImageSource MovieImage(string path, bool loop = true)

參數

名稱型別預設值說明
路徑文字—
迴圈真否True

返回

源Image Source
所屬發行版
元編程(教育版)元編程(專業版)
可用的圖種類
資料流 函數 事件 例程 藍圖 狀態機狀態
宣告於
影像
所屬包
Novella 視覺小說

開始分層影像

函數

A layered image with no layers yet.

簽名
開始分層影像(標籤: 文字) -> Layered Image
LayeredImage StartLayeredImage(string tag)

參數

名稱型別預設值說明
標籤文字—The image tag shows and lines use, such as qinglan.

返回

分層影像Layered Image
所屬發行版
元編程(教育版)元編程(專業版)
可用的圖種類
資料流 函數 事件 例程 藍圖 狀態機狀態
宣告於
影像
所屬包
Novella 視覺小說

條件切換影像

函數

An image that is one picture while a condition holds and another otherwise, decided as it is drawn: a room by day and by night.

簽名
條件切換影像 -> Image Source
    條件: Condition
    則: Image Source
    否則: Image Source
ImageSource SwitchImage(
    Condition when,
    ImageSource then,
    ImageSource otherwise)

參數

名稱型別預設值說明
條件Condition—
則Image Source—
否則Image Source—

返回

源Image Source
所屬發行版
元編程(教育版)元編程(專業版)
可用的圖種類
資料流 函數 事件 例程 藍圖 狀態機狀態
宣告於
影像
所屬包
Novella 視覺小說