synfig-core
1.0.3
Main Page
Related Pages
Namespaces
Classes
Files
File List
File Members
src
synfig
layers
layer_bitmap.h
Go to the documentation of this file.
1
/* === S Y N F I G ========================================================= */
22
/* ========================================================================= */
23
24
/* === S T A R T =========================================================== */
25
26
#ifndef __SYNFIG_LAYER_BITMAP_H
27
#define __SYNFIG_LAYER_BITMAP_H
28
29
/* === H E A D E R S ======================================================= */
30
31
#include "
layer_composite.h
"
32
#include <
synfig/surface.h
>
33
#include <
synfig/target.h
>
// for RenderMethod
34
35
/* === M A C R O S ========================================================= */
36
37
/* === T Y P E D E F S ===================================================== */
38
39
/* === C L A S S E S & S T R U C T S ======================================= */
40
41
namespace
synfig {
42
46
class
Layer_Bitmap
:
public
Layer_Composite
,
public
Layer_NoDeform
47
{
48
const
Color
& filter(
Color
& c)
const
;
49
const
CairoColor
& filter(
CairoColor
& c)
const
;
50
RenderMethod
method;
51
public
:
52
typedef
etl::handle<Layer_Bitmap>
Handle
;
53
54
ValueBase
param_tl
;
55
ValueBase
param_br
;
56
ValueBase
param_c
;
57
ValueBase
param_gamma_adjust
;
58
59
mutable
synfig::Mutex
mutex
;
60
mutable
Surface
surface
;
61
mutable
CairoSurface
csurface
;
62
mutable
bool
trimmed
;
63
mutable
unsigned
int
width
,
height
,
top
,
left
;
64
65
66
Layer_Bitmap
();
67
~Layer_Bitmap
() {
68
if
(
csurface
.
is_mapped
())
csurface
.
unmap_cairo_image
(); }
69
70
virtual
bool
set_param
(
const
String
& param,
const
ValueBase
& value);
71
72
virtual
ValueBase
get_param
(
const
String
& param)
const
;
73
74
virtual
Color
get_color
(
Context
context,
const
Point
&pos)
const
;
75
virtual
CairoColor
get_cairocolor
(
Context
context,
const
Point
&pos)
const
;
76
77
virtual
Vocab
get_param_vocab
()
const
;
78
79
virtual
Rect
get_bounding_rect
()
const
;
80
81
virtual
bool
accelerated_render
(
Context
context,
Surface
*
surface
,
int
quality,
const
RendDesc
&renddesc,
ProgressCallback
*cb)
const
;
82
virtual
bool
accelerated_cairorender
(
Context
context, cairo_t *cr,
int
quality,
const
RendDesc
&renddesc,
ProgressCallback
*cb)
const
;
83
84
virtual
synfig::Layer::Handle
hit_check
(
synfig::Context
context,
const
synfig::Point
&point)
const
;
85
86
virtual
void
set_render_method
(
Context
context,
RenderMethod
x);
87
void
set_method
(
RenderMethod
x) { method=x;}
88
RenderMethod
get_method
()
const
{
return
method;}
89
90
void
set_cairo_surface
(cairo_surface_t* cs);
91
92
};
// END of class Layer_Bitmap
93
94
};
// END of namespace synfig
95
96
/* === E N D =============================================================== */
97
98
#endif
Generated on Mon Nov 16 2015 15:33:41 for synfig-core by
1.8.1.2