Loading...
Searching...
No Matches
TextureSlicer.h
Go to the documentation of this file.
1// Copyright (c) 2025 Dave R. Smith. All rights reserved.
2// Malena Framework — Proprietary Software. See LICENSE for terms.
3
4//
5// Created by Dave Smith on 4/9/25.
6//
7
8#ifndef MALENA_TEXTURESLICER_H
9#define MALENA_TEXTURESLICER_H
10
12#include <SFML/Graphics.hpp>
14
15namespace ml
16{
43 {
44 public:
58 static ml::ImageRects getImageRects(const sf::Texture& texture, int rows, int cols);
60 };
61
62} // namespace ml
63
64#endif // MALENA_TEXTURESLICER_H
A grid-indexed collection of sf::IntRect regions.
Definition ImageRects.h:41
Divides a texture into a uniform grid of sub-rectangles.
static ml::ImageRects getImageRects(const sf::Texture &texture, sf::Vector2i coord)
static ml::ImageRects getImageRects(const sf::Texture &texture, int rows, int cols)
Slice a texture into a rows × cols grid of equal rectangles.
#define MALENA_API
Definition Component.h:22
Vector2< int > Vector2i