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?
Clase para Graficos Vectoriales
- 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
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
- 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
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 /* ...._ */
#define PS_SOLID 0
#define PS_DASH 1 /* ------- */
#define PS_DOT 2 /* ....... */
#define PS_DASHDOT 3 /* ... */
#define PS_DASHDOTDOT 4 /* ...._ */
- 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:
- 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
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![Very Happy :D](./images/smilies/icon_biggrin.gif)
Un hobbie como tal
![Very Happy :D](./images/smilies/icon_biggrin.gif)
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
Hbmk2 32/64 Bits (Build 19.29.30133)
Microsoft Visual C 32 Bits
MySql 8.0.24 32/64 Bits
VS Code
- jose_murugosa
- Posts: 1185
- Joined: Mon Feb 06, 2006 4:28 pm
- Location: Uruguay
- Contact:
Re: Clase para Graficos Vectoriales
Muy interesante....
Saludos/Regards,
José Murugosa
"Los errores en programación, siempre están entre la silla y el teclado y la IA!!"
José Murugosa
"Los errores en programación, siempre están entre la silla y el teclado y la IA!!"