FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour drawing a circle with FW_Box
Posts: 7317
Joined: Thu Oct 18, 2012 07:17 PM
drawing a circle with FW_Box
Posted: Wed Oct 02, 2024 11:35 AM


I draw a red circle but the border is allways black...why ?

hBrush := CreateSolidBrush(RGB(255, 28, 36))

SelectObject(hDC, hBrush)


FW_Box( hDC, { nX, nY, nX + nSize, nY + nSize }, hBrush, hBrush, , 2 )

I tried also with
FW_Box( hDC, { nX, nY, nX + nSize, nY + nSize }, RGB(243, 101, 108), RGB(243, 101, 108), , 2 )

where is the error ?
Since from 1991/1992 ( fw for clipper Rel. 14.4 - Momos)

I use : FiveWin for Harbour March-April 2024 - Harbour 3.2.0dev (harbour_bcc770_32_20240309) - Bcc7.70 - xMate ver. 1.15.3 - PellesC - mail: silvio[dot]falconi[at]gmail[dot]com
Posts: 10733
Joined: Sun Nov 19, 2006 05:22 AM
Re: drawing a circle with FW_Box
Posted: Wed Oct 02, 2024 01:37 PM
Code (fw): Select all Collapse
FW_Box( hDC, { nX, nY, nX + nSize, nY + nSize }, RGB(243, 101, 108), RGB(243, 101, 108), , 2 )
This should work.
Regards



G. N. Rao.

Hyderabad, India
Posts: 7317
Joined: Thu Oct 18, 2012 07:17 PM
Re: drawing a circle with FW_Box
Posted: Wed Oct 02, 2024 04:15 PM
nageswaragunupudi wrote:
Code (fw): Select all Collapse
FW_Box( hDC, { nX, nY, nX + nSize, nY + nSize }, RGB(243, 101, 108), RGB(243, 101, 108), , 2 )
This should work.
Yes but i see allways the black border
Since from 1991/1992 ( fw for clipper Rel. 14.4 - Momos)

I use : FiveWin for Harbour March-April 2024 - Harbour 3.2.0dev (harbour_bcc770_32_20240309) - Bcc7.70 - xMate ver. 1.15.3 - PellesC - mail: silvio[dot]falconi[at]gmail[dot]com
Posts: 10733
Joined: Sun Nov 19, 2006 05:22 AM
Re: drawing a circle with FW_Box
Posted: Thu Oct 03, 2024 02:58 AM
If a color or pen is specified as 3rd parameter, only that color/pen is used and it never uses black color.
As a test you may check
Code (fw): Select all Collapse
   local nClr  := RGB(243, 101, 108)

   DEFINE WINDOW oWnd SIZE 200,200 PIXEL

   oWnd:bPainted := { |hDC| FW_Box( hDC, { 20,20,120,120 }, { nClr, 3 }, nil, , 2 ) }
The circle is drawn with the specified color only but not black.
Regards



G. N. Rao.

Hyderabad, India
Posts: 7317
Joined: Thu Oct 18, 2012 07:17 PM
Re: drawing a circle with FW_Box
Posted: Thu Oct 03, 2024 10:30 AM

now run

Since from 1991/1992 ( fw for clipper Rel. 14.4 - Momos)

I use : FiveWin for Harbour March-April 2024 - Harbour 3.2.0dev (harbour_bcc770_32_20240309) - Bcc7.70 - xMate ver. 1.15.3 - PellesC - mail: silvio[dot]falconi[at]gmail[dot]com
Posts: 7317
Joined: Thu Oct 18, 2012 07:17 PM
Re: drawing a circle with FW_Box
Posted: Fri Oct 11, 2024 09:24 AM
nageswaragunupudi wrote:If a color or pen is specified as 3rd parameter, only that color/pen is used and it never uses black color.
As a test you may check
Code (fw): Select all Collapse
   local nClr  := RGB(243, 101, 108)

   DEFINE WINDOW oWnd SIZE 200,200 PIXEL

   oWnd:bPainted := { |hDC| FW_Box( hDC, { 20,20,120,120 }, { nClr, 3 }, nil, , 2 ) }
The circle is drawn with the specified color only but not black.

Nages, can I print with fw_box?

sample
FW_Box( oPrn:hdc, { nY, nX, nY + nPixelAltezza, nX + nPixelLarghezza }, { nClr, 3 }, nil, , 2 )
Since from 1991/1992 ( fw for clipper Rel. 14.4 - Momos)

I use : FiveWin for Harbour March-April 2024 - Harbour 3.2.0dev (harbour_bcc770_32_20240309) - Bcc7.70 - xMate ver. 1.15.3 - PellesC - mail: silvio[dot]falconi[at]gmail[dot]com
Posts: 7317
Joined: Thu Oct 18, 2012 07:17 PM
Re: drawing a circle with FW_Box
Posted: Fri Oct 11, 2024 09:33 AM
I resolved with



oPrn:Ellipse(...)
Since from 1991/1992 ( fw for clipper Rel. 14.4 - Momos)

I use : FiveWin for Harbour March-April 2024 - Harbour 3.2.0dev (harbour_bcc770_32_20240309) - Bcc7.70 - xMate ver. 1.15.3 - PellesC - mail: silvio[dot]falconi[at]gmail[dot]com

Continue the discussion