Clase para Graficos Vectoriales

User avatar
Compuin
Posts: 1250
Joined: Tue Dec 28, 2010 1:29 pm
Location: Quebec, Canada
Has thanked: 7 times
Been thanked: 3 times

Re: Clase para Graficos Vectoriales

Post by Compuin »

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
User avatar
Antonio Linares
Site Admin
Posts: 42511
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain
Has thanked: 31 times
Been thanked: 73 times
Contact:

Re: Clase para Graficos Vectoriales

Post by Antonio Linares »

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: 42511
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain
Has thanked: 31 times
Been thanked: 73 times
Contact:

Re: Clase para Graficos Vectoriales

Post by Antonio Linares »

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: 42511
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain
Has thanked: 31 times
Been thanked: 73 times
Contact:

Re: Clase para Graficos Vectoriales

Post by Antonio Linares »

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

Antonio Linares
www.fivetechsoft.com
User avatar
Compuin
Posts: 1250
Joined: Tue Dec 28, 2010 1:29 pm
Location: Quebec, Canada
Has thanked: 7 times
Been thanked: 3 times

Re: Clase para Graficos Vectoriales

Post by Compuin »

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
User avatar
jose_murugosa
Posts: 1185
Joined: Mon Feb 06, 2006 4:28 pm
Location: Uruguay
Contact:

Re: Clase para Graficos Vectoriales

Post by jose_murugosa »

Muy interesante....
Saludos/Regards,
José Murugosa
"Los errores en programación, siempre están entre la silla y el teclado y la IA!!"
Post Reply