How create tree concentric circles ?
Regards
circles on xharbour( fw)
- Antonio Linares
- Site Admin
- Posts: 42553
- Joined: Thu Oct 06, 2005 5:47 pm
- Location: Spain
- Has thanked: 31 times
- Been thanked: 80 times
- Contact:
Silvio,
Code: Select all | Expand
BOOL Ellipse(
HDC hdc, // handle to device context
int nLeftRect, // x-coord. of bounding rectangle's upper-left corner
int nTopRect, // y-coord. of bounding rectangle's upper-left corner
int nRightRect, // x-coord. of bounding rectangle's lower-right corner
int nBottomRect // y-coord. bounding rectangle's f lower-right corner
);
if I have
with ellipse
I try it but it not draw circle concentric
Code: Select all | Expand
Rectangle( ::hDC, nX, nY, nX + ::nHeight, ( nY += ::nPinWidth ) )
with ellipse
Code: Select all | Expand
ellipse( ::hDC, nX, nY, nX + ::nHeight, ( nY += ::nPinWidth ) )
I try it but it not draw circle concentric
Best Regards, Saludos
Falconi Silvio
Falconi Silvio
- Enrico Maria Giordano
- Posts: 8756
- Joined: Thu Oct 06, 2005 8:17 pm
- Location: Roma - Italia
- Has thanked: 1 time
- Been thanked: 4 times
- Contact:
Re: circles on xharbour( fw)
This is a working sample:
EMG
Code: Select all | Expand
#include "Fivewin.ch"
FUNCTION MAIN()
LOCAL oDlg
LOCAL nX := 100
LOCAL nY := 100
LOCAL nMinRad := 20
LOCAL nMaxRad := 100
LOCAL nStep := 10
DEFINE DIALOG oDlg;
SIZE 200, 200
ACTIVATE DIALOG oDlg;
ON PAINT CIRCLES( oDlg, hDC, nX, nY, nMinRad, nMaxRad, nStep );
CENTER
RETURN NIL
#define BRUSH_NULL 5
STATIC FUNCTION CIRCLES( oDlg, hDC, nX, nY, nMinRad, nMaxRad, nStep )
LOCAL hOldBrush := SELECTOBJECT( hDC, GETSTOCKOBJECT( BRUSH_NULL ) )
LOCAL i
FOR i = nMinRad TO nMaxRad STEP nStep
oDlg:Circle( nX - i, nY - i, i * 2 )
NEXT
SELECTOBJECT( hDC, hOldBrush )
RETURN NIL
EMG