drawing a circle with FW_Box
- Silvio.Falconi
- Posts: 7104
- Joined: Thu Oct 18, 2012 7:17 pm
drawing a circle with FW_Box
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 November 2023 - January 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
I use : FiveWin for Harbour November 2023 - January 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
- nageswaragunupudi
- Posts: 10691
- Joined: Sun Nov 19, 2006 5:22 am
- Location: India
- Contact:
Re: drawing a circle with FW_Box
Code: Select all | Expand
FW_Box( hDC, { nX, nY, nX + nSize, nY + nSize }, RGB(243, 101, 108), RGB(243, 101, 108), , 2 )
Regards
G. N. Rao.
Hyderabad, India
G. N. Rao.
Hyderabad, India
- Silvio.Falconi
- Posts: 7104
- Joined: Thu Oct 18, 2012 7:17 pm
Re: drawing a circle with FW_Box
Yes but i see allways the black bordernageswaragunupudi wrote:This should work.Code: Select all | Expand
FW_Box( hDC, { nX, nY, nX + nSize, nY + nSize }, RGB(243, 101, 108), RGB(243, 101, 108), , 2 )
Since from 1991/1992 ( fw for clipper Rel. 14.4 - Momos)
I use : FiveWin for Harbour November 2023 - January 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
I use : FiveWin for Harbour November 2023 - January 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
- nageswaragunupudi
- Posts: 10691
- Joined: Sun Nov 19, 2006 5:22 am
- Location: India
- Contact:
Re: drawing a circle with FW_Box
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
The circle is drawn with the specified color only but not black.
As a test you may check
Code: Select all | Expand
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 ) }
Regards
G. N. Rao.
Hyderabad, India
G. N. Rao.
Hyderabad, India
- Silvio.Falconi
- Posts: 7104
- Joined: Thu Oct 18, 2012 7:17 pm
Re: drawing a circle with FW_Box
now run
Since from 1991/1992 ( fw for clipper Rel. 14.4 - Momos)
I use : FiveWin for Harbour November 2023 - January 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
I use : FiveWin for Harbour November 2023 - January 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
- Silvio.Falconi
- Posts: 7104
- Joined: Thu Oct 18, 2012 7:17 pm
Re: drawing a circle with FW_Box
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 checkThe circle is drawn with the specified color only but not black.Code: Select all | Expand
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 ) }
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 November 2023 - January 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
I use : FiveWin for Harbour November 2023 - January 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
- Silvio.Falconi
- Posts: 7104
- Joined: Thu Oct 18, 2012 7:17 pm
Re: drawing a circle with FW_Box
I resolved with
oPrn:Ellipse(...)
oPrn:Ellipse(...)
Since from 1991/1992 ( fw for clipper Rel. 14.4 - Momos)
I use : FiveWin for Harbour November 2023 - January 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
I use : FiveWin for Harbour November 2023 - January 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