Foros Club Delphi

Foros Club Delphi (https://www.clubdelphi.com/foros/index.php)
-   Impresión (https://www.clubdelphi.com/foros/forumdisplay.php?f=4)
-   -   Calcular DOTS (https://www.clubdelphi.com/foros/showthread.php?t=7443)

brandolin 16-02-2004 15:01:19

Calcular DOTS
 
Necesito calcular cuantos DOTs hay en 20 mm. ¿Alguien sabe la relacion?

Gracias.

marcoszorrilla 16-02-2004 15:12:48

Mira a ver si este ejemplo adaptándolo te sirve:

Código:



function GetPixelsPerInchX: Integer;
begin
  Result := GetDeviceCaps(Printer.Handle, LOGPIXELSX)
end;

function GetPixelsPerInchY: Integer;
begin
  Result := GetDeviceCaps(Printer.Handle, LOGPIXELSY)
end;


procedure TForm1.Button1Click(Sender: TObject);
begin
  label1.Caption := 'La resolución de la Impresora es:'+Format('x: %d y: %d DPI (puntos por pulgada)',
                  [GetPixelsPerInchX, GetPixelsPerInchY]);
end;

Una pulgada = 2,54 cm.

Un Saludo.


La franja horaria es GMT +2. Ahora son las 04:51:12.

Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2026, Jelsoft Enterprises Ltd.
Traducción al castellano por el equipo de moderadores del Club Delphi