-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathActionListDot.cpp
More file actions
30 lines (27 loc) · 969 Bytes
/
ActionListDot.cpp
File metadata and controls
30 lines (27 loc) · 969 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
#include "ActionListDot.h"
#include "Font.h"
ActionListDot::ActionListDot()
{
}
ActionListDot::~ActionListDot()
{
}
void ActionListDot::paint(PageContentContext* ctx)
{
if (dotType == 1) {
AbstractContentContext::GraphicOptions opt(AbstractContentContext::eStroke, AbstractContentContext::eRGB, color);
ctx->DrawCircle(x, y, size, opt);
}
else if(dotType == 3){
AbstractContentContext::GraphicOptions opt(AbstractContentContext::eFill, AbstractContentContext::eRGB, color);
ctx->DrawRectangle(x-size, y-size, size*2, size*2,opt);
}
else if (dotType == 6) {
AbstractContentContext::TextOptions textOptions(font->font, font->size, AbstractContentContext::eRGB, color);
ctx->WriteText(x - size, y - size+font->size, std::to_string(index), textOptions);
}
else {
AbstractContentContext::GraphicOptions opt(AbstractContentContext::eFill, AbstractContentContext::eRGB, color);
ctx->DrawCircle(x, y, size, opt);
}
}