draw_surface_general


语法:

draw_surface_general(id, left, top, w, h, x, y, xscale, yscale, rot, c1, c2, c3, c4, 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 draw, 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 to draw the surface with.
y轴缩放 The vertical scaling to draw the surface with.
rot The rotation or angle to draw the surface with.
c1 The colour of the top left corner of the surface.
c2 The colour of the top right corner of the surface.
c3 The colour of the bottom right corner of the surface.
c4 The colour of the bottom left corner of the surface.
alpha The alpha transparency to draw the surface with..


返回:

N/A(无返回值)


描述

This function combines the function draw_surface_ext with the function draw_surface_part, adding in some additional blending options so that each corner of the final surface part can be blended with an individual colour.

NOTE: Gradient blending is not available for the HTML5 target unless WebGL is enabled.
注:由于储存在显存里,表面层运行时存在随时停止并退出的可能性。在直接引用它们之前,你需要 一直使用 surface_exists检测表面层是否退出。更多信息请查阅 表面层


例如:

draw_surface_general(surf, 8, 8, 32, 32, x, y, 2, 0.5, 180, c_white, c_white, c_black, c_black, 1);

This will draw a 32x32 pixel area from 8x8 pixels into the surface. It will be stretched to double its usual width but half its usual height. It will be opaque, and upside down. The top area of the surface will be blended white and hence normal, but the bottom area will be black, meaning the surface will go from normal to silhouette downwards in a smooth gradient.