当前位置: 首页>>代码示例>>C++>>正文


C++ drawFrame函数代码示例

本文整理汇总了C++中drawFrame函数的典型用法代码示例。如果您正苦于以下问题:C++ drawFrame函数的具体用法?C++ drawFrame怎么用?C++ drawFrame使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了drawFrame函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: killTimers

void 
AreaSelect::disableSelection()
{
  // stop all the timer 
  killTimers();
  if (showedSF) {
    drawFrame(); // to erase the frame
  }
}
开发者ID:kthxbyte,项目名称:KDE1-Linaro,代码行数:9,代码来源:areaselect.cpp

示例2: glClear

void GLSideCameraView::paintGL()
{
    // Clean the color of the screen.
    glClear( GL_COLOR_BUFFER_BIT );
    glPushMatrix();
    drawFrame();
    glScalef( 0.5, 0.5, 0.0 );
    glPopMatrix();
 }
开发者ID:BackupTheBerlios,项目名称:ktoon-svn,代码行数:9,代码来源:glsidecameraview.cpp

示例3: destroyResultsDialog

// TODO: Track and display TPS in GUI.
void GuiManager::runCurrentMatch() {
  interrupted_ = false;
  restarting_ = false;
  runnerConsole_->Hide();
  destroyResultsDialog();
  sf::RenderWindow *window = window_;
  try {
    while (window->isOpen() && !interrupted_ && !restarting_ && !quitting_) {
      while (!paused_ && !restarting_ && !engine_->isGameOver()
          && engine_->getGameTime() < nextDrawTime_) {
        engine_->processTick();
      }
      
      while (!interrupted_ && !restarting_ && !quitting_
             && (nextDrawTime_ <= engine_->getGameTime()
                 || engine_->isGameOver())) {
        processMainWindowEvents(window, gfxManager_, viewWidth_, viewHeight_);
        clearTeamErroredForActiveConsoles(engine_);
        drawFrame(window);
        if (!paused_ && !engine_->isGameOver()) {
          nextDrawTime_ += tpsFactor_;
        }
        if (engine_->isGameOver() && !showedResults_) {
          ReplayBuilder *replayBuilder = engine_->getReplayBuilder();
          Team **teams = engine_->getRankedTeams();
          replayBuilder->setResults(teams, engine_->getNumTeams());
          delete teams;
          showResults(replayBuilder);
          showedResults_ = true;
        }
      }
    }
  } catch (EngineException *e) {
    errorConsole_->println(e->what());
    wxMessageDialog errorMessage(NULL, e->what(),
        "BerryBots encountered an error", wxOK | wxICON_EXCLAMATION);
    errorMessage.ShowModal();
    newMatchDialog_->Show();
    delete e;
    return;
  }

  if (!window->isOpen()) {
    listener_->onAllWindowsClosed();
  }

  // TODO: Display CPU usage in GUI

  if (!interrupted_) {
    gfxManager_->destroyBbGfx();
    delete engine_;
    engine_ = 0;
    delete gfxHandler_;
    gfxHandler_ = 0;
  }
}
开发者ID:Voidious,项目名称:BerryBots,代码行数:57,代码来源:guimanager.cpp

示例4: setFont

reg_t GfxText32::createFontBitmap(const CelInfo32 &celInfo, const Common::Rect &rect, const Common::String &text, const int16 foreColor, const int16 backColor, const GuiResourceId fontId, const int16 skipColor, const int16 borderColor, const bool dimmed, const bool gc) {
	_borderColor = borderColor;
	_text = text;
	_textRect = rect;
	_foreColor = foreColor;
	_dimmed = dimmed;

	setFont(fontId);

	int16 scriptWidth = g_sci->_gfxFrameout->getCurrentBuffer().scriptWidth;
	int16 scriptHeight = g_sci->_gfxFrameout->getCurrentBuffer().scriptHeight;

	mulinc(_textRect, Ratio(_xResolution, scriptWidth), Ratio(_yResolution, scriptHeight));

	CelObjView view(celInfo.resourceId, celInfo.loopNo, celInfo.celNo);
	_skipColor = view._skipColor;
	_width = view._width * _xResolution / view._xResolution;
	_height = view._height * _yResolution / view._yResolution;

	Common::Rect bitmapRect(_width, _height);
	if (_textRect.intersects(bitmapRect)) {
		_textRect.clip(bitmapRect);
	} else {
		_textRect = Common::Rect();
	}

	SciBitmap &bitmap = *_segMan->allocateBitmap(&_bitmap, _width, _height, _skipColor, 0, 0, _xResolution, _yResolution, 0, false, gc);

	// NOTE: The engine filled the bitmap pixels with 11 here, which is silly
	// because then it just erased the bitmap using the skip color. So we don't
	// fill the bitmap redundantly here.

	_backColor = _skipColor;
	erase(bitmapRect, false);
	_backColor = backColor;

	view.draw(bitmap.getBuffer(), bitmapRect, Common::Point(0, 0), false, Ratio(_xResolution, view._xResolution), Ratio(_yResolution, view._yResolution));

	if (_backColor != skipColor && _foreColor != skipColor) {
		erase(_textRect, false);
	}

	if (text.size() > 0) {
		if (_foreColor == skipColor) {
			error("TODO: Implement transparent text");
		} else {
			if (borderColor != -1) {
				drawFrame(bitmapRect, 1, _borderColor, false);
			}

			drawTextBox();
		}
	}

	return _bitmap;
}
开发者ID:86400,项目名称:scummvm,代码行数:56,代码来源:text32.cpp

示例5: Q_D

