元编程参考文档

图像

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 视觉小说