本文整理汇总了C++中JXColormap::GetDarkGreenColor方法的典型用法代码示例。如果您正苦于以下问题:C++ JXColormap::GetDarkGreenColor方法的具体用法?C++ JXColormap::GetDarkGreenColor怎么用?C++ JXColormap::GetDarkGreenColor使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类JXColormap
的用法示例。
在下文中一共展示了JXColormap::GetDarkGreenColor方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: GetColormap
void
JXStyleMenu::JXStyleMenuX()
{
itsChooseColorDialog = NULL;
if (JXMenu::GetDefaultStyle() == kMacintoshStyle)
{
SetMenuItems(kMacMenuStr);
}
else
{
SetShortcuts(kStyleMenuShortcutStr);
SetMenuItems(kWinMenuStr);
}
JXColormap* colormap = GetColormap();
const JColorIndex blackColor = colormap->GetBlackColor();
SetItemFontStyle(
kBoldStyleCmd, JFontStyle(kJTrue, kJFalse, 0, kJFalse, blackColor));
SetItemFontStyle(
kItalicStyleCmd, JFontStyle(kJFalse, kJTrue, 0, kJFalse, blackColor));
SetItemFontStyle(
kUnderlineStyleCmd, JFontStyle(kJFalse, kJFalse, 1, kJFalse, blackColor));
SetItemFontStyle(
kDblUnderlineStyleCmd, JFontStyle(kJFalse, kJFalse, 2, kJFalse, blackColor));
SetItemFontStyle(
kStrikeStyleCmd, JFontStyle(kJFalse, kJFalse, 0, kJTrue, blackColor));
assert( kColorCount == 11 );
itsColorList[ 0] = blackColor;
itsColorList[ 1] = colormap->GetGray60Color();
itsColorList[ 2] = colormap->GetBrownColor();
itsColorList[ 3] = colormap->GetOrangeColor();
itsColorList[ 4] = colormap->GetRedColor();
itsColorList[ 5] = colormap->GetDarkRedColor();
itsColorList[ 6] = colormap->GetDarkGreenColor();
itsColorList[ 7] = colormap->GetBlueColor();
itsColorList[ 8] = colormap->GetLightBlueColor();
itsColorList[ 9] = colormap->GetPinkColor();
itsColorList[10] = colormap->GetDefaultBackColor();
ListenTo(this);
}
示例2: ellipseRect
//.........这里部分代码省略.........
p.SetLineWidth(2);
for (JCoordinate y=70; y<150; y+=2)
{
p.SetPenColor(colormap->GetGrayColor(y%4 ? 40 : 60));
p.Line(290,y, 390,y);
}
p.SetLineWidth(1);
p.SetLineWidth(2);
for (JCoordinate x=290; x<390; x+=2)
{
p.SetPenColor(colormap->GetGrayColor(x%4 ? 40 : 60));
p.Line(x,70, x,150);
}
p.SetLineWidth(1);
*/
p.String( 0.0, r, "Hello", JPainter::kHAlignCenter, JPainter::kVAlignCenter);
p.String( 90.0, r, "Hello", JPainter::kHAlignCenter, JPainter::kVAlignCenter);
p.String(180.0, r, "Hello", JPainter::kHAlignCenter, JPainter::kVAlignCenter);
p.String(270.0, r, "Hello", JPainter::kHAlignCenter, JPainter::kVAlignCenter);
p.String( 0.0, r, "Hello", JPainter::kHAlignRight, JPainter::kVAlignBottom);
p.String( 90.0, r, "Hello", JPainter::kHAlignRight, JPainter::kVAlignBottom);
p.String(180.0, r, "Hello", JPainter::kHAlignRight, JPainter::kVAlignBottom);
p.String(270.0, r, "Hello", JPainter::kHAlignRight, JPainter::kVAlignBottom);
p.SetPenColor(colormap->GetBlueColor());
p.Rect(200, 10, 100, 50);
p.String(200, 10, "Hello", 100, JPainter::kHAlignLeft);
p.String(200, 10+p.GetLineHeight(), "Hello", 100, JPainter::kHAlignCenter);
p.String(200, 10+2*p.GetLineHeight(), "Hello", 100, JPainter::kHAlignRight);
p.SetPenColor(colormap->GetDarkGreenColor());
p.SetFilling(kJTrue);
p.Rect(290, 160, 100, 80);
p.SetFilling(kJFalse);
/*
for (JCoordinate y=160; y<240; y++)
{
p.SetPenColor(colormap->GetGrayColor(y-140));
p.Line(290,y, 390,y);
}
for (JCoordinate x=290; x<390; x++)
{
p.SetPenColor(colormap->GetGrayColor(x-290));
p.Line(x,160, x,240);
}
p.SetLineWidth(2);
for (JCoordinate y=160; y<240; y+=2)
{
p.SetPenColor(colormap->GetGrayColor(y%4 ? 40 : 60));
p.Line(290,y, 390,y);
}
p.SetLineWidth(1);
p.SetLineWidth(2);
for (JCoordinate x=290; x<390; x+=2)
{
p.SetPenColor(colormap->GetGrayColor(x%4 ? 40 : 60));
p.Line(x,160, x,240);
}
p.SetLineWidth(1);
*/