Ver la Versión Completa : Calcular DOTS
brandolin
16-02-2004, 15:01:19
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:
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.
vBulletin v3.6.8, Derechos ©2000-2024, Jelsoft Enterprises Ltd.