1 #include "html.h"
2 #include "background.h"
3 
background(void)4 litehtml::background::background(void)
5 {
6 	m_attachment	= background_attachment_scroll;
7 	m_repeat		= background_repeat_repeat;
8 	m_clip			= background_box_border;
9 	m_origin		= background_box_padding;
10 	m_color.alpha	= 0;
11 	m_color.red		= 0;
12 	m_color.green	= 0;
13 	m_color.blue	= 0;
14 }
15 
background(const background & val)16 litehtml::background::background( const background& val )
17 {
18 	m_image			= val.m_image;
19 	m_baseurl		= val.m_baseurl;
20 	m_color			= val.m_color;
21 	m_attachment	= val.m_attachment;
22 	m_position		= val.m_position;
23 	m_repeat		= val.m_repeat;
24 	m_clip			= val.m_clip;
25 	m_origin		= val.m_origin;
26 }
27 
~background(void)28 litehtml::background::~background(void)
29 {
30 }
31 
operator =(const background & val)32 litehtml::background& litehtml::background::operator=( const background& val )
33 {
34 	m_image			= val.m_image;
35 	m_baseurl		= val.m_baseurl;
36 	m_color			= val.m_color;
37 	m_attachment	= val.m_attachment;
38 	m_position		= val.m_position;
39 	m_repeat		= val.m_repeat;
40 	m_clip			= val.m_clip;
41 	m_origin		= val.m_origin;
42 	return *this;
43 }
44 
45 
background_paint()46 litehtml::background_paint::background_paint() : color(0, 0, 0, 0)
47 {
48 	position_x		= 0;
49 	position_y		= 0;
50 	attachment		= background_attachment_scroll;
51 	repeat			= background_repeat_repeat;
52 	is_root			= false;
53 }
54 
background_paint(const background_paint & val)55 litehtml::background_paint::background_paint( const background_paint& val )
56 {
57 	image			= val.image;
58 	baseurl			= val.baseurl;
59 	attachment		= val.attachment;
60 	repeat			= val.repeat;
61 	color			= val.color;
62 	clip_box		= val.clip_box;
63 	origin_box		= val.origin_box;
64 	border_box		= val.border_box;
65 	border_radius	= val.border_radius;
66 	image_size		= val.image_size;
67 	position_x		= val.position_x;
68 	position_y		= val.position_y;
69 	is_root			= val.is_root;
70 }
71 
operator =(const background & val)72 void litehtml::background_paint::operator=( const background& val )
73 {
74 	attachment	= val.m_attachment;
75 	baseurl		= val.m_baseurl;
76 	image		= val.m_image;
77 	repeat		= val.m_repeat;
78 	color		= val.m_color;
79 }
80