void QLCDNumber::paintEvent(QPaintEvent *)
{
    Q_D(QLCDNumber);
    QPainter p(this);
    drawFrame(&p);
    if (d->smallPoint)
        d->drawString(d->digitStr, p, &d->points, false);
    else
        d->drawString(d->digitStr, p, 0, false);
}
开发者ID:Fale,项目名称:qtmoko,代码行数:10,代码来源:qlcdnumber.cpp

示例6: Q_UNUSED

void QgsComposerItemGroup::paint( QPainter * painter, const QStyleOptionGraphicsItem * option, QWidget * widget )
{
  Q_UNUSED( option );
  Q_UNUSED( widget );
  drawFrame( painter );
  if ( isSelected() )
  {
    drawSelectionBoxes( painter );
  }
}
开发者ID:CzendaZdenda,项目名称:qgis,代码行数:10,代码来源:qgscomposeritemgroup.cpp

示例7: SDL_GetTicks

void Game::RL()
{
    Ptime = Ctime;
    Ctime = SDL_GetTicks();
    deltatime = Ctime - Ptime;
   if (deltatime > 0.15)
    {deltatime = 0.15;}
        composeFrame();
        drawFrame();
}
开发者ID:GracefulComet,项目名称:Graceful-engine-VS,代码行数:10,代码来源:Game.cpp

示例8: painter

void Digit::paintStatic()
{
    QPainter painter(this);
    painter.fillRect(rect(), Qt::black);
    //Fill the widget rec with black color

    int pad = width() / 10;
    drawFrame(&painter, rect().adjusted(pad, pad, -pad, -pad));
    painter.drawPixmap(0, 0, m_pixmap);
}
开发者ID:Zimuge,项目名称:wfhs,代码行数:10,代码来源:digit.cpp

示例9: drawFrame

void DataRecorderView::draw(QPainter * p)
{
	drawFrame(p);
	
	QFont newFont(QString::fromLatin1("helvetica"),10);
	p->setFont(newFont);
	p->drawText(getDrawingPlace(), AlignCenter, QString::fromLatin1("Data\nRec"));

	CompView::draw(p);
}
开发者ID:BackupTheBerlios,项目名称:ksimus,代码行数:10,代码来源:datarecorderview.cpp

示例10: if

void WindowManager::init_gameLog(bool firstTime)
{	if (firstTime)
		gameLog = newwin(10,101,27,1);
	else {
		wresize(gameLog,10,101);
		wclear(gameLog);
	}
	drawFrame(26,0,37,102);
	scrollok(gameLog,TRUE);
}
开发者ID:case93,项目名称:Chiasmus2,代码行数:10,代码来源:WindowManager.cpp

示例11: drawRectangle

void GfxMgr::drawBox(int x1, int y1, int x2, int y2, int color1, int color2, int m) {
	x1 += m;
	y1 += m;
	x2 -= m;
	y2 -= m;

	drawRectangle(x1, y1, x2, y2, color1);
	drawFrame(x1 + 2, y1 + 2, x2 - 2, y2 - 2, color2, color2);
	flushBlock(x1, y1, x2, y2);
}
开发者ID:fissionchris,项目名称:scummvm,代码行数:10,代码来源:graphics.cpp

示例12: disMnuHed

void cInterface:: disMnuHed(char* hed)
	{
	 drawFrame(right,bottom);
	 fillData(right);
	 disTime(right);
	 moveto(300,72);
	 settextstyle(7,0,3);
	 settextjustify(1,1);
	 setcolor(10);
	 outtext(hed);
	}
开发者ID:kra3,项目名称:Feed-Back-Agent,代码行数:11,代码来源:cui.hpp

示例13: GameOver

void GameOver(Display *d, int *in)
{
  do{
    splashPhoto(d,GOVER_SCREEN);
    drawString(d, fontdata, (char*)"PRESS SPACE TO PLAY AGAIN", 350, 540, white,1);
    drawString(d, fontdata, (char*)"OR ESC TO QUIT", 350, 580, warning,0);
    drawFrame(d,REFRESH_RATE);
    *in=input(d);
  }while(in==0);

}
开发者ID:ProjectElves,项目名称:SoftwareEngineering,代码行数:11,代码来源:game.c

示例14: loop

/* Game play loop */
void  loop(){
  
  if (continueGame){                                                      // If the game is still in play
    drawFrame();                                                          // Draw the frame
    drawScore();                                                          // Draw the score
    movePaddle();                                                         // Update the location of the paddle
    boolean paddleCollision = checkPaddleCollision();                     // Determine if the ball has hit the paddle or block
    boolean blockCollision = checkBlockCollision();
    if(score == numBlocks)                                                // If the score is equivalent to the number of blocks, game is over
      winner();                                                           // Display message to user
    else{                                                                 // The game is still in play
      if(paddleCollision || blockCollision)                               // Redraw screen to draw over any collisions
        drawFrame();
      delay(50);                                                          // Slight delay
      continueGame = updatePos();                                         // Update the position of the ball
    }
  }
  else                                                                    // The game is over, the ball fell off the screen. Display message to user.
    gameOver();
}
开发者ID:benjmyers,项目名称:Ballduino,代码行数:21,代码来源:ballduino.c

示例15: painter

///
/// reimplemented functions
///
void MemChartPrivate::paintEvent(QPaintEvent *e)
{

    QPainter painter(this);
    drawBackground(&painter);
    drawCaption(&painter);
    drawFrame(&painter);
    drawLegend(&painter);
    drawHistogram(&painter);
    drawSelectedRegion(&painter);
}
开发者ID:cocosvsn,项目名称:Memmon,代码行数:14,代码来源:memchart.cpp


注:本文中的drawFrame函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。