return script_return_obj_null ();
}
+static script_return_t image_tile (script_state_t *state,
+ void *user_data)
+{
+ script_lib_image_data_t *data = user_data;
+ ply_pixel_buffer_t *image = script_obj_as_native_of_class (state->this, data->class);
+ int width = script_obj_hash_get_number (state->local, "width");
+ int height = script_obj_hash_get_number (state->local, "height");
+
+ if (image) {
+ ply_pixel_buffer_t *new_image = ply_pixel_buffer_tile (image, width, height);
+ return script_return_obj (script_obj_new_native (new_image, data->class));
+ }
+ return script_return_obj_null ();
+}
+
static script_return_t image_text (script_state_t *state,
void *user_data)
{
"width",
"height",
NULL);
+ script_add_native_function (image_hash,
+ "_Tile",
+ image_tile,
+ data,
+ "width",
+ "height",
+ NULL);
script_add_native_function (image_hash,
"GetWidth",
image_get_width,
return Image.Adopt (this._Scale(width, height));
};
+Image.Tile = fun (width, height)
+{
+ return Image.Adopt (this._Tile(width, height));
+};
+
Image.Text = fun (text, red, green, blue, alpha, font, align)
{
return Image.Adopt (Image._Text (text, red, green, blue, alpha, font, align));