FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin para Harbour/xHarbour Clase para Graficos Vectoriales
Posts: 1276
Joined: Tue Dec 28, 2010 01:29 PM
Re: Clase para Graficos Vectoriales
Posted: Wed Sep 21, 2022 01: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 25.12

Harbour/Hbmk2

Microsoft Visual C++

MySql 8.0

Antigravity

Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
Re: Clase para Graficos Vectoriales
Posted: Wed Sep 21, 2022 02: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
Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
Re: Clase para Graficos Vectoriales
Posted: Wed Sep 21, 2022 03: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
Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
Re: Clase para Graficos Vectoriales
Posted: Wed Sep 21, 2022 03:36 PM

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

regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 1276
Joined: Tue Dec 28, 2010 01:29 PM
Re: Clase para Graficos Vectoriales
Posted: Wed Sep 21, 2022 03: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 25.12

Harbour/Hbmk2

Microsoft Visual C++

MySql 8.0

Antigravity

Posts: 1279
Joined: Mon Feb 06, 2006 04:28 PM
Re: Clase para Graficos Vectoriales
Posted: Wed Sep 21, 2022 06:27 PM

Muy interesante....

Saludos/Regards,

José Murugosa

"Los errores en programación, siempre están entre la silla, el teclado y la IA!!"

Continue the discussion