forked from aseprite/aseprite
-
Notifications
You must be signed in to change notification settings - Fork 0
/
frame_range.h
40 lines (29 loc) · 839 Bytes
/
frame_range.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
// Aseprite Document Library
// Copyright (c) 2016 David Capello
//
// This file is released under the terms of the MIT license.
// Read LICENSE.txt for more information.
#ifndef DOC_FRAME_RANGE_H_INCLUDED
#define DOC_FRAME_RANGE_H_INCLUDED
#pragma once
#include "doc/frame.h"
namespace doc {
struct FrameRange {
frame_t fromFrame, toFrame;
FrameRange() : fromFrame(0), toFrame(0) {
}
explicit FrameRange(frame_t frame)
: fromFrame(frame), toFrame(frame) {
}
FrameRange(frame_t fromFrame, frame_t toFrame)
: fromFrame(fromFrame), toFrame(toFrame) {
}
bool operator==(const FrameRange& o) const {
return (fromFrame == o.fromFrame && toFrame == o.toFrame);
}
bool operator!=(const FrameRange& o) const {
return !operator==(o);
}
};
} // namespace doc
#endif