Clase para Graficos Vectoriales

Re: Clase para Graficos Vectoriales

Postby Compuin » Wed Sep 21, 2022 1:55 pm

Muchas gracias maestro, es como dice, cuestion de ir probando.

Pregunta final, para el trazado de las lineas cortadas es la misma funcion que se usa para la linea azul completa?
FWH 20.12
Hbmk2 32/64 Bits (Build 19.29.30133)
Microsoft Visual C 32 Bits
MySql 8.0.24 32/64 Bits
VS Code
Compuin
 
Posts: 1213
Joined: Tue Dec 28, 2010 1:29 pm
Location: Quebec, Canada

Re: Clase para Graficos Vectoriales

Postby Antonio Linares » Wed Sep 21, 2022 2:22 pm

Aclaración de Mr. Rao que tiene más experiencia en este tema:

For conversion between Pixels and Units( "INCHES", "CM", "MM" ), we have two methods
Units2Pix( top, left, width, height, Units ( "INCHES","CM","MM" ))
and
Pix2Units( ... )

But for using many methods, we need not do any calculations ourselves.
Just mention the Units as parameter. Printer class will internally does all calculations and print.

Eg:
Line( nTop, nLeft, nBottom, nRight, oPen, cUnits )
METHOD Box( nRow, nCol, nBottom, nRight, anoPen, noBrush, aText, cUnits )
METHOD AngleArc( x, y, r, angle, sweep, uPen, uBrush, cUnits )
METHOD Ellipse( nRow, nCol, nBottom, nRight, oPen, nFillClr, aText, cUnits )

Usage: oPrn:Box( 20, 20, 50, 60, oPen, oBrush, aText, "CM" )

There are only very few methods without this support:
Arc(...), Chord(..), Pie(...)
For such few methods, we can use Units2Pix(..) to convert INCHES/CM/MM to pixels.

For all common usage of printer, the user is not bothered about the conversion calculations
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 41343
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Re: Clase para Graficos Vectoriales

Postby Antonio Linares » Wed Sep 21, 2022 3:36 pm

DEFINE PEN oPen STYLE 2 // PS_DOT
#define PS_SOLID 0
#define PS_DASH 1 /* ------- */
#define PS_DOT 2 /* ....... */
#define PS_DASHDOT 3 /* ... */
#define PS_DASHDOTDOT 4 /* ...._ */
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 41343
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Re: Clase para Graficos Vectoriales

Postby Antonio Linares » Wed Sep 21, 2022 3:36 pm

Os ha dado por la sastreria de repente ? :-D
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 41343
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Re: Clase para Graficos Vectoriales

Postby Compuin » Wed Sep 21, 2022 3:46 pm

Gracias maestro, es un arte que aprendi de adolescente y me gustaria crear un producto para diseno de camisas y chalecos masculinos.

Un hobbie como tal :D
FWH 20.12
Hbmk2 32/64 Bits (Build 19.29.30133)
Microsoft Visual C 32 Bits
MySql 8.0.24 32/64 Bits
VS Code
Compuin
 
Posts: 1213
Joined: Tue Dec 28, 2010 1:29 pm
Location: Quebec, Canada

Re: Clase para Graficos Vectoriales

Postby jose_murugosa » Wed Sep 21, 2022 6:27 pm

Muy interesante....
Saludos/Regards,
José Murugosa
FWH + Harbour + Bcc7. Una seda!
User avatar
jose_murugosa
 
Posts: 1144
Joined: Mon Feb 06, 2006 4:28 pm
Location: Uruguay

Previous

Return to FiveWin para Harbour/xHarbour

Who is online

Users browsing this forum: No registered users and 18 guests