forked from aseprite/aseprite
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcel_data.cpp
More file actions
43 lines (34 loc) · 799 Bytes
/
cel_data.cpp
File metadata and controls
43 lines (34 loc) · 799 Bytes
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
41
42
43
// Aseprite Document Library
// Copyright (c) 2001-2015 David Capello
//
// This file is released under the terms of the MIT license.
// Read LICENSE.txt for more information.
#ifdef HAVE_CONFIG_H
#include "config.h"
#endif
#include "doc/cel_data.h"
#include "gfx/rect.h"
#include "doc/image.h"
#include "doc/layer.h"
#include "doc/sprite.h"
namespace doc {
CelData::CelData(const ImageRef& image)
: WithUserData(ObjectType::CelData)
, m_image(image)
, m_position(0, 0)
, m_opacity(255)
{
}
CelData::CelData(const CelData& celData)
: WithUserData(ObjectType::CelData)
, m_image(celData.m_image)
, m_position(celData.m_position)
, m_opacity(celData.m_opacity)
{
}
void CelData::setImage(const ImageRef& image)
{
ASSERT(image.get());
m_image = image;
}
} // namespace doc