Originally Posted by
wassup40
Il go check it again iam pretty sure it doesnt explain about drawing shape's
What is there to explain
Code:
void FillRGB( int x, int y, int w, int h, D3DCOLOR color, IDirect3DDevice9* pDevice )
{
D3DRECT rec = { x, y, x + w, y + h };
pDevice->Clear( 1, &rec, D3DCLEAR_TARGET, color, 0, 0 );
}
Code:
void DrawBorder( int x, int y, int w, int h, int px, D3DCOLOR BorderColor, IDirect3DDevice9* pDevice )
{
FillRGB( x, (y + h - px), w, px, BorderColor, pDevice );
FillRGB( x, y, px, h, BorderColor, pDevice );
FillRGB( x, y, w, px, BorderColor, pDevice );
FillRGB( (x + w - px), y, px, h, BorderColor, pDevice );
}
Code:
void DrawBox( int x, int y, int w, int h, D3DCOLOR BoxColor, D3DCOLOR BorderColor, IDirect3DDevice9* pDevice )
{
FillRGB( x, y, w, h, BoxColor, pDevice );
DrawBorder( x, y, w, h, 1, BorderColor, pDevice );
}
Code:
void DrawCrosshair(LPDIRECT3DDEVICE9 pDevice, int size, int strong, D3DCOLOR xcolor)
{
int iCenterX = GetSystemMetrics( 0 ) / 2;
int iCenterY = GetSystemMetrics( 1 ) / 2;
if( iCenterX < 20 && iCenterY < 20 )
{
iCenterX = ( GetSystemMetrics( 0 ) / 2 );
iCenterY = ( GetSystemMetrics( 1 ) / 2 );
}
D3DRECT rec2 = { iCenterX- size, iCenterY, iCenterX+ size, iCenterY+ strong};
D3DRECT rec3 = { iCenterX, iCenterY- size, iCenterX+ strong,iCenterY+ size};
pDevice->Clear(1, &rec2, D3DCLEAR_TARGET, xcolor, 1000, 0);
pDevice->Clear(1, &rec3, D3DCLEAR_TARGET, xcolor, 100, 0);
}