Print Colored Box

Print Colored Box

Postby Silvio.Falconi » Fri May 22, 2020 5:18 pm

I tried to recreate the beach plan with the Printer class, with the cmBox function

it is possible to color inside the boxes which function can I use?

Image
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: 7075
Joined: Thu Oct 18, 2012 7:17 pm

Re: Print Colored Box

Postby nageswaragunupudi » Fri May 22, 2020 9:57 pm

Use method Box()

Syntax
Code: Select all  Expand view  RUN

METHOD Box( nTop, nLeft, nBottom, nRight, ;
       [Pen], ;   // oPen/hPen/nColor/{nColor,nThickness}
       [Brush], ; // nColor / oBrush
       [aText], ; // { cText, oFont, nColor } Painted in center
       cUnits ;   // "CM", "MM", "INCHES"
       )
 


You specify the color in the 6th param.
Params 5,6,7 are optional.
Regards

G. N. Rao.
Hyderabad, India
User avatar
nageswaragunupudi
 
Posts: 10659
Joined: Sun Nov 19, 2006 5:22 am
Location: India

Re: Print Colored Box

Postby Silvio.Falconi » Sat May 23, 2020 9:13 am

thanks Rao.
I have to make a print of the beach in order to view the numbers, the status of each item. This type of printing is called the Lifeguard Sheet, because the lifeguard usually uses the paper and assigns the rentals on the paper.
My problem is that the beach scheme is created in 20 rows by 40 columns and a maximum of 800 positions (boxes) can be inserted even if generally in the plan of the beach there are in addition to the rentable elements also the accompanying elements (plants, walkways , chalet) which are not to be printed in the lifeguard printout.
As you can see in the print here, the small square on the right is the last position of the beach plan, that is 1-40, I tried to narrow the boxes to get everything into one A4 sheet but it is very difficult

Image

it never happens that a chalet has all these umbrellas in width but a chalet could happen. in fact at an old bathing establishment there were 2500 umbrellas


Example on road

the one circled in red is a single bathhouse with over 60 columns for 9 rows of umbrellas

Image
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: 7075
Joined: Thu Oct 18, 2012 7:17 pm

Re: Print Colored Box

Postby Silvio.Falconi » Sat May 23, 2020 9:40 am

Now I tried with box with brush
as you can clearly see the measurements of the oprn: Box () function are not the same as the oPrn: cmBox () function
Any solution ?

Image
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: 7075
Joined: Thu Oct 18, 2012 7:17 pm

Re: Print Colored Box

Postby nageswaragunupudi » Sat May 23, 2020 10:24 am

Measurements of Box method should be correct.
cmBox is an old method and is now superseded by the enhancements made to Box method.
Regards

G. N. Rao.
Hyderabad, India
User avatar
nageswaragunupudi
 
Posts: 10659
Joined: Sun Nov 19, 2006 5:22 am
Location: India

Re: Print Colored Box

Postby Silvio.Falconi » Sat May 23, 2020 3:34 pm

Rao , Resolved !!!

I managed to get in a 40x20 grid
the last box you see on the right corner is in position x40-y1
It is a great satisfaction I can put 800 elements on an A4 sheet

Image

I just can't lift the "Beach" logo
I made before of EndPage

@ nRow-5, 2000 PRINT TO oPrn IMAGE "LOGOBEACH" ;
SIZE 500,450;
PIXEL ALPHALEVEL 90

ENDPAGE

How print Hollow text there is a sample ?
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: 7075
Joined: Thu Oct 18, 2012 7:17 pm


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: Google [Bot] and 75 guests