本文整理汇总了C++中Font::Construct方法的典型用法代码示例。如果您正苦于以下问题:C++ Font::Construct方法的具体用法?C++ Font::Construct怎么用?C++ Font::Construct使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Font
的用法示例。
在下文中一共展示了Font::Construct方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: showSplash
// display a simple splash screen until launcher is ready
void BadaGraphicsManager::showSplash() {
Canvas canvas;
canvas.Construct();
canvas.SetBackgroundColor(Color::COLOR_BLACK);
canvas.Clear();
int x = _videoMode.hardwareWidth / 3;
int y = _videoMode.hardwareHeight / 3;
Font *pFont = new Font();
pFont->Construct(FONT_STYLE_ITALIC | FONT_STYLE_BOLD, 55);
canvas.SetFont(*pFont);
canvas.SetForegroundColor(Color::COLOR_GREEN);
canvas.DrawText(Point(x, y), L"ScummVM");
delete pFont;
pFont = new Font();
pFont->Construct(FONT_STYLE_ITALIC | FONT_STYLE_BOLD, 35);
canvas.SetFont(*pFont);
canvas.SetForegroundColor(Color::COLOR_WHITE);
canvas.DrawText(Point(x + 70, y + 50), L"Loading ...");
delete pFont;
canvas.Show();
}
示例2: Construct
// FIXME: leaks
result RichTextPanel::Construct(const Dimension& dim, const String & text) {
result r = E_SUCCESS;
TextElement* textElement;
int width, height;
Color color = Color::GetColor(COLOR_ID_WHITE);
Font font;
Dimension textDim;
int textActualLen;
enrichedText = new EnrichedText();
r = enrichedText->Construct(dim);
TryCatch(r == E_SUCCESS, , "Failed Construct EnrichedText");
r = font.Construct(FONT_STYLE_PLAIN, TEXT_FONT_SIZE);
TryCatch(r == E_SUCCESS, , "Failed Construct Font");
textElement = new TextElement();
r = textElement->Construct(text);
TryCatch(r == E_SUCCESS, , "Failed TextElement");
r = textElement->SetTextColor(color);
TryCatch(r == E_SUCCESS, , "Failed SetTextColor");
r = textElement->SetFont(font);
TryCatch(r == E_SUCCESS, , "Failed SetFont");
r = enrichedText->Add(*textElement);
TryCatch(r == E_SUCCESS, , "Failed Add textElement");
height = enrichedText->GetTotalLineHeight();
r = enrichedText->GetTextExtent(0, text.GetLength(), textDim, textActualLen);
TryCatch(r == E_SUCCESS, , "Failed GetTextExtent");
width = dim.width < textDim.width ? dim.width : textDim.width;
r = Panel::Construct(Rectangle(0, 0, width, height));
TryCatch(r == E_SUCCESS, , "Failed Construct RichTextPanel parent");
TryCatch(GetLastResult() == E_SUCCESS, r = GetLastResult(), "Failed GetSize");
AppLog("Size received: %d x %d", width, height);
r = SetSize(width, height);
TryCatch(r == E_SUCCESS, , "Failed SetSize");
// SetBackgroundColor(color);
TryCatch(GetLastResult() == E_SUCCESS, r = GetLastResult(), "Failed SetBackgroundColor");
return r;
CATCH:
AppLogException("$${Function:Construct} is failed.", GetErrorMessage(r));
if (textElement)
delete textElement;
return r;
}
示例3: GetCanvasN
result Form2::OnDraw() {
Canvas *pCanvas = GetCanvasN();
Font *pFont = new Font;
result r = pFont->Construct("/Res/LiberationMono-Regular.ttf", FONT_STYLE_PLAIN, font);
pCanvas->SetFont(*pFont);
for (int i = 0; i < 3; i++)
pCanvas->DrawText(Point(10,600+i*font),legal[i]);
delete pCanvas;
delete pFont;
r = E_SUCCESS;
return r;
}
示例4: EnrichedText
void
CommentItem::Initialize(String name, String time, String comment, String bitmap_path)
{
Font font;
font.Construct(FONT_STYLE_PLAIN, 25);
AppResource* pAppResource = Application::GetInstance()->GetAppResource();
profile_image = pAppResource->GetBitmapN(L"tizen.png");
enriched_text1 = new EnrichedText();
enriched_text2 = new EnrichedText();
enriched_text3 = new EnrichedText();
enriched_text1->Construct(Dimension(400,30));
enriched_text1->SetTextWrapStyle(TEXT_WRAP_CHARACTER_WRAP);
enriched_text1->SetTextAbbreviationEnabled(true);
enriched_text2->Construct(Dimension(500,30));
enriched_text2->SetTextWrapStyle(TEXT_WRAP_CHARACTER_WRAP);
enriched_text2->SetTextAbbreviationEnabled(true);
enriched_text3->Construct(Dimension(150,30));
enriched_text3->SetTextWrapStyle(TEXT_WRAP_CHARACTER_WRAP);
enriched_text3->SetTextAbbreviationEnabled(true);
text_element_name = new TextElement();
text_element_time = new TextElement();
text_element_comment = new TextElement();
text_element_name->Construct(name);
text_element_time->Construct(time);
text_element_comment->Construct(comment);
text_element_name->SetFont(font);
text_element_time->SetFont(font);
text_element_time->SetTextColor(Color(200,200,200,255));
text_element_comment->SetFont(font);
enriched_text1->Add(*text_element_name);
enriched_text2->Add(*text_element_comment);
enriched_text3->Add(*text_element_time);
// this->RequestRedraw(true);
}
示例5: DrawButton
virtual result DrawButton(Canvas& canvas)
{
canvas.SetBackgroundColor(Color(0, 0, 0, 0));
canvas.Clear();
if (_state == BUTTON_STATE_NORMAL)
{
canvas.FillRoundRectangle(_pallete[BUTTON_COLOR_BG_NORMAL], Rectangle(0, 0 , _bounds.width, _bounds.height), Dimension(5, 5));
}
else
{
canvas.FillRoundRectangle(_pallete[BUTTON_COLOR_BG_PRESSED], Rectangle(0, 0 , _bounds.width, _bounds.height), Dimension(5, 5));
}
Font font;
font.Construct(FONT_STYLE_PLAIN, 18);
canvas.SetFont(font);
if (_text != L"")
{
EnrichedText enriched;
enriched.Construct(Dimension(_bounds.width, _bounds.height));
enriched.SetVerticalAlignment(TEXT_ALIGNMENT_MIDDLE);
enriched.SetHorizontalAlignment(TEXT_ALIGNMENT_CENTER);
TextElement element;
element.Construct(_text);
if (_state == BUTTON_STATE_NORMAL)
{
element.SetTextColor(_pallete[BUTTON_COLOR_FG_NORMAL]);
}
else
{
element.SetTextColor(_pallete[BUTTON_COLOR_FG_PRESSED]);
}
enriched.Add(element);
canvas.DrawText(Point(0, 0), enriched);
enriched.RemoveAll(false);
}
return E_SUCCESS;
}
示例6: AddItemTitle
void Dictionary::AddItemTitle(CustomItem *& pItem, String name, int itemWidth)
{
result r;
EnrichedText* pEnrichedText = new EnrichedText();
r = pEnrichedText->Construct(Dimension(itemWidth, 200));
TextElement * pTextElement = new TextElement();
r = pTextElement->Construct(name);
Font font;
font.Construct(FONT_STYLE_BOLD, 40);
pTextElement->SetFont(font);
pEnrichedText->Add(*pTextElement);
AddToDestructList(pTextElement);
AddToDestructList(pEnrichedText);
pItem->AddElement(Rectangle(10, 5, itemWidth - 10, 50), ID_FORMAT_STRING, *pEnrichedText);
}
示例7: GetWidth
Tizen::Ui::Controls::ListItemBase *
ShoppingListTab1::CreateItem(int index, int itemWidth)
{
String* pvalueText;
DbRow* pRow = theTableLists.GetRow(index);
if (pRow)
{
pRow->GetText(1, pvalueText);
}
String strName = *pvalueText;
int textWidth = GetWidth() - INDENT*2;
EnrichedText enrichedText;
enrichedText.Construct(FloatDimension(textWidth, 112));
enrichedText.SetVerticalAlignment(TEXT_ALIGNMENT_MIDDLE);
enrichedText.SetHorizontalAlignment(TEXT_ALIGNMENT_LEFT);
enrichedText.SetTextWrapStyle(TEXT_WRAP_WORD_WRAP);
Font pFont;
pFont.Construct(FONT_STYLE_BOLD, 44.0f);
TextElement* pTextElement = new (std::nothrow) TextElement();
pTextElement->Construct(strName + "\n");
pTextElement->SetFont(pFont);
enrichedText.Add(*pTextElement);
int textHeight = enrichedText.GetTotalLineHeight();
CustomItem* pItem = new CustomItem();
pItem->Construct(Dimension(GetWidth(), textHeight + INDENT*2), LIST_ANNEX_STYLE_NORMAL);
pItem->AddElement(Rectangle(INDENT, INDENT, textWidth, textHeight), 0, enrichedText);
AppAssert(pItemContext);
pItem->SetContextItem(pItemContext);
return pItem;
}
示例8: AddItemPreparing
void Dictionary::AddItemPreparing(CustomItem *& pItem, int itemWidth)
{
result r;
EnrichedText* pEnrichedText = new EnrichedText();
r = pEnrichedText->Construct(Dimension(itemWidth, 200));
pEnrichedText->SetVerticalAlignment(TEXT_ALIGNMENT_TOP);
pEnrichedText->SetHorizontalAlignment(TEXT_ALIGNMENT_RIGHT);
TextElement * pTextElement = new TextElement();
r = pTextElement->Construct(Utils::GetString("IDS_PREPARING"));
Font font;
font.Construct(FONT_STYLE_PLAIN, 25);
pTextElement->SetFont(font);
pEnrichedText->Add(*pTextElement);
AddToDestructList(pTextElement);
AddToDestructList(pEnrichedText);
int width, height;
pEnrichedText->GetSize(width, height);
pItem->AddElement(Rectangle(0, 5, itemWidth - 10, 30), ID_FORMAT_PREPARING, *pEnrichedText);
}
示例9: Construct
void
SkyCanvas::Initialize() {
starLayers = new Osp::Base::Collection::HashMapT<int, Osp::Graphics::Canvas*>();
starLayers -> Construct();
Font font;
font.Construct(FONT_STYLE_BOLD, 14);
Canvas* canvas1 = new Canvas();
canvas1 -> Construct(Rectangle(0, 0, 240, 400));
canvas1 -> SetBackgroundColor(COLOR_SKY);
canvas1 -> SetForegroundColor(COLOR_FORM_TEXT);
canvas1 -> FillRectangle(COLOR_SKY, Rectangle(0, 0, 240, 400));
canvas1 -> SetFont(font);
canvas1 -> DrawText(Point(120, 70), "N");
canvas1 -> DrawText(Point(120, 312), "S");
starLayers -> Add(1, canvas1);
Canvas* canvas2 = new Canvas();
canvas2 -> SetBackgroundColor(COLOR_SKY);
canvas2 -> Construct(Rectangle(0, 0, 480, 800));
canvas2 -> FillRectangle(COLOR_SKY, Rectangle(0, 0, 480, 800));
starLayers -> Add(2, canvas2);
Canvas* canvas4 = new Canvas();
canvas4 -> SetBackgroundColor(COLOR_SKY);
canvas4 -> Construct(Rectangle(0, 0, 960, 1600));
canvas4 -> FillRectangle(COLOR_SKY, Rectangle(0, 0, 960, 1600));
starLayers -> Add(4, canvas4);
// Fails to initialize on real device :(
// Canvas* canvas8 = new Canvas();
// canvas8 -> SetBackgroundColor(COLOR_SKY);
// canvas8 -> Construct(Rectangle(0, 0, 1920, 3200));
// canvas8 -> FillRectangle(COLOR_SKY, Rectangle(0, 0, 1920, 3200));
// starLayers -> Add(8, canvas8);
}
示例10: GetClientAreaBounds
result
EditingScrollPanel::OnDraw()
{
int i;
Rectangle *tmp_rect;
String *tmp_string;
Boolean *tmp_highlight;
Font font;
font.Construct(FONT_STYLE_PLAIN, 30);
AppResource* pAppResource = Application::GetInstance()->GetAppResource();
Rectangle tmp_client_rect = GetClientAreaBounds();
Canvas *pCanvas = this->GetCanvasN(Rectangle(0,0,this->GetWidth(), tmp_client_rect.height));
pCanvas->FillRectangle(Color(246,0,200,255), Rectangle(0,0,this->GetWidth(), tmp_client_rect.height));
pCanvas->FillRectangle(Color(246,255,0,255), Rectangle(0,200,this->GetWidth(), tmp_client_rect.height));
for(i=0; i<arr_text_element.GetCount(); i++)
{
tmp_rect = static_cast< Rectangle* > (arr_text_element_rect.GetAt(i));
tmp_string = static_cast< String *> (arr_text_element.GetAt(i));
tmp_highlight = static_cast <Boolean *> (arr_text_element_highlight.GetAt(i));
if(tmp_highlight->ToBool() == true)
{
pCanvas->DrawText(Point(tmp_rect->x, tmp_rect->y), *tmp_string, Color(0,255,0,150));
}
else
{
pCanvas->DrawText(Point(tmp_rect->x, tmp_rect->y), *tmp_string);
}
//pCanvas->DrawRectangle(*tmp_rect);
}
}
示例11: DrawElement
result DrawElement(const Osp::Graphics::Canvas& canvas, const Osp::Graphics::Rectangle& rect, CustomListItemStatus itemStatus)
{
result r = E_SUCCESS;
Canvas* pCanvas = const_cast<Canvas*>(&canvas);
Font textfont;
textfont.Construct(Osp::Graphics::FONT_STYLE_PLAIN, 28);
EnrichedText texteel;
texteel.Construct(Dimension(rect.width, rect.height));
texteel.SetHorizontalAlignment(Osp::Graphics::TEXT_ALIGNMENT_LEFT);
texteel.SetVerticalAlignment(Osp::Graphics::TEXT_ALIGNMENT_MIDDLE);
texteel.SetTextWrapStyle(TEXT_WRAP_CHARACTER_WRAP);
texteel.SetTextAbbreviationEnabled(true);
TextElement textelcol;
textelcol.Construct(text);
textelcol.SetTextColor(Color::COLOR_WHITE);
textelcol.SetFont(textfont);
texteel.Add(textelcol);
pCanvas->DrawText(Point(0,0), texteel);
return r;
}
示例12: AddItemExamples
void Dictionary::AddItemExamples(CustomItem *& pItem, int itemWidth, String examples)
{
result r;
EnrichedText* pEnrichedText = new EnrichedText();
r = pEnrichedText->Construct(Dimension(itemWidth, 200));
pEnrichedText->SetTextWrapStyle(TEXT_WRAP_WORD_WRAP);
pEnrichedText->SetVerticalAlignment(TEXT_ALIGNMENT_TOP);
pEnrichedText->SetHorizontalAlignment(TEXT_ALIGNMENT_LEFT);
TextElement * pTextElement = new TextElement();
r = pTextElement->Construct(examples);
Font font;
font.Construct(FONT_STYLE_PLAIN, 20);
pTextElement->SetFont(font);
pEnrichedText->Add(*pTextElement);
AddToDestructList(pTextElement);
AddToDestructList(pEnrichedText);
pItem->AddElement(Rectangle(10, 45, itemWidth - 80, ITEM_HEIGHT - 60), ID_FORMAT_EXAMPLES, *pEnrichedText);
}
示例13: drawText
bool drawText(const char * pszText, Dimension& dimensions, CCImage::ETextAlign alignment, const char * fontName = NULL, int fontSize = 0)
{
bool nRet = false;
do
{
CC_BREAK_IF(pszText == NULL || strlen(pszText) <= 0);
// text
Osp::Base::String strText(pszText);
// Set a font to the TextElement
Font font;
bool bUseDefaultFont = true;
if (fontName != NULL && strlen(fontName) > 0)
{
String strFonName(fontName);
if (strFonName.EndsWith(".ttf") || strFonName.EndsWith(".TTF"))
{
bUseDefaultFont = false;
const char* pFullFontPath = CCFileUtils::fullPathFromRelativePath(fontName);
font.Construct(pFullFontPath, FONT_STYLE_PLAIN, fontSize);
}
else
{
IList* pSystemFontList = Font::GetSystemFontListN();
if (pSystemFontList != NULL)
{
IEnumerator* pEnum = pSystemFontList->GetEnumeratorN();
Object* pObj = null;
while (pEnum->MoveNext() == E_SUCCESS)
{
pObj = pEnum->GetCurrent();
String* pStrName = static_cast<String*>(pObj);
if (pStrName->Equals(strFonName, false))
{
bUseDefaultFont = false;
font.Construct(*pStrName, FONT_STYLE_PLAIN, fontSize);
break;
}
}
delete pEnum;
pSystemFontList->RemoveAll(true);
delete pSystemFontList;
}
}
}
if (bUseDefaultFont)
{
font.Construct(FONT_STYLE_PLAIN, fontSize);
}
// calculate text size
if (dimensions.width <= 0)
{
Dimension dim;
font.GetTextExtent(strText, strText.GetLength(), dim);
dimensions.width = dim.width;
dimensions.height = dim.height;
}
CC_BREAK_IF(dimensions.width <= 0);
// Create an EnrichedText
m_pEnrichedText = new EnrichedText();
m_pEnrichedText->Construct(Dimension(dimensions.width, 10));
switch (alignment)
{
case CCImage::kAlignCenter:
m_pEnrichedText->SetHorizontalAlignment(TEXT_ALIGNMENT_CENTER);
m_pEnrichedText->SetVerticalAlignment(TEXT_ALIGNMENT_MIDDLE);
break;
case CCImage::kAlignTop:
m_pEnrichedText->SetHorizontalAlignment(TEXT_ALIGNMENT_CENTER);
m_pEnrichedText->SetVerticalAlignment(TEXT_ALIGNMENT_TOP);
break;
case CCImage::kAlignTopRight:
m_pEnrichedText->SetHorizontalAlignment(TEXT_ALIGNMENT_RIGHT);
m_pEnrichedText->SetVerticalAlignment(TEXT_ALIGNMENT_TOP);
break;
case CCImage::kAlignRight:
m_pEnrichedText->SetHorizontalAlignment(TEXT_ALIGNMENT_RIGHT);
m_pEnrichedText->SetVerticalAlignment(TEXT_ALIGNMENT_MIDDLE);
break;
case CCImage::kAlignBottomRight:
m_pEnrichedText->SetHorizontalAlignment(TEXT_ALIGNMENT_RIGHT);
m_pEnrichedText->SetVerticalAlignment(TEXT_ALIGNMENT_BOTTOM);
break;
case CCImage::kAlignBottom:
m_pEnrichedText->SetHorizontalAlignment(TEXT_ALIGNMENT_CENTER);
m_pEnrichedText->SetVerticalAlignment(TEXT_ALIGNMENT_BOTTOM);
break;
case CCImage::kAlignBottomLeft:
m_pEnrichedText->SetHorizontalAlignment(TEXT_ALIGNMENT_LEFT);
m_pEnrichedText->SetVerticalAlignment(TEXT_ALIGNMENT_BOTTOM);
break;
case CCImage::kAlignLeft:
m_pEnrichedText->SetHorizontalAlignment(TEXT_ALIGNMENT_LEFT);
m_pEnrichedText->SetVerticalAlignment(TEXT_ALIGNMENT_MIDDLE);
//.........这里部分代码省略.........
示例14: rect
result
EnrichedTextForm::OnInitializing(void)
{
BaseForm::OnInitializing();
result r = E_SUCCESS;
ButtonItem buttonLeftItem;
buttonLeftItem.Construct(BUTTON_ITEM_STYLE_TEXT, ID_EXIT);
buttonLeftItem.SetText(L"Back");
Rectangle rect(20, 200, 680, 360);
__pEnrichedText = new (std::nothrow) EnrichedText();
__pEnrichedText->Construct(Dimension(rect.width, rect.height));
__pEnrichedText->SetVerticalAlignment(TEXT_ALIGNMENT_TOP);
__pEnrichedText->SetHorizontalAlignment(TEXT_ALIGNMENT_LEFT);
__pEnrichedText->SetTextWrapStyle(TEXT_WRAP_NONE);
__pEnrichedText->SetTextAbbreviationEnabled(true);
Font* pFont = new (std::nothrow) Font();
pFont->Construct(FONT_STYLE_PLAIN, 35);
Font* pFontItalic = new (std::nothrow) Font();
pFontItalic->Construct(FONT_STYLE_ITALIC, 30);
Bitmap* pBitmap = App::GetInstance()->GetAppResource()->GetBitmapN(L"home_type3.png");
if (pBitmap)
{
pBitmap->Scale(Dimension(50, 50));
}
__pTextElement1 = new (std::nothrow) TextElement();
__pTextElement2 = new (std::nothrow) TextElement();
__pTextElement3 = new (std::nothrow) TextElement();
__pTextElement1->Construct(L"Tizen is a new open platform that enables richer user experience");
__pTextElement2->Construct(L"in applications on mobile devices.");
__pTextElement3->Construct(L"Tizen API Reference provides of all the powerful features. Tizen is a new open platform that enables richer user experience in applications on mobile devices");
__pTextElement1->SetTextColor(Color::GetColor(COLOR_ID_YELLOW));
__pTextElement2->SetTextColor(Color::GetColor(COLOR_ID_BLUE));
__pTextElement2->SetFont(*pFont);
__pTextElement3->SetTextColor(Color::GetColor(COLOR_ID_VIOLET));
__pTextElement3->SetFont(*pFontItalic);
__pEnrichedText->Add(*__pTextElement1);
__pEnrichedText->Add(*__pTextElement2);
__pEnrichedText->Add(*pBitmap);
__pEnrichedText->Add(*__pTextElement3);
__pEnrichedText->Refresh();
ListView* pListview = static_cast<ListView*>(GetControl("IDC_LISTVIEW", true));
if(pListview)
{
pListview->SetBounds(0, GetClientAreaBounds().height/2, GetClientAreaBounds().width, GetClientAreaBounds().height/2);
pListview->AddListViewItemEventListener(*this);
pListview->SetItemProvider(*this);
}
delete pFont;
delete pFontItalic;
delete pBitmap;
return r;
}
示例15: if
result
EditPanel::OnDraw()
{
int i;
Rectangle *tmp_rect;
Rectangle *tmp_rect2;
String *tmp_string;
Boolean *tmp_highlight;
Integer *tmp_int;
String *tmp_insert_str;
Integer *tmp_check;
Point *tmp_point;
Font font;
String *tmp_string2;
font.Construct(FONT_STYLE_PLAIN, 30);
AppResource* pAppResource = Application::GetInstance()->GetAppResource();
Canvas *pCanvas = this->GetCanvasN();
pCanvas->SetFont(font);
//pCanvas->DrawBitmap(Rectangle(0,0,this->GetWidth(), 855), *(pAppResource->GetBitmapN(L"EditPanel_background.png")));
//pCanvas->FillRectangle(Color(246,246,246,255), Rectangle(0,0,this->GetWidth(), tmp_client_rect.height-497));
//pCanvas->FillRectangle(Color(255,255,255,255), Rectangle(0,0,this->GetWidth()-60, tmp_client_rect.height));
for(i=0; i<arr_text_element.GetCount(); i++)
{
tmp_rect = static_cast< Rectangle* > (arr_text_element_rect.GetAt(i));
tmp_string = static_cast< String *> (arr_text_element.GetAt(i));
tmp_highlight = static_cast <Boolean *> (arr_text_element_highlight.GetAt(i));
tmp_int = static_cast< Integer *> (arr_text_element_editing_mark.GetAt(i));
tmp_check = static_cast< Integer *> (arr_insert_check.GetAt(i));
tmp_insert_str = static_cast< String *> (arr_text_insert.GetAt(i));
tmp_point = static_cast< Point *> (arr_binding_start_and_end.GetAt(i));
tmp_rect2 = static_cast< Rectangle* > (arr_memo_rect.GetAt(i));
tmp_string2 = static_cast< String *> (arr_memo.GetAt(i));
/* if(tmp_rect->height < 0 || tmp_rect->y > tmp_client_rect.height-497)
{
}
else*/
{
if(tmp_point->x < 1000)
{
pCanvas->FillRectangle(Color(255,248,209,255),Rectangle(*tmp_rect));
if(tmp_string2->GetLength() > 1)
{
pCanvas->FillRectangle(Color(240,200,209,255),Rectangle(*tmp_rect2));
}
}
if(tmp_highlight->ToBool() == true)
{
pCanvas->DrawText(Point(tmp_rect->x, tmp_rect->y), *tmp_string, Color(0,255,0,150));
}
else
{
pCanvas->DrawText(Point(tmp_rect->x, tmp_rect->y), *tmp_string);
}
if(tmp_int->value == 2)
{
pCanvas->FillRectangle(Color(0,187,237,255), Rectangle(tmp_rect->x, tmp_rect->y+15, tmp_rect->width, 5));
pCanvas->DrawText(Point(tmp_rect->x, tmp_rect->y + tmp_rect->height), *tmp_insert_str, Color(0,187,237,255));
}
if(tmp_int->value == 3)
{
pCanvas->FillRectangle(Color(0,187,237,200), Rectangle(tmp_rect->x, tmp_rect->y+15, tmp_rect->width, 5));
//pCanvas->DrawText(Point(tmp_rect->x, tmp_rect->y + tmp_rect->height), *tmp_insert_str, Color(0,255,0,0));
}
else if(tmp_int->value == 1)
{
pCanvas->FillRectangle(Color(0,187,237,255), Rectangle(tmp_rect->x, tmp_rect->y+15, tmp_rect->width, 5));
}
else if(tmp_check->value == 1)
{
pCanvas->DrawBitmap(Rectangle(tmp_rect->x-15, tmp_rect->y+15, 30 , 15), *pAppResource->GetBitmapN(L"attach_mark.png"));
pCanvas->DrawText(Point(tmp_rect->x-(tmp_insert_str->GetLength()/2), tmp_rect->y + tmp_rect->height), *tmp_insert_str, Color(0,255,0,255));
}
else if(tmp_check->value == 2)
{
pCanvas->DrawBitmap(Rectangle(tmp_rect->x-15, tmp_rect->y+15, 30 , 15), *pAppResource->GetBitmapN(L"attach_mark.png"));
pCanvas->DrawText(Point(tmp_rect->x-(tmp_insert_str->GetLength()/2), tmp_rect->y + tmp_rect->height), *tmp_insert_str, Color(0,255,0,255));
tmp_insert_str = static_cast< String *> (arr_text_insert.GetAt(i+1));
pCanvas->DrawBitmap(Rectangle(tmp_rect->x-15, tmp_rect->y+15, 30 , 15), *pAppResource->GetBitmapN(L"attach_mark.png"));
pCanvas->DrawText(Point(tmp_rect->x-(tmp_insert_str->GetLength()/2), tmp_rect->y + tmp_rect->height), *tmp_insert_str, Color(0,255,0,255));
}
else if(tmp_check->value == 3)
{
tmp_insert_str = static_cast< String *> (arr_text_insert.GetAt(i+1));
pCanvas->DrawBitmap(Rectangle(tmp_rect->x-15, tmp_rect->y+15, 30 , 15), *pAppResource->GetBitmapN(L"attach_mark.png"));
pCanvas->DrawText(Point(tmp_rect->x-(tmp_insert_str->GetLength()/2), tmp_rect->y + tmp_rect->height), *tmp_insert_str, Color(0,255,0,255));
//.........这里部分代码省略.........