Skip to contents

Draws a texture (or part of it) that stretches or shrinks nicely.

Usage

draw_texture_n_patch(texture, n_patch_info, dest, origin, rotation, tint)

Arguments

texture

A texture.

n_patch_info

An n_patch_info.

dest

A rectangle.

origin

A numeric vector of length 2.

rotation

A number.

tint

A color.

Note

This function has been auto-generated from the following Raylib function definition:

void DrawTextureNPatch(Texture2D texture, NPatchInfo nPatchInfo, Rectangle dest, Vector2 origin, float rotation, Color tint);

See also

Other texture functions: begin_texture_mode(), draw_texture(), draw_texture_ex(), draw_texture_pro(), draw_texture_rec(), draw_texture_v(), end_texture_mode(), get_shapes_texture(), is_texture_valid(), load_image_from_texture(), load_render_texture(), load_texture(), load_texture_from_image(), set_shader_value_texture(), set_shapes_texture(), set_texture_filter(), set_texture_wrap(), texture(), unload_render_texture(), unload_texture()

Other draw functions: draw_billboard(), draw_billboard_pro(), draw_billboard_rec(), draw_bounding_box(), draw_capsule(), draw_capsule_wires(), draw_circle(), draw_circle_3d(), draw_circle_gradient(), draw_circle_lines(), draw_circle_lines_v(), draw_circle_sector(), draw_circle_sector_lines(), draw_circle_v(), draw_cube(), draw_cube_v(), draw_cube_wires(), draw_cube_wires_v(), draw_cylinder(), draw_cylinder_ex(), draw_cylinder_wires(), draw_cylinder_wires_ex(), draw_ellipse(), draw_ellipse_lines(), draw_ellipse_lines_v(), draw_ellipse_v(), draw_fps(), draw_grid(), draw_line(), draw_line_3d(), draw_line_bezier(), draw_line_dashed(), draw_line_ex(), draw_line_strip(), draw_line_v(), draw_mesh(), draw_mesh_instanced(), draw_model(), draw_model_ex(), draw_model_wires(), draw_model_wires_ex(), draw_pixel(), draw_pixel_v(), draw_plane(), draw_point_3d(), draw_poly(), draw_poly_lines(), draw_poly_lines_ex(), draw_ray(), draw_rectangle(), draw_rectangle_gradient_ex(), draw_rectangle_gradient_h(), draw_rectangle_gradient_v(), draw_rectangle_lines(), draw_rectangle_lines_ex(), draw_rectangle_pro(), draw_rectangle_rec(), draw_rectangle_rounded(), draw_rectangle_rounded_lines(), draw_rectangle_rounded_lines_ex(), draw_rectangle_v(), draw_ring(), draw_ring_lines(), draw_sphere(), draw_sphere_ex(), draw_sphere_wires(), draw_spline_basis(), draw_spline_bezier_cubic(), draw_spline_bezier_quadratic(), draw_spline_catmull_rom(), draw_spline_linear(), draw_spline_segment_basis(), draw_spline_segment_bezier_cubic(), draw_spline_segment_bezier_quadratic(), draw_spline_segment_catmull_rom(), draw_spline_segment_linear(), draw_text(), draw_text_codepoint(), draw_text_ex(), draw_text_pro(), draw_texture(), draw_texture_ex(), draw_texture_pro(), draw_texture_rec(), draw_texture_v(), draw_triangle(), draw_triangle_3d(), draw_triangle_fan(), draw_triangle_lines(), draw_triangle_strip(), draw_triangle_strip_3d()

Examples

if (FALSE) {
draw_texture_n_patch(load_texture("file.png"), n_patch_info(rectangle(0, 0, 64, 64), 16L, 16L, 16L, 16L, 0L), rectangle(10, 10, 200, 100), c(100, 100), 0.0, "red")
}