Print Colored Box

Post Reply
User avatar
Silvio.Falconi
Posts: 4956
Joined: Thu Oct 18, 2012 7:17 pm

Print Colored Box

Post by Silvio.Falconi »

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
I use : FiveWin for Harbour August 2020 (Revision) - Harbour 3.2.0dev (r1712141320) - Bcc7.30 - xMate ver. 1.15.3 - PellesC
User avatar
nageswaragunupudi
Posts: 8017
Joined: Sun Nov 19, 2006 5:22 am
Location: India
Contact:

Re: Print Colored Box

Post by nageswaragunupudi »

Use method Box()

Syntax

Code: Select all

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

Re: Print Colored Box

Post by Silvio.Falconi »

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
I use : FiveWin for Harbour August 2020 (Revision) - Harbour 3.2.0dev (r1712141320) - Bcc7.30 - xMate ver. 1.15.3 - PellesC
User avatar
Silvio.Falconi
Posts: 4956
Joined: Thu Oct 18, 2012 7:17 pm

Re: Print Colored Box

Post by Silvio.Falconi »

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
I use : FiveWin for Harbour August 2020 (Revision) - Harbour 3.2.0dev (r1712141320) - Bcc7.30 - xMate ver. 1.15.3 - PellesC
User avatar
nageswaragunupudi
Posts: 8017
Joined: Sun Nov 19, 2006 5:22 am
Location: India
Contact:

Re: Print Colored Box

Post by nageswaragunupudi »

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

Re: Print Colored Box

Post by Silvio.Falconi »

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 ?
I use : FiveWin for Harbour August 2020 (Revision) - Harbour 3.2.0dev (r1712141320) - Bcc7.30 - xMate ver. 1.15.3 - PellesC
Post Reply