draw_surface_part_ext


语法:

draw_surface_part_ext(id, left, top, w, h, x, y, xscale, yscale, colour, alpha);

参数 描述
id The unique ID value of the surface to draw.
left The left position in the surface of the part to be drawn.
top The top position in the surface of the part to be drawn.
w The width of the part to be draw, from left.
h The height of the part to be drawn, from top.
x The x position of where to draw the surface.
y The y position of where to draw the surface.
x轴缩放 The horizontal scaling the part should be drawn with.
y轴缩放 The vertical scaling the part should be drawn with.
colour The colour blending the part should be drawn with.
alpha The alpha transparency the part should be drawn with.


返回:

N/A(无返回值)


描述

This function will draw a part of the chosen surface at the given position following the same rules as per draw_surface_part, only now you can scale the part, blend a colour with it, or change its alpha when drawing it to the screen (the same as when drawing a surface with draw_surface_ext).

注:由于储存在显存里,表面层运行时存在随时停止并退出的可能性。在直接引用它们之前,你需要 一直使用 surface_exists检测表面层是否退出。更多信息请查阅 表面层


例如:

draw_surface_part_ext(surf, 8, 8, 32, 32, x, y, 2, 0.5, c_black, 1);

This will draw a 32x32 pixel area from 8x8 pixels into the surface indexed in the variable "surf". It will be stretched to double its usual width but half its usual height. It will be opaque and it will be blended with black (turning it into a silhouette).