drawing a circle with FW_Box

drawing a circle with FW_Box

Postby Silvio.Falconi » Wed Oct 02, 2024 11:35 am

Image

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
User avatar
Silvio.Falconi
 
Posts: 7061
Joined: Thu Oct 18, 2012 7:17 pm

Re: drawing a circle with FW_Box

Postby nageswaragunupudi » Wed Oct 02, 2024 1:37 pm

Code: Select all  Expand view
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
User avatar
nageswaragunupudi
 
Posts: 10641
Joined: Sun Nov 19, 2006 5:22 am
Location: India

Re: drawing a circle with FW_Box

Postby Silvio.Falconi » Wed Oct 02, 2024 4:15 pm

nageswaragunupudi wrote:
Code: Select all  Expand view
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 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
User avatar
Silvio.Falconi
 
Posts: 7061
Joined: Thu Oct 18, 2012 7:17 pm

Re: drawing a circle with FW_Box

Postby nageswaragunupudi » Thu Oct 03, 2024 2: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: Select all  Expand view
  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
User avatar
nageswaragunupudi
 
Posts: 10641
Joined: Sun Nov 19, 2006 5:22 am
Location: India

Re: drawing a circle with FW_Box

Postby Silvio.Falconi » 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 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
User avatar
Silvio.Falconi
 
Posts: 7061
Joined: Thu Oct 18, 2012 7:17 pm

Re: drawing a circle with FW_Box

Postby Silvio.Falconi » Fri Oct 11, 2024 9: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: Select all  Expand view
  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 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
User avatar
Silvio.Falconi
 
Posts: 7061
Joined: Thu Oct 18, 2012 7:17 pm

Re: drawing a circle with FW_Box

Postby Silvio.Falconi » Fri Oct 11, 2024 9:33 am

I resolved with

Image

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
User avatar
Silvio.Falconi
 
Posts: 7061
Joined: Thu Oct 18, 2012 7:17 pm


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: No registered users and 34 guests