blob: 094814e0f4863373b12c89203d69abf76d0aa7b0 [file] [log] [blame]
Dees_Troy51a0e822012-09-05 15:24:24 -04001// fill.cpp - GUIFill object
2
3#include <stdarg.h>
4#include <stdio.h>
5#include <stdlib.h>
6#include <string.h>
7#include <fcntl.h>
8#include <sys/reboot.h>
9#include <sys/stat.h>
10#include <sys/time.h>
11#include <sys/mman.h>
12#include <sys/types.h>
13#include <sys/ioctl.h>
14#include <time.h>
15#include <unistd.h>
16#include <stdlib.h>
17
18#include <string>
19
20extern "C" {
21#include "../common.h"
22#include "../minuitwrp/minui.h"
23#include "../recovery_ui.h"
24}
25
26#include "rapidxml.hpp"
27#include "objects.hpp"
28
29GUIFill::GUIFill(xml_node<>* node)
30{
31 xml_attribute<>* attr;
32 xml_node<>* child;
33
34 if (!node)
35 return;
36
37 attr = node->first_attribute("color");
38 if (!attr)
39 return;
40
41 std::string color = attr->value();
42 ConvertStrToColor(color, &mColor);
43
44 // Load the placement
45 LoadPlacement(node->first_node("placement"), &mRenderX, &mRenderY, &mRenderW, &mRenderH);
46
47 return;
48}
49
50int GUIFill::Render(void)
51{
52 gr_color(mColor.red, mColor.green, mColor.blue, mColor.alpha);
53 gr_fill(mRenderX, mRenderY, mRenderW, mRenderH);
54 return 0;
55}
56