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


C++ getImage函数代码示例

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


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

示例1: getImage

void GNC::SimplePrintTool::doPrint()
{
        wxImage image = getImage(WidgetsContract->GetViewerActivo()->GetRenderWindow());
        if (image.IsOk()) {
                wxPrintDialogData dlgData(*pData);
                wxPrinter printer(&dlgData);
                ginkgoPrintOutImage prOut(image);
                printer.Print(WidgetsContract->GetManager()->GetVista()->GetWindow(), &prOut);
        }
}
开发者ID:151706061,项目名称:ginkgocadx,代码行数:10,代码来源:simpleprinttool.cpp

示例2: getImage

void SE_TriSurfaceRenderUnit::getTexImage(int texIndex, SE_ImageData**& imageDataArray, int& imageDataNum)
{
    if(texIndex < SE_TEXTURE0 || texIndex >= SE_TEXUNIT_NUM)
    {
        imageDataArray = NULL;
        imageDataNum = 0;
        return;
    }
    getImage(texIndex, imageDataArray, imageDataNum);
}
开发者ID:3DHome,项目名称:3DHomeHD,代码行数:10,代码来源:SE_RenderUnit.cpp

示例3: getImage

bool GLRenderTexture::readRenderResult(uint8_t* readback_buffer){
    Image* image = getImage();
    long neededCapacity = image->getWidth() * image->getHeight();
    if (!readback_buffer) {
        LOGE("GLRenderTexture::readRenderResult: readback_buffer is null");
        return false;
    }
    readRenderResult(readback_buffer,neededCapacity);
    return true;
}
开发者ID:NolaDonato,项目名称:GearVRf,代码行数:10,代码来源:gl_render_texture.cpp

示例4: getFilename

QString TestBase::snapAndContrast(const QString& sLabel, const QString& sFilenameContrast)
{
	QString sFilename = getFilename(sLabel);
	QImage image = getImage();
	image.save(sFilename);

	compare(image, sFilename, sFilenameContrast, false);

	return sFilename;
}
开发者ID:ellis,项目名称:gcead,代码行数:10,代码来源:TestBase.cpp

示例5: getImage

/*
 * 找多个球,改编自单个球,返回vector数组
 * 为了支持绕障碍功能
 */
std::vector<cv::Point2f> Robot::findMulBall()
{
    getImage();
    std::vector<cv::Point2f> ans;
    while (true) {
        if (!image_r)
            return ans;
        ip.setBound(BALL_BOUND);
        std::vector<cv::Point3f> tmp = ip.extractCircles(image_r);
        if (tmp.size() <= 0) {
            turnRight(FIND_BALL_ANGLE);
            getImage();
            continue;
        }
        cv::Point2f rCoord;
        rCoord = worldMap.coord_screen2robot(cv::Point2f(tmp[0].x, tmp[0].y + tmp[0].z));
        cv::Point2f ball_coord_sub = worldMap.coord_robot2world(rCoord);
        CvRect bbox = worldMap.getMap_bbox();
        cv::Point2f ball_coord_img = world2image(ball_coord_sub);
        if (ball_coord_img.x >= bbox.x && ball_coord_img.x <= bbox.x + bbox.width &&
            ball_coord_img.y >= bbox.y && ball_coord_img.y <= bbox.y + bbox.height) {
            turnRight(FIND_BALL_ANGLE);
            getImage();
            continue;
        }
        if (ans.size() == 1) {
            //判断找到的是不是同一个球
            if (abs(ball_coord_sub.x - ans[0].x) <= 10 && abs(ball_coord_sub.y - ans[0].y) <= 10) {
                turnRight(FIND_BALL_ANGLE);
                getImage();
                continue;
            }
        }
        ans.push_back(ball_coord_sub);
        if (ans.size() > 1)
            break;
        turnRight(FIND_BALL_ANGLE);
        getImage();
    }

    return ans;
}
开发者ID:sunweilun,项目名称:robocup-2013,代码行数:46,代码来源:Robot.cpp

示例6: srcP

	void Graphics2D::drawCharSet(structure::EventState& state, Vector2D const& dstP)
	{
		Vector2D srcP(
			state.charSetPos() % 4 * CharSet::Pat::END + state.charSetPat(),
			state.charSetPos() / 4 * CharSet::Dir::END + state.charSetDir()
		);
		drawImage(
			getImage( Material::CharSet, state.charSet() ),
			dstP, srcP * CHAR_SIZE, CHAR_SIZE
		);
	}
开发者ID:take-cheeze,项目名称:rpgtukuru-iphone,代码行数:11,代码来源:Graphics2D.cpp

示例7: getImage

    QPixmap ImageManager::prefetchImage(const QString& host, const QString& url)
    {
        // TODO See if this actually helps on the N900 & Symbian Phones
#if defined Q_WS_QWS || defined Q_WS_MAEMO_5 || defined Q_WS_S60
        // on mobile devices we don´t want the display refreshing when tiles are received which are
        // prefetched... This is a performance issue, because mobile devices are very slow in
        // repainting the screen
        prefetch.append(url);
#endif
        return getImage(host, url);
    }
开发者ID:volthouse,项目名称:desktop,代码行数:11,代码来源:imagemanager.cpp

示例8: getImage

QSize ScreenieFilePathModel::getSize() const
{
    QSize result;
    if (!d->image.isNull()) {
        result = d->image.size();
    } else {
        /*!\todo Optimisation: use Exiv2 (or http://www.sentex.net/~mwandel/jhead/) library to quickly read the image size from disk (EXIF data). */
        result = getImage().size();
    }
    return result;
}
开发者ID:till213,项目名称:screenie,代码行数:11,代码来源:ScreenieFilePathModel.cpp

示例9: poPoint

perchFrame::perchFrame( poXMLNode _framesNode, poXMLNode _productNode )
{
    
    controlswitch = false;
    framesNode = _framesNode;
    productNode = _productNode;

    
    // object position
    position = poPoint( framesNode.getChild("posx").innerInt(), framesNode.getChild("posy").innerInt() );

    // make image frame
    float S = framesNode.getChild("scale").innerFloat();
    std::string imageName = framesNode.getChild("image").innerString();
    
    frameImg = getImage(imageName);
    R = new poRectShape( imageName );
    R->alignment( PO_ALIGN_CENTER_CENTER );
    R->scale.set( S,S,1 );
    R->strokeColor = poColor::red;
    R->addEvent( PO_MOUSE_DRAG_EVENT, this, "drag the frame" );
    R->addEvent(PO_MOUSE_DOWN_INSIDE_EVENT,this, "click the frame");
    addChild( R );
    
        
    //text box for info
    tb = new poTextBox(getWindowWidth(), getWindowHeight()/2);
	tb->textAlignment(PO_ALIGN_TOP_LEFT);
    tb->textColor = poColor::green;
    tb->font(getFont("Courier", 12));
	addChild(tb);
    
    //small rectangles to control the scale
    SR1 = new poRectShape(30,30);
    SR1->fillColor = poColor::green;
    SR1->alignment(PO_ALIGN_CENTER_CENTER);
    SR1->drawBounds = false;
    SR1->position = poPoint(0,0);
    SR1->addEvent(PO_MOUSE_DRAG_EVENT, this, "drag the green rect");
    SR1->addEvent(PO_MOUSE_DOWN_INSIDE_EVENT,this, "click the green rect");
    R->addChild(SR1);
    
    //show the info of this product
    productInfo = new perchProduct(productNode);//according to current frameID find the product info in product.xml
//    productInfo->position = poPoint(R->bounds.width()*R->scale.x/2,R->bounds.height()*R->scale.x/2);
    productInfo->position = poPoint(80,80);
    productInfo->alignment(PO_ALIGN_TOP_LEFT);
    productInfo->visible = false; 
    productInfo->displaynum = 0;
    R->addChild(productInfo);
   
       
    
}
开发者ID:chienlin,项目名称:perch,代码行数:54,代码来源:perchFrame.cpp

示例10: draw

void FullColorBrushTool::draw()
{
	if (TRasterImageP ri = TRasterImageP(getImage(false))) {
		TRasterP ras = ri->getRaster();

		glColor3d(1.0, 0.0, 0.0);

		tglDrawCircle(m_brushPos, (m_minThick + 1) * 0.5);
		tglDrawCircle(m_brushPos, (m_maxThick + 1) * 0.5);
	}
}
开发者ID:ArseniyShestakov,项目名称:opentoonz,代码行数:11,代码来源:fullcolorbrushtool.cpp

示例11: invertPolygon

void MoveRegionTool::OnLButtonUp(UINT nFlags, const CPoint &point) {
  if(m_copy == NULL) {
    invertPolygon();   // remove polygon
    m_rect = m_polygon.getBoundsRect();                                                             // define rect
    if(m_polygon.size() > 2 && m_rect.Width() > 0 && m_rect.Height() > 0) {                         // if valid rectangle
      m_copy = theApp.fetchPixRect(m_rect.Size());                                                          //   define copy
      m_mask = theApp.fetchPixRect(m_rect.Size());                                                          //   define mask
      m_old  = theApp.fetchPixRect(m_rect.Size());                                                          //   define old
      m_copy->rop(ORIGIN,m_rect.Size(),SRCCOPY, getImage(),m_rect.TopLeft());                       //   take a copy
      m_old->rop( ORIGIN,m_rect.Size(),SRCCOPY, getImage(),m_rect.TopLeft());                       //   take a copy
      createMask();

      invertPolygon(); // draw polygon
    } else {
      m_polygon.clear();
    }
  } else {
    invertPolygon(); // draw polygon
  }
}
开发者ID:JesperMikkelsen,项目名称:Big-Numbers,代码行数:20,代码来源:MoveRegionTool.cpp

示例12: prepareLocalChunks

StatePtr SimpleTexturedMaterial::makeState(void)
{
    StatePtr state = Inherited::makeState();

    prepareLocalChunks();

    state->addChunk(_textureChunk);
    state->addChunk(_texGenChunk);

    if(getImage() != NullFC &&
       getImage()->hasAlphaChannel() && 
       getEnvMode() != GL_DECAL)
    {
        if(getImage()->isAlphaBinary())
        {
            if(_blendChunk->getSrcFactor() == GL_SRC_ALPHA)
            {
                beginEditCP(_blendChunk);
                _blendChunk->setSrcFactor(GL_ONE);
                _blendChunk->setDestFactor(GL_ZERO);
                _blendChunk->setAlphaFunc(GL_NOTEQUAL);
                _blendChunk->setAlphaValue(0);          
                endEditCP(_blendChunk);            
            }
        }
        else
        {
            if(_blendChunk->getSrcFactor() != GL_SRC_ALPHA)
            {
                beginEditCP(_blendChunk);
                _blendChunk->setSrcFactor(GL_SRC_ALPHA);
                _blendChunk->setDestFactor(GL_ONE_MINUS_SRC_ALPHA);
                _blendChunk->setAlphaFunc(GL_NONE);
                _blendChunk->setAlphaValue(0);          
                endEditCP(_blendChunk);                        
            }
        }
    }

    return state;
}
开发者ID:mlimper,项目名称:OpenSG1x,代码行数:41,代码来源:OSGSimpleTexturedMaterial.cpp

示例13: getImage

/* GfxEntryPanel::onYOffsetChanged
 * Called when the Y offset value is modified
 *******************************************************************/
void GfxEntryPanel::onYOffsetChanged(wxCommandEvent& e)
{
	// Change the image y-offset
	int offset = spin_yoffset->GetValue();
	getImage()->setYOffset(offset);

	// Update variables
	setModified();

	// Refresh canvas
	gfx_canvas->Refresh();
}
开发者ID:SanyaWaffles,项目名称:SLADE,代码行数:15,代码来源:GfxEntryPanel.cpp

示例14: kdDebug

MotionAwayPlugin::MotionAwayPlugin( QObject *parent, const char *name, const QStringList & /* args */ )
: Kopete::Plugin( MotionAwayPluginFactory::instance(), parent, name )
{
	kdDebug(14305) << k_funcinfo << "Called." << endl;
	/* This should be read from config someday may be */
	m_width = DEF_WIDTH;
	m_height = DEF_HEIGHT;
	m_quality = DEF_QUALITY;
	m_maxChanges = DEF_CHANGES;
	m_gap = DEF_GAP;

	/* We haven't took the first picture yet */
	m_tookFirst = false;

	m_captureTimer = new QTimer(this);
	m_awayTimer = new QTimer(this);

	connect( m_captureTimer, SIGNAL(timeout()), this, SLOT(slotCapture()) );
	connect( m_awayTimer, SIGNAL(timeout()), this, SLOT(slotTimeout()) );

	signal(SIGCHLD, SIG_IGN);

	m_imageRef.resize( m_width * m_height * 3);
	m_imageNew.resize( m_width * m_height * 3);
	m_imageOld.resize( m_width * m_height * 3);
	m_imageOut.resize( m_width * m_height * 3);


	kdDebug(14305) << k_funcinfo << "Opening Video4Linux Device" << endl;

	m_deviceHandler = open( videoDevice.latin1() , O_RDWR);

	if (m_deviceHandler < 0)
	{
		kdDebug(14305) << k_funcinfo << "Can't open Video4Linux Device" << endl;
	}
	else
	{
        kdDebug(14305) << k_funcinfo << "Worked! Setting Capture timers!" << endl;
		/* Capture first image, or we will get a alarm on start */
		getImage (m_deviceHandler, m_imageRef, DEF_WIDTH, DEF_HEIGHT, IN_DEFAULT, NORM_DEFAULT,
	    	VIDEO_PALETTE_RGB24);

        /* We have the first image now */
		m_tookFirst = true;
		m_wentAway = false;

		m_captureTimer->start( DEF_POLL_INTERVAL );
		m_awayTimer->start( awayTimeout * 60 * 1000 );
	}
	loadSettings();
	connect(this, SIGNAL(settingsChanged()), this, SLOT( loadSettings() ) );
}
开发者ID:serghei,项目名称:kde3-kdenetwork,代码行数:53,代码来源:motionawayplugin.cpp

示例15: Draw

void Wall::Draw(Graphics* g)
{
	auto pContext = GlobalContext::singleton();
	auto isoPos = utils::toIsometric(getPos());
	
	g->DrawImage(getImage().get() , 
				Rect(isoPos.cellX - pContext->m_cellWidth,isoPos.cellY - pContext->m_cellHeight, pContext->m_cellWidth*2, pContext->m_cellHeight*2), 
				Rect(IMAGE_CELL_X*IMAGE_CELL_WIDTH,
					IMAGE_CELL_Y*IMAGE_CELL_HEIGHT,
					IMAGE_CELL_WIDTH,
					IMAGE_CELL_HEIGHT));
}
开发者ID:Twisterok,项目名称:GameInsightTestTask,代码行数:12,代码来源:Wall.cpp


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