hi,
here is "C"-Source for TriGradient
MiniGUI Extended Version use 4 Points ( Rect ).
for HMG i add 3 x Array {x,y,R,G,B} and 4th are {0,0,0,0,0}
Code: Select all
hDC := BeginPaint(nHwnd, @pps )
FillGradientEx( hDC ,{1024,0,250,0,0},{1024,768,0,250,0},{0,768,0,0,250})
EndPaint(nHwnd, pps )
for Triangle Gradient i need 3 Points
Code: Select all
METHOD DrawTriangleGradient(cForm, aPos, aPos2, aPos3, aColors1, aColors2, aColors3) CLASS DemoForm
LOCAL lRet
LOCAL nHwnd, nHDC
nHwnd := GetformHandle( cForm )
IF EMPTY(nHwnd)
RETURN .F.
ENDIF
nHDC := GetDC( nHwnd )
lRet := GRAGRADIENTEX( nHDC ,{aPos [1],aPos [2],aColors1[1],aColors1[2],aColors1[3]} ,;
{aPos2[1],aPos2[2],aColors2[1],aColors2[2],aColors2[3]} ,;
{aPos3[1],aPos3[2],aColors3[1],aColors3[2],aColors3[3]} )
ReleaseDC( nHwnd, nHDC )
RETURN lRet