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


C++ Drawing::draw方法代码示例

本文整理汇总了C++中Drawing::draw方法的典型用法代码示例。如果您正苦于以下问题:C++ Drawing::draw方法的具体用法?C++ Drawing::draw怎么用?C++ Drawing::draw使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Drawing的用法示例。


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

示例1: test_lake

void test_lake() {
    sf::RenderWindow window(sf::VideoMode(200, 200), "Map Test");
    Random r;

    window.clear(sf::Color(128, 128, 128));
    Drawing * lake = Drawing::new_lake(r, 100);
	lake->draw(window, 100, 100);

    window_loop(window);
}
开发者ID:vwood,项目名称:7drl-2013,代码行数:10,代码来源:test_main.cpp

示例2: test_drawing

void test_drawing() {
    sf::RenderWindow window(sf::VideoMode(200, 200), "Wave Test");
    Random r;
    Drawing *mnt = Drawing::new_mountain(r, 100);
    Drawing *tree = Drawing::new_tree(r, 80);
    Drawing *wave = Drawing::new_wave(r, 80);

    window.clear(sf::Color(128, 128, 128));
	mnt->draw(window, 100, 180);
	tree->draw(window, 110, 100);
	wave->draw(window, 100, 40);

	sf::CircleShape cs(2, 4);
    cs.setPosition(100, 40);
    window.draw(cs);

    
    window.display();
    window_loop(window);
}
开发者ID:vwood,项目名称:7drl-2013,代码行数:20,代码来源:test_main.cpp

示例3: test_shield

void test_shield() {
    sf::RenderWindow window(sf::VideoMode(200, 200), "Wave Test");
    Random r;

    window.clear(sf::Color(128, 128, 128));

    Drawing *shield = Drawing::new_shield(r, 100);
	shield->draw(window, 100, 100);
    window.display();
    window_loop(window);
}
开发者ID:vwood,项目名称:7drl-2013,代码行数:11,代码来源:test_main.cpp

示例4: refreshScreenshotToShow

// Refresh the pixmap of the displayed screenshot by redraw everything
void EditWindow::refreshScreenshotToShow()
{
    // Take the screenshot without any drawings
    QPixmap screenshotPixmap = screenshot->getImage();
    painterScreenshot->drawPixmap(screenshotPixmap.rect(), screenshotPixmap);

    // Draw every drawing one by one on the clean screenshot
    Drawing* drawing;
    foreach(drawing, newDrawingsList)
    {
        drawing->draw(painterScreenshot);
    }
开发者ID:nicolasfostier,项目名称:ScreenshotMerge,代码行数:13,代码来源:editwindow.cpp

示例5: test_drawing2

void test_drawing2() {
    sf::RenderWindow window(sf::VideoMode(200, 200), "Drawing Test");
    Random r;
//    Drawing *d = Drawing::new_mountain(r, 100);
//    Drawing *d = Drawing::new_tree(r, 100);
//    Drawing *d = Drawing::new_wave(r, 100);
//    Drawing *d = Drawing::new_hill(r, 100);
    Drawing *d = Drawing::new_person(r, 100);
    window.clear(sf::Color(128, 128, 128));
	d->draw(window, 100, 120);

	sf::CircleShape cs(2, 4);
    cs.setPosition(100, 120);
    window.draw(cs);
    
    window_loop(window);
}
开发者ID:vwood,项目名称:7drl-2013,代码行数:17,代码来源:test_main.cpp


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