Antonino,
Yes I agree not needed to be defined for each sampleFUNCTION DRAWROUNDRECT(oWnd, oFont1)
LOCAL hdc := oWnd:getdc(), aImage
LOCAL oPen := Pen():New( 255, 0, 0, 255 , 10, .T.)
LOCAL oBrush1 := Brush():NewSolidBrush( 255, 255, 128, 0 ) // Orange
LOCAL
oBrush2 := Brush():NewGradientBrush( 300, 200, 200, 200, 1,;
255, 255, 128, 0,;
255, 255, 255, 255 )
LOCAL oPath := Path():new()
LOCAL oGraphics := Graphics():New( oWnd:hDC ) // sample 1
// oPen, [oBrush], nLeft, nTop, nWidth, nHight, nRound
oGraphics:DrawRoundRect( oPen, , 250, 50, 200, 200, 50 )
// sample 2
oPath:AddRoundRect( 250, 300, 200, 200, 50 )
oGraphics:FillPath( oBrush1, oPath)
oGraphics:DrawRoundRect( oPen, , 250, 300, 200, 200, 50 )
// sample 3
oPath := Path():new()
// , oBrush, nLeft, nTop, nWidth, nHight
oPath:AddRoundRect( 550, 300, 200, 200, 50 )
oGraphics:FillPath(
oBrush2, oPath)
oGraphics:Destroy()oPen:Destroy()
oWnd:releasedc()
RETURN NIL
regards
Uwe