DirectX 9 ARGB Gradient fill

Durum
Üzgünüz bu konu cevaplar için kapatılmıştır...
Üye
Katılım
18 Ağu 2017
Mesajlar
46
Tepki puanı
7
Yaş
28
8 HİZMET YILI
I was trying to find, but I couldn't find. Can someone help me about it. For example, the top of the button or tab is Black, the bottom of the button or tab is White. Like in this picture. Thanks already.
vertical-black-to-white-gradient.jpg


Bulmaya çalışıyordum, ama bulamadım. Birisi bana bu konuda yardımcı olabilir. Örneğin, düğmenin veya sekmenin üst kısmı Siyah, düğmenin veya sekmenin alt kısmı Beyaz'tır. Bu resimdeki gibi. Şimdiden teşekkürler..
 
Onaylı Üye
Katılım
28 Eki 2017
Mesajlar
79
Tepki puanı
8
Yaş
27
8 HİZMET YILI
it is gradient. Very easy. find at unknowncheats. You can it ;)
 
Seçkin Üye
Katılım
2 Şub 2017
Mesajlar
358
Tepki puanı
106
Yaş
30
9 HİZMET YILI
Kod:
void GradientEfekti(int x, int y, int w, int h, D3DCOLOR Start, D3DCOLOR Stop, LPDIRECT3DDEVICE9 pDevice){
    static struct D3DVERTEX { float x, y, z, rhw; DWORD color; }
    vertices[4] = { { 0, 0, 0, 1.0f, 0 }, { 0, 0, 0, 1.0f, 0 }, { 0, 0, 0, 1.0f, 0 }, { 0, 0, 0, 1.0f, 0 } };
    vertices[0].x = x;
    vertices[0].y = y;
    vertices[0].color = Start;
    vertices[1].x = x + w;
    vertices[1].y = y;
    vertices[1].color = Start;
    vertices[2].x = x;
    vertices[2].y = y + h;
    vertices[2].color = Stop;
    vertices[3].x = x + w;
    vertices[3].y = y + h;
    vertices[3].color = Stop;
    pDevice->SetRenderState(D3DRS_ALPHABLENDENABLE, true);
    pDevice->SetRenderState(D3DRS_DESTBLEND, D3DBLEND_INVSRCALPHA);
    pDevice->SetFVF(D3DFVF_XYZRHW | D3DFVF_DIFFUSE);
    pDevice->DrawPrimitiveUP(D3DPT_TRIANGLESTRIP, 2, vertices, sizeof(vertices[0]));
}
 
Durum
Üzgünüz bu konu cevaplar için kapatılmıştır...
Üst