forked from aseprite/aseprite
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathget_sprite_pixel.h
35 lines (27 loc) · 906 Bytes
/
get_sprite_pixel.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
// Aseprite Render Library
// Copyright (c) 2019 Igara Studio S.A.
// Copyright (c) 2001-2016 David Capello
//
// This file is released under the terms of the MIT license.
// Read LICENSE.txt for more information.
#ifndef RENDER_GET_SPRITE_PIXEL_H_INCLUDED
#define RENDER_GET_SPRITE_PIXEL_H_INCLUDED
#pragma once
#include "doc/frame.h"
namespace doc {
class Sprite;
}
namespace render {
using namespace doc;
class Projection;
// Gets a pixel from the sprite in the specified position. If in the
// specified coordinates there're background this routine will
// return the 0 color (the mask-color).
color_t get_sprite_pixel(const Sprite* sprite,
const double x,
const double y,
const frame_t frame,
const Projection& proj,
const bool newBlend);
} // namespace render
#endif