本文整理汇总了C++中Plotter::setColor方法的典型用法代码示例。如果您正苦于以下问题:C++ Plotter::setColor方法的具体用法?C++ Plotter::setColor怎么用?C++ Plotter::setColor使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Plotter
的用法示例。
在下文中一共展示了Plotter::setColor方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: draw
void paddleType::draw (Plotter& g)
{
if (oldLoc.getX() != loc.getX())
{
g.setColor(color);
for(int i = -width/2; i <= width/2; i ++)
{
g.plot(loc.getX() + i, loc.getY(), SQUARE);
}
}
oldLoc = loc;
}
示例2: backgroundIntro
//Function that prints names
bool backgroundIntro()
{
ifstream data;
POINT p;
Plotter screen;
/* HWND consoleWnd = GetConsoleWindow();*/
Sleep(100);
//PlaySound("C:\Users\Abril Resendiz\SkyDrive\Documents\ProjectFinal\ProjectFinal\357mag.wav", NULL, SND_ASYNC);
screen.setColor(yellow);
screen.move(30,23);
cout<<"Created By:";
Sleep(2000);
Sleep(100);
//PlaySound("C:\Users\Abril Resendiz\SkyDrive\Documents\ProjectFinal\ProjectFinal\357mag.wav", NULL, SND_ASYNC);
screen.setColor(green);
screen.move(30,25);
cout<<"Abril Resendiz";
Sleep(2000);
// PlaySound("C:\Users\Abril Resendiz\SkyDrive\Documents\ProjectFinal\ProjectFinal\357mag.wav", NULL, SND_ASYNC);
screen.setColor(yellow);
screen.move(30,27);
cout<<"Daniel Holt";
Sleep(2000);
// PlaySound("C:\\Users\\Alex\\Desktop\\CB\\ProjectFinal\\357mag.wav", NULL, SND_ASYNC);
screen.setColor(green);
screen.move(30,29);
cout<<"Maggie Schmeltekopf";
Sleep(2000);
// PlaySound("C:\\Users\\Alex\\Desktop\\CB\\ProjectFinal\\357mag.wav", NULL, SND_ASYNC);
screen.setColor(yellow);
screen.move(30,31);
cout<<"Victoria Robinson";
Sleep(2000);
// PlaySound("C:\Users\Abril Resendiz\SkyDrive\Documents\ProjectFinal\ProjectFinal\\357mag.wav", NULL, SND_ASYNC);
screen.setColor(green);
screen.move(30,33);
cout<<"Emily Peirce";
Sleep(2000);
screen.clear();
return exit;
}
示例3: Draw
void Ship::Draw(double x, double y)
{
// draw ship
Plotter p;
for (int r = 0; r < 5; r++)
{
for (int c = 0; c < 5; c++)
{
p.setColor(rocket[r][c]);
p.plot(x + c, y + r, SQUARE);
}
}
}
示例4: printPicture
//Picture that prints rocket
void printPicture(char ch)
{
Plotter screen;
int x=200;
int y=200;
if(ch=='@')
{
screen.setColor(darkgreen);
screen.plot(x,y,SQUARE);
x++;
y++;
}
else if(ch=='0')
{
screen.setColor(darkgreen);
screen.plot(x,y,SQUARE);
x++;
y++;
}
else if(ch=='8')
{
screen.setColor(green);
screen.plot(x,y,SQUARE);
x++;
y++;
}
else if(ch=='b')
{
screen.setColor(blue);
screen.plot(x,y,SQUARE);
x++;
y++;
}
else if(ch=='C')
{
screen.setColor(yellow);
screen.plot(x,y,SQUARE);
x++;
y++;
}
else if(ch=='G')
{
screen.setColor(darkyellow);
screen.plot(x,y,SQUARE);
x++;
y++;
}
else if(ch=='O')
{
screen.setColor(black);
screen.plot(x,y,SQUARE);
x++;
y++;
}
else if(ch=='#')
{
screen.setColor(red);
screen.plot(x,y,SQUARE);
x++;
y++;
}
else if (ch==';')
{
screen.setColor(red);
screen.plot(x,y,SQUARE);
x++;
y++;
}
else if(ch==',')
{
screen.setColor(white);
screen.plot(x,y,SQUARE);
x++;
y++;
}
else if(ch=='+')
{
screen.setColor(grey);
screen.plot(x,y,SQUARE);
x++;
y++;
}
else if(ch=='`')
{
screen.setColor(grey);
screen.plot(x,y,SQUARE);
x++;
y++;
}
//.........这里部分代码省略.........