Skip to content

Add function to create image from spritesheet rect #4

@ThePythonator

Description

@ThePythonator

This would avoid the need to repeatedly use the idiom of:

Image* image = create_image(graphics_ptr, SIZE);
image->set_render_target();
spritesheet->rect(Rect(IMAGE_LOCATION, SIZE), Vec(0,0), 1.0f);

And instead just do:

Image* image = spritesheet->image_from_rect(Rect(IMAGE_LOCATION, SIZE), 1.0f); // 1.0f is the scale

Metadata

Metadata

Assignees

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions