• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

C++ ARGB函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



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

示例1: draw

void ClosingCinematicScreen::draw(float dt)
{
	if (currentScene == Scenes::GROTESQUE_CLOSEUP)
	{
		currentSprite->Render(0.0, 0.0);

		if (timeInScene > 1.5)
		{
			tongueAngle -= 1.3 * dt;
			tongueOffset -= 550.0 * dt;

			//tongueAngle -= 1.7 * dt;
			//tongueOffset -= 900.0 * dt;
			smh->resources->GetSprite("hugeTongue")->RenderEx(-100, tongueOffset, tongueAngle, 1.0, 1.0);
		}
	} 

	smh->drawScreenColor(Colors::BLACK, fadeInAlpha);

	if (currentScene > 0)
	{
		currentSprite->SetColor(ARGB(fadeOutAlpha, 255, 255, 255));
		currentSprite->Render(512.0 - 220.0, 284.0 - 170.0 + pictureOffset);

		smh->resources->GetFont("inventoryFnt")->SetColor(ARGB(textAlpha, 255.0, 255.0, 255.0));
		smh->resources->GetFont("inventoryFnt")->printf(512.0, 600.0, HGETEXT_CENTER, text.c_str());
		smh->resources->GetFont("inventoryFnt")->SetColor(ARGB(255.0, 255.0, 255.0, 255.0));
	}
}
开发者ID:rgw0094,项目名称:smileysmazehunt3,代码行数:29,代码来源:ClosingCinematic.cpp


示例2: getDetailedInformation

void SimplePopup::Render()
{
    mClosed = false;
    float modX = (SCREEN_WIDTH_F / 2)-5;

    JRenderer *r = JRenderer::GetInstance();
    string detailedInformation = getDetailedInformation(mDeckInformation->getFilename());
#if !defined (PSP)
    
    JQuadPtr statsholder = WResourceManager::Instance()->RetrieveTempQuad("statsholder.png");//new graphics statsholder
    //const float textHeight = mTextFont->GetHeight() * mMaxLines;
    //r->FillRect(0,0,SCREEN_WIDTH_F,SCREEN_HEIGHT_F,ARGB(220,15,15,15));
    if(statsholder.get())
        r->RenderQuad(statsholder.get(),0,0,0,SCREEN_WIDTH_F/statsholder->mWidth,SCREEN_HEIGHT_F/statsholder->mHeight);
#endif
    r->FillRoundRect(mX+modX+3, mY + 7, 190.f, 148.f, 0, ARGB( 240, 15, 15, 15 ) );

    // currently causes a crash on the PSP when drawing the corners.
    // TODO: clean up the image ot make it loook cleaner. Find solution to load gfx to not crash PSP
#if 0
    r->DrawRoundRect(mX, mY + 2, mWidth + 11, textHeight - 12, 2.0f, ARGB( 255, 125, 255, 0) );
    drawBoundingBox( mX-3, mY, mWidth + 3, textHeight );
#endif
    mTextFont->DrawString(detailedInformation.c_str(), modX+mX + 9 , mY + 15);

}
开发者ID:Rolzad73,项目名称:wagic,代码行数:26,代码来源:SimplePopup.cpp


示例3: GUIAppObject

GUIAppListBox::GUIAppListBox ( int _id, float x, float y, float w, float h,
                               const char *btn11, const char *btn12, const char *btn13,
                               const char *btn21, const char *btn22, const char *btn23) : GUIAppObject () {
    bStatic=false;
    bVisible=true;
    bEnabled=true;
    id = _id;
    rect.Set(x,y,x+w,y+h);
    bgColor = ARGB(0xaf,0xA0,0xA0,0xA0);
    frameColor = ARGB(0xff,0xFF,0xFF,0xFF);
    selColor = ARGB(0xaf,0xF0,0xF0,0xF0);
    sepHeight = 1;
    oldVValue = 0;
    oldHValue = 0;
    selectIndex = 0;
    // scrollers
    vscroll = new GUIAppScrollBar(VSCROLL,GUIAppScrollBar::V_SCROLL,x+w,y,h,btn11,btn12,btn13);
    vscroll->SetParent(this);
    hscroll = new GUIAppScrollBar(HSCROLL,GUIAppScrollBar::H_SCROLL,x,y+h,w,btn21,btn22,btn23);
    hscroll->SetParent(this);
    // moving
    vscroll->Move(vscroll->GetWidth(),0);
    hscroll->Move(0,hscroll->GetHeight());
    // set size
    SetupSize(w,h);
    SetupSelection();
}
开发者ID:BGCX261,项目名称:zlmtank-svn-to-git,代码行数:27,代码来源:guilistbox.cpp


示例4: Location

void AStar::render()
{
	_Recorder::render();
	// 绘制路径
	if (m_navigator->getSearchResult() == Navigator::SearchResult_Completed)
	{
		CellCoord prevCellCoord = g_Game.getStartCoord();
		std::list<int> path;
		m_navigator->getPath(path);
		for (std::list<int>::iterator it = path.begin(); it != path.end(); ++it)
		{
			Location prevCenterLocation = util::cellCoordToLocation(prevCellCoord);
			prevCenterLocation += Location(CELL_SIZE_X/2, CELL_SIZE_Y/2);

			CellCoord currentCellCoord = g_Board.toNodeCoord(*it);
			Location currentCenterLocation = util::cellCoordToLocation(currentCellCoord);
			currentCenterLocation += Location(CELL_SIZE_X/2, CELL_SIZE_Y/2);

			g_HGE->Gfx_RenderLine(prevCenterLocation.x, prevCenterLocation.y, 
				currentCenterLocation.x, currentCenterLocation.y,
				ARGB(255, 132, 38, 64)
				);
			g_HGE->Gfx_RenderLine(prevCenterLocation.x, prevCenterLocation.y+1,
				currentCenterLocation.x, currentCenterLocation.y+1,
				ARGB(255, 132, 38, 64)
				);
			prevCellCoord = currentCellCoord;
		}
		g_Font.printf(2, 2, HGETEXT_LEFT, "path total cost: %d", m_navigator->getPathCost());
	}	
}
开发者ID:sjfyc,项目名称:fdk,代码行数:31,代码来源:AStar.cpp


示例5: switch

void DamagerDamaged::Render(CombatStep mode)
{
    TransientCardView::Render();
    WFont * mFont = WResourceManager::Instance()->GetWFont(Fonts::MAIN_FONT);
    mFont->SetBase(0);

    switch (mode)
    {
    case BLOCKERS:
    case TRIGGERS:
    case ORDER:
        mFont->SetColor(ARGB(92,255,255,255));
        break;
    case FIRST_STRIKE:
    case END_FIRST_STRIKE:
    case DAMAGE:
    case END_DAMAGE:
        mFont->SetColor(ARGB(255, 255, 64, 0));
        break;
    }

    char buf[6];
    sprintf(buf, "%i", sumDamages());
    mFont->DrawString(buf, actX - 14 * actZ + 5, actY - 14 * actZ);

}
开发者ID:Esplin,项目名称:wagic,代码行数:26,代码来源:DamagerDamaged.cpp


示例6: ARGB

bool Garden::Garden_Render_GOODS(int j, int i)
{
	//显示光环
	for(int k = 0; k < 30; ++k)
	{
		if(goods[k].first == 0 && goods[k].vis == true && goods[k].eat == false && goods[k].x == i && goods[k].y == j)
		{
			int id = 11;
			bgQuads[id]->v[0].x = mx[j][i] - 25.0f, bgQuads[id]->v[0].y = my[j][i] - 10.0f;
			bgQuads[id]->v[1].x = mx[j][i] + 25.0f, bgQuads[id]->v[1].y = my[j][i] - 10.0f;
			bgQuads[id]->v[2].x = mx[j][i] + 25.0f, bgQuads[id]->v[2].y = my[j][i] + 40.0f;
			bgQuads[id]->v[3].x = mx[j][i] - 25.0f, bgQuads[id]->v[3].y = my[j][i] + 40.0f;
			hge->Gfx_RenderQuad(bgQuads[id]);
		}
	}
	//显示物品
	for(int k = 0; k < 30; ++k)
	{
		int id = goods[k].id + 8;
		float xx = mx[j][i];
		float yy = my[j][i];
		if(goods[k].skill)
		{
			xx = goods[k].xx;
			yy = goods[k].yy;
		}
		bgQuads[id]->v[0].x = xx - 15.0f, bgQuads[id]->v[0].y = yy;
		bgQuads[id]->v[1].x = xx + 15.0f, bgQuads[id]->v[1].y = yy;
		bgQuads[id]->v[2].x = xx + 15.0f, bgQuads[id]->v[2].y = yy + 30.0f;
		bgQuads[id]->v[3].x = xx - 15.0f, bgQuads[id]->v[3].y = yy + 30.0f;
		for(int p = 0; p < 4; ++p)
			bgQuads[id]->v[p].col = ARGB(0x5f, 0xff, 0xff, 0xff);
		if(goods[k].free == true && goods[k].eat == false && goods[k].x == i && goods[k].y == j)
		{
			for(int p = 0; p < 4; ++p)
				bgQuads[id]->v[p].col = ARGB(0xff, 0xff, 0xff, 0xff);
			hge->Gfx_RenderQuad(bgQuads[id]);
		}
		if(goods[k].first == 0 && goods[k].vis == true && goods[k].eat == false && goods[k].x == i && goods[k].y == j)
		{
			hge->Gfx_RenderQuad(bgQuads[id]);
		}
		if(goods[k].first == 1 && goods[k].eat == false && goods[k].x == i && goods[k].y == j)
		{
			//方案一,移动
			id = goods[k].id + 8;
			hge->Gfx_RenderQuad(bgQuads[id]);
			//方案二,光束
			id = 12;
			hge->Gfx_RenderQuad(bgQuads[id]);
		}
	}
	return false;
}
开发者ID:oceanjack,项目名称:TuringCup,代码行数:54,代码来源:Garden.cpp


示例7: drawSillyPads

/**
 * Draws all silly pads that have been created.
 */
void SpecialTileManager::drawSillyPads(float dt) {
	std::list<SillyPad>::iterator i;
	for(i = sillyPadList.begin(); i != sillyPadList.end(); i++) {
		//Fade out during the last 2 seconds
		float timeLeft = (float)SILLY_PAD_TIME - smh->timePassedSince(i->timePlaced);
		if (timeLeft < 1.0f) {
			smh->resources->GetSprite("sillyPad")->SetColor(ARGB((timeLeft/1.0f)*255.0f,255,255,255));
		}
		smh->resources->GetSprite("sillyPad")->Render(smh->getScreenX(i->gridX*64.0), smh->getScreenY(i->gridY*64.0));
		smh->resources->GetSprite("sillyPad")->SetColor(ARGB(255,255,255,255));
	}
}
开发者ID:rgw0094,项目名称:smileysmazehunt3,代码行数:15,代码来源:SpecialTileManager.cpp


示例8: ARGB

void CCockpit::DrawArrow( Sint32 bx , Sint32 by )
{
	//------------------------------------
	//アロー表示
	//------------------------------------

	Sint32 z = PRIO_GAMETOP;
	Float32 fScl=1.f;
	Sint32 sCol = 0xA0*m_sArrowWait/100;
	Sint32 sRot = viiSub::GameCounter()%360;//m_sArrowWait;
	Sint32 x,y;

	fScl = 1.f+m_sArrowWait/100.f;

	x = bx;
	y = by;

	if( m_sArrowRot == 1000 )
	{
		//ビックリマーク
//		viiSub::MenuSprite( x,y,z, enTexPageSystemUI,16,80 ,16,32,8,16 ,ATR_DFLT, ARGB((0xA0-sCol),0xFF,0xFF,0xFF) , 0 );
//		viiSub::MenuSprite( x,y,z, enTexPageGrowObj,0,208 ,192,48,96,24 ,ATR_DFLT, ARGB((sCol),0xFF,0xFF,0xFF) , 0 , 2.f , 1.f);
		viiSub::MenuSprite( x,y,z, enTexPageGrowObj,0,208 ,192,48,96,24 ,ATR_DFLT, ARGB((sCol),0xFF,0xFF,0xFF) , 0 , 0.5f , 0.5f);
		return;
	}
	else if( m_sArrowRot == 2000 )
	{
		viiSub::MenuSprite( WINDOW_W-64,WINDOW_H/2,z, enTexPageGrowObj,0,208 ,192,48,96,24 ,ATR_DFLT, ARGB((sCol),0xFF,0xFF,0xFF) , 0 , 0.5f , 0.5f);
		return;
	}
	else if( m_sArrowRot == 3000 )
	{
		viiSub::MenuSprite( WINDOW_W/2,WINDOW_H-32,z, enTexPageGrowObj,0,208 ,192,48,96,24 ,ATR_DFLT, ARGB((sCol),0xFF,0xFF,0xFF) , 0 , 0.5f , 0.5f);
		return;
	}
	else if( m_sArrowRot == 4000 )
	{
		viiSub::MenuSprite( 64,WINDOW_H/2,z, enTexPageGrowObj,0,208 ,192,48,96,24 ,ATR_DFLT, ARGB((sCol),0xFF,0xFF,0xFF) , 0 , 0.5f , 0.5f);
		return;
	}
	else
	{
		//アロー
		Sint32 ax = (viiMath::Cos100(m_sArrowRot)*(100-m_sArrowWait))/1000;
		Sint32 ay = (viiMath::Sin100(m_sArrowRot)*(100-m_sArrowWait))/1000;
		viiSub::MenuSprite( x+ax,y+ay,z, enTexPageSystemUI,32,80 ,16,32,8,16 ,ATR_DFLT, ARGB((sCol),251,245,198) , m_sArrowRot*1.f );
	}

	viiSub::MenuSprite( x,y,z, enTexPageSystemUI,48,80 ,32,32,16,16 ,ATR_DFLT, ARGB(sCol,32,243,198) , sRot*1.f ,fScl,fScl);
//	viiSub::MenuSprite( x,y,z, enTexPageSystemUI,48,80 ,32,32,16,16 ,ATR_DFLT, ARGB(sCol,0xFF,0xFF,0xFF) ,-sRot*1.f ,fScl);

}
开发者ID:programmerMOT,项目名称:gunhound,代码行数:52,代码来源:CCockpit.cpp


示例9: ARGB

void GuiGameZone::Render()
{
    //Texture
    JQuadPtr quad = WResourceManager::Instance()->GetQuad(kGenericCardThumbnailID);
    float scale = defaultHeight / quad->mHeight;
    quad->SetColor(ARGB((int)(actA),255,255,255));
    if(type == GUI_EXILE)
    {
        quad->SetColor(ARGB((int)(actA),255,240,255));
    }
    JRenderer::GetInstance()->RenderQuad(quad.get(), actX, actY, 0.0, scale * actZ, scale * actZ);

    float x0 = actX;
    if (x0 < SCREEN_WIDTH / 2)
    {
        x0 += 7;
    }

    if (mHasFocus)
        JRenderer::GetInstance()->FillRect(actX, actY, quad->mWidth * scale * actZ, quad->mHeight * scale * actZ,
                ARGB(abs(128 - wave),255,255,255));

    //Number of cards
    WFont * mFont = WResourceManager::Instance()->GetWFont(Fonts::MAIN_FONT);
    mFont->SetScale(DEFAULT_MAIN_FONT_SCALE);
    char buffer[11];
    int mAlpha = (int) (actA);
    /*if(type == GUI_GRAVEYARD)
        sprintf(buffer, "%i\ng", zone->nb_cards);
    else if(type == GUI_LIBRARY)
        sprintf(buffer, "%i\nl", zone->nb_cards);
    else if(type == GUI_OPPONENTHAND)
        sprintf(buffer, "%i\nh", zone->nb_cards);
    else if(type == GUI_EXILE)
        sprintf(buffer, "%i\ne", zone->nb_cards);
    else*/
        sprintf(buffer, "%i", zone->nb_cards);
    mFont->SetColor(ARGB(mAlpha,0,0,0));
    mFont->DrawString(buffer, x0 + 1, actY + 1);
    if (actA > 120)
        mAlpha = 255;
    mFont->SetColor(ARGB(mAlpha,255,255,255));
    mFont->DrawString(buffer, x0, actY);

    if (showCards)
        cd->Render();
    for (vector<CardView*>::iterator it = cards.begin(); it != cards.end(); ++it)
        (*it)->Render();
    PlayGuiObject::Render();
}
开发者ID:Tacoghandi,项目名称:WagicTaco,代码行数:50,代码来源:GuiStatic.cpp


示例10: DrawWorkMeter

void DrawWorkMeter( AGDrawBuffer* DBuf ) {
	u32 Start = 32;
	u32 DrawWidth = g_FBWidth - 32*2;
	u32 Height = g_FBHeight;
	u32 Width;
	int i;
	int j;
	int dw;

	if( aglGetMainDisplay() == 0 ) {		// 表示A
		Width = AG4REG.DSPAVPRM0.VSC * g_VWidth;
		dw = AG4REG.DSPAVPRM0.VSC*DrawWidth;
	}
	else {
		Width = AG4REG.DSPBVPRM0.VSC * g_VWidth;
		dw = AG4REG.DSPBVPRM0.VSC*DrawWidth;
	};

	AG_DRAW_SETATEST( *DBuf , 0 , 7 , 0 );
	AG_DRAW_SETDTEST( *DBuf , 7 , 0 );

	for( i=0 ; i<WorkMeterCount ; i++ ) {
		u32 Pos = WorkMeterPos[i] * DrawWidth / Width + 32;

		AG_DRAW_SETFCOLOR_ARGB( *DBuf , WorkMeterColor[i] );
		AG_DRAW_RECTANGLE( *DBuf , Start<<2 , (Height-32)<<2 , Pos<<2 , (Height-32+5)<<2 );

		Start = Pos;
	};

	for( i=0 ; i<=g_VWidth ; i++ ) {
		AG_DRAW_SETFCOLOR_ARGB( *DBuf , ARGB( 255 , 255 , 255 , 255 ) );
		AG_DRAW_RECTANGLE( *DBuf , (i*dw/Width+32)<<2 , (Height-32-2)<<2 , (i*dw/Width+32+1)<<2 , (Height-32+5+2)<<2 );

		if( i < g_VWidth ) {
			AG_DRAW_SETFCOLOR_ARGB( *DBuf , ARGB( 255 , 128 , 128 , 128 ) );

			for( j=1 ; j<10 ; j++ ) {
				int dh = 0;

				if( j == 5 ) {
					dh = 1;
				};

				AG_DRAW_RECTANGLE( *DBuf , ((i*dw + (dw*j/10))/Width+32)<<2 , (Height-32-dh)<<2 ,
								((i*dw + (dw*j/10))/Width+32+1)<<2 , (Height-32+5+dh)<<2 );
			};
		};
	};
}
开发者ID:cojt-daigorou,项目名称:daigorou,代码行数:50,代码来源:work.c


示例11: main

int main(void) {
  BImage img1 = { 966, 1165, (BColor*)malloc(966 * 1165 * sizeof(BColor)) };
  BImage img2 = { 966, 1165, (BColor*)malloc(966 * 1165 * sizeof(BColor)) };
  
  for (int i = 0; i < 966 * 1165; i++) {
    img1.data[i] = ARGB((byte)255, (byte)255, (byte)255, (byte)0);
    img2.data[i] = ARGB((byte)255, (byte)255, (byte)255, (byte)0);
  }

  auto diffResult = diff_img_byte(img1, img2, DiffOptions{ ARGB((byte)255, (byte)0, (byte)0, (byte)255), 0.2f, 1.0f, OverlayType::Flat, 0, 0 });

  free_img_mem(diffResult.img.data);

}
开发者ID:daseyb,项目名称:imgdiff_bindings,代码行数:14,代码来源:imgdiff_main.cpp


示例12: ARGB

void OptionKey::Overlay()
{
    JRenderer * renderer = JRenderer::GetInstance();
    WFont * mFont = WResourceManager::Instance()->GetWFont(Fonts::OPTION_FONT);
    mFont->SetColor(ARGB(255, 0, 0, 0));
    if (grabbed)
    {
        static const float x = 30, y = 45;
        renderer->FillRoundRect(x, y, SCREEN_WIDTH - 2 * x, 50, 2, ARGB(200, 200, 200, 255));
        string msg = _("Press a key to associate.");
        mFont->DrawString(msg, (SCREEN_WIDTH - mFont->GetStringWidth(msg.c_str())) / 2, y + 20);
    }
    else if (btnMenu)
        btnMenu->Render();
}
开发者ID:Esplin,项目名称:wagic,代码行数:15,代码来源:OptionItem.cpp


示例13: sprintf

void Damage::Render()
{
    WFont * mFont = WResourceManager::Instance()->GetWFont(Fonts::MAIN_FONT);
    mFont->SetBase(0);
    mFont->SetScale(DEFAULT_MAIN_FONT_SCALE);
    char buffer[200];
    sprintf(buffer, _("Deals %i damage to").c_str(), damage);
    //mFont->DrawString(buffer, x + 20, y, JGETEXT_LEFT);
    mFont->DrawString(buffer, x + 32, y + GetVerticalTextOffset(), JGETEXT_LEFT);
    JRenderer * renderer = JRenderer::GetInstance();
    JQuadPtr quad = WResourceManager::Instance()->RetrieveCard(source, CACHE_THUMB);
    if (quad.get())
    {
        //float scale = 30 / quad->mHeight;
        //renderer->RenderQuad(quad.get(), x, y, 0, scale, scale);
        quad->SetColor(ARGB(255,255,255,255));
        float scale = mHeight / quad->mHeight;
        renderer->RenderQuad(quad.get(), x + (quad->mWidth * scale / 2), y + (quad->mHeight * scale / 2), 0, scale, scale);
    }
    else
    {
        //mFont->DrawString(_(source->getName()).c_str(), x, y - 15);
        mFont->DrawString(_(source->getName()).c_str(), x, y + GetVerticalTextOffset() - 15);
    }
    quad = target->getIcon();
    if (quad.get())
    {
        //float scale = 30 / quad->mHeight;
        //renderer->RenderQuad(quad.get(), x + 150, y, 0, scale, scale);
        float backupX = quad->mHotSpotX;
        float backupY = quad->mHotSpotY;
        quad->SetColor(ARGB(255,255,255,255));
        quad->SetHotSpot(quad->mWidth / 2, quad->mHeight / 2);
        float scale = mHeight / quad->mHeight;
        renderer->RenderQuad(quad.get(), x + 130, y - 0.5f + ((mHeight - quad->mHeight) / 2) + quad->mHotSpotY, 0, scale, scale);
        quad->SetHotSpot(backupX, backupY);
    }
    else
    {
        //if (target->type_as_damageable == Damageable::DAMAGEABLE_MTGCARDINSTANCE)
            //mFont->DrawString(_(((MTGCardInstance *) target)->getName()).c_str(), x + 120, y);
        if (target->type_as_damageable == Damageable::DAMAGEABLE_MTGCARDINSTANCE)
            mFont->DrawString(_(((MTGCardInstance *) target)->getName()).c_str(), x + 35, y+15 + GetVerticalTextOffset());
        else if(target->type_as_damageable == Damageable::DAMAGEABLE_PLAYER)
            mFont->DrawString(_(((Player *) target)->getDisplayName()).c_str(), x + 35, y+15 + GetVerticalTextOffset());
    }

}
开发者ID:younthu,项目名称:wagic,代码行数:48,代码来源:Damage.cpp


示例14: clearSurface

void Button_t::paint()
{
	cr = graphics.getContext();
	clearSurface();
	bounds = getBounds();

	if (enabled)
	{
		if (shapeColor == ARGB(120, 211, 211, 211)) shapeColor = previous;

		if (state.focused) border = RGB(0, 200, 0);
		else border = RGB(180, 180, 180);
	}
	else
	{
		previous = shapeColor;
		shapeColor = ARGB(120, 211, 211, 211);
	}

	// prepare
	double x = 0.5;
	double y = 0.5;
	double width = bounds.width - 1;
	double height = bounds.height - 1;
	double radius = 2.5;
	double degrees = M_PI / 180.0;

	cairo_new_sub_path(cr);
	cairo_arc(cr, x + width - radius, y + radius, radius, -90 * degrees, 0 * degrees);
	cairo_arc(cr, x + width - radius, y + height - radius, radius, 0 * degrees, 90 * degrees);
	cairo_arc(cr, x + radius, y + height - radius, radius, 90 * degrees, 180 * degrees);
	cairo_arc(cr, x + radius, y + radius, radius, 180 * degrees, 270 * degrees);
	cairo_close_path(cr);

	cairo_set_source_rgba(cr, ARGB_TO_CAIRO_PARAMS(shapeColor));
	cairo_fill_preserve(cr);
	cairo_set_source_rgba(cr, ARGB_TO_CAIRO_PARAMS(border));
	cairo_set_line_width(cr, 1);
	cairo_stroke(cr);

	if (pathToLoad)
	{
		pngSurface = graphics.getContext();

		cairo_set_source_surface(pngSurface, png, pngPosition.x, pngPosition.y);
		cairo_paint(pngSurface);
	}
}
开发者ID:MarcoCicognani,项目名称:MeetiX-OS-Project,代码行数:48,代码来源:button.cpp


示例15: drawSet

void drawSet(AGDrawBuffer* DBuf, struct Field* field, struct Player* player)
{
	int i;

	//Init
	agDrawBufferInit( DBuf , DrawBuffer );
	agDrawSETDAVR( DBuf , 0 , 0 , aglGetDrawFrame() , 0 , 0 );
	agDrawSETDAVF( DBuf, 0, 0, s(FB_WIDTH), s(FB_HEIGHT) );

	//白背景
	agDrawSETFCOLOR( DBuf, ARGB( 255, 255, 255, 255 ) );
	agDrawSETDBMODE( DBuf, 0xff, 0, 0, 1 );
	agDrawSPRITE( DBuf, 0, 0, 0, s(FB_WIDTH), s(FB_HEIGHT) );

	//フィールド
	drawField( DBuf, field);

	//戦艦
	for(i=0;i<5;i++){
		drawBattleShip(DBuf, &(player->battleShip[i]));
	}
	

	/*
	//数字を描画する場所の白い四角
	agDrawSETFCOLOR( DBuf, ARGB( 255, 255, 255, 255 ) );
	agDrawSETDBMODE( DBuf, 0xff, 0, 0, 1 );
	agDrawSPRITE( DBuf, 0, 100-20, 100-20, 100+50*10+20, 100+90+20);
	//数字の描画
	drawNumberGraph(20131120, 100,100,50,90,10,DBuf);
	*/
	
}
开发者ID:SW103,项目名称:BattleShip,代码行数:33,代码来源:game.c


示例16: Render

void GameStateLoading::Render()
{
	mRenderer->ClearScreen(ARGB(255,0,0,0));

	float p = ((float)mStage/8);

	mRenderer->RenderQuad(gBgQuad,0,0);
	mRenderer->RenderQuad(gLogoQuad,0,0);
	mRenderer->FillRect(SCREEN_WIDTH*p,0,SCREEN_WIDTH*(1-p),SCREEN_HEIGHT,ARGB(200,0,0,0));

	/*mRenderer->FillRect(0,0,SCREEN_WIDTH,SCREEN_HEIGHT,ARGB(255-(int)(p*255),0,0,0));
	mRenderer->FillRect(SCREEN_WIDTH_2-200,SCREEN_HEIGHT_2-4,400,8,ARGB(255,100,100,100));
	mRenderer->FillRect(SCREEN_WIDTH_2-200,SCREEN_HEIGHT_2-4,400*p,8,ARGB(255,255,255,255));*/


}
开发者ID:Leajian,项目名称:cspsp-nightly,代码行数:16,代码来源:GameStateLoading.cpp


示例17: Graph_ClearShadowArea

void Graph_ClearShadowArea( LCUI_PaintContext paint, LCUI_Rect *box,
			    LCUI_BoxShadow *shadow )
{
	int i;
	LCUI_Graph canvas;
	LCUI_Rect rect, box_area, rects[4];

	rect.w = box->w;
	rect.h = box->h;
	rect.x = rect.y = 0;
	/* 获取内容框区域 */
	box_area.x = box->x + BoxShadow_GetBoxX( shadow );
	box_area.y = box->y + BoxShadow_GetBoxY( shadow );
	box_area.w = BoxShadow_GetBoxWidth( shadow, box->w );
	box_area.h = BoxShadow_GetBoxHeight( shadow, box->h );
	/* 获取内容框外的阴影区域 */
	LCUIRect_CutFourRect( &box_area, &rect, rects );
	for( i=0; i<4; ++i ) {
		if( LCUIRect_GetOverlayRect( &paint->rect, &rects[i], &rects[i] ) ) {
			rects[i].x -= paint->rect.x;
			rects[i].y -= paint->rect.y;
			Graph_Quote( &canvas, &paint->canvas, &rects[i] );
			Graph_FillRect( &canvas, ARGB(0,0,0,0), NULL, TRUE );
		}
	}
}
开发者ID:bitbegin,项目名称:LCUI,代码行数:26,代码来源:boxshadow.c


示例18: ARGB

