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