malena
Why malena
Quick start
Tutorials
API docs
GitHub
GitHub
Tutorials
Loading...
Searching...
No Matches
Utilities
TextureSlicer.h
Go to the documentation of this file.
1
//
2
// Created by Dave Smith on 4/9/25.
3
//
4
5
#ifndef TEXTURESLICER_H
6
#define TEXTURESLICER_H
7
8
#include <
SFML/Graphics.hpp
>
9
#include <
Malena/Utilities/ImageRects.h
>
10
11
namespace
ml
12
{
38
class
TextureSlicer
39
{
40
public
:
54
static
ml::ImageRects
getImageRects
(
const
sf::Texture
& texture,
int
rows,
int
cols);
55
};
56
57
}
// namespace ml
58
59
#endif
// TEXTURESLICER_H
Graphics.hpp
ImageRects.h
ml::ImageRects
A grid-indexed collection of sf::IntRect regions.
Definition
ImageRects.h:37
ml::TextureSlicer
Divides a texture into a uniform grid of sub-rectangles.
Definition
TextureSlicer.h:39
ml::TextureSlicer::getImageRects
static ml::ImageRects getImageRects(const sf::Texture &texture, int rows, int cols)
Slice a texture into a rows × cols grid of equal rectangles.
sf::Texture
ml
Definition
Component.h:18
Generated by
1.16.1