Loading...
Searching...
No Matches
ImageRects.h
Go to the documentation of this file.
1//
2// Created by Dave Smith on 4/9/25.
3//
4
5#ifndef IMAGERECTS_H
6#define IMAGERECTS_H
7
9#include <vector>
10
11namespace ml
12{
37 {
38 private:
39 std::vector<sf::IntRect> _intRects;
40 int _rows;
41 int _cols;
42
43 public:
50 ImageRects(int cols);
51
59 const sf::IntRect& getIntRect(int row, int col);
60
69 void push(const sf::IntRect& int_rect);
70 };
71
72} // namespace ml
73
74#endif // IMAGERECTS_H
const sf::IntRect & getIntRect(int row, int col)
Return the rect for a given row and column.
ImageRects(int cols)
Construct an empty ImageRects with a known column count.
void push(const sf::IntRect &int_rect)
Append a rect to the collection.
Definition Component.h:18
Rect< int > IntRect