void Clock::Render()
{
	POINT p;
	p.x = 0;
	p.y = 12 * scale;

	Campus::GetInst()->Add(imageList[BACK], pos.x - dst[BACK].w*scale / 2 + dst[BACK].x*scale,
						   pos.y - dst[BACK].h*scale / 2 + dst[BACK].y*scale,
						   dst[BACK].w*scale, dst[BACK].h*scale,
						   src[BACK].x, src[BACK].y, src[BACK].w, src[BACK].h);

	Campus::GetInst()->Add(imageList[HOUR], pos.x - dst[HOUR].w*scale / 2 + dst[HOUR].x*scale,
						   pos.y - dst[HOUR].h*scale / 2 + dst[HOUR].y*scale,
						   dst[HOUR].w*scale, dst[HOUR].h*scale,
						   src[HOUR].x, src[HOUR].y, src[HOUR].w, src[HOUR].h,
						   p, hourAngle);
	Campus::GetInst()->Add(imageList[MINUTE], pos.x - dst[MINUTE].w*scale / 2 + dst[MINUTE].x*scale,
						   pos.y - dst[MINUTE].h*scale / 2 + dst[MINUTE].y*scale,
						   dst[MINUTE].w*scale, dst[MINUTE].h*scale,
						   src[MINUTE].x, src[MINUTE].y, src[MINUTE].w, src[MINUTE].h,
						   p, minuteAngle);
	//卍成功演出用時計
	if (state == State::SUCCESS&&SuccessCnt > 0){
		DWORD S_Alpha = ARGB((int)((float)SuccessCnt / (float)SUCCESS_EFFECT_TIME*127.0f) , 255, 255, 255);
		float AddScale = (float)Mine_SChain / (float)CHAIN_EFFECT_MAX*CHAIN_MAX_SCALE;
		AddScale *= 1.0f - (float)SuccessCnt / (float)SUCCESS_EFFECT_TIME;
		Campus::GetInst()->Add(imageList[BACK],
			pos.x - dst[BACK].w*(AddScale + scale) / 2 + dst[BACK].x*(AddScale + scale),
			pos.y - dst[BACK].h*(AddScale + scale) / 2 + dst[BACK].y*(AddScale + scale),
			dst[BACK].w*(AddScale + scale), dst[BACK].h*(AddScale + scale),
			src[BACK].x, src[BACK].y, src[BACK].w, src[BACK].h, GetPoint(0, 0), 0, 1, RS_COPY, (DWORD)S_Alpha, 0.0f);
	}
}
开发者ID:hirasawak1,项目名称:kotonarinojikan,代码行数:33,代码来源:Clock.cpp


示例19: setValue

	void setValue(float v)
	{
		value=v;
		for(int i=0;i<=1024;++i)
		{
			int tr=(int)((1.0f-value)*255);
			int tg=(int)(value*255);
			DWORD tcolor=ARGB(alpha,tr,tg,0);
			smColorHSVA *tc=new smColorHSVA(tcolor);
			if(tc->v<0.85)tc->v=0.85;
			tcolor=color?SETA(color,alpha):SETA(tc->getHWColor(),alpha);
			delete tc;
			if((float)i/1024.<=value)
			{
				circle->setColor(i,2,tcolor);
				circle->setColor(i,1,SETA(0x00FFFFFF,alpha));
				circle->setColor(i,0,tcolor);
			}
			else
			{
				circle->setColor(i,2,0);
				circle->setColor(i,1,0);
				circle->setColor(i,0,0);
			}
		}
	}
开发者ID:BearKidsTeam,项目名称:SMELT,代码行数:26,代码来源:smindicator.hpp


示例20: OnRender

// 渲染游戏画面,返回0退出游戏
int CGame::OnRender(void)
{
	m_pGrp->Clear(ARGB(255,0,0,0));
	m_pGrp->BeginScene();

	// 画地图,人物,对象,怪物...
	//m_pGrp->DrawText("网络大地图演示", 10, 10, RGB(255,0,0));

	list<LINE*>::iterator it = m_listLine.begin();
	list<LINE*>::iterator itEnd = m_listLine.end();
	while(it != itEnd)
	{
		LINE* pPT = *it;
		m_pGrp->RenderLine(pPT->x0,pPT->y0,pPT->x1,pPT->y1);
		it++;
	}

// 	// 画鼠标
// 	m_objMouse.Render( &m_grp );

/*	m_pGrp->SwapBuffers();*/
	m_pGrp->EndScene();

	m_pFps->Show();

	Sleep(1);

	return 1;
}
开发者ID:edolphin-ydf,项目名称:hydzhengtu,代码行数:30,代码来源:Game.cpp



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C++ ARGF函数代码示例发布时间:2022-05-30
下一篇:
C++ AREF函数代码示例发布时间:2022-05-30
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap