Autor Beitrag
Jakob_Ullmann
ontopic starontopic starontopic starontopic starontopic starontopic starofftopic starofftopic star
Beiträge: 1747
Erhaltene Danke: 15

Win 7, *Ubuntu GNU/Linux*
*Anjuta* (C, C++, Python), Geany (Vala), Lazarus (Pascal), Eclipse (Java)
BeitragVerfasst: Di 08.07.08 15:32 
Hallo,

wie kann ich herausfinden, was ein Pixel auf dem Monitor auf dem Drucker ist? Ich bin mir sicher, die Lösung ist recht einfach, aber ich habe irgendwie gerade ein Brett vor dem Kopf.
jaenicke
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 19346
Erhaltene Danke: 1754

W11 x64 (Chrome, Edge)
Delphi 12 Pro, C# (VS 2022), JS/HTML, Java (NB), PHP, Lazarus
BeitragVerfasst: Di 08.07.08 15:52 
Vielleicht hilft dir dieses Tutorial:
www.delphi-treff.de/...scal/drucken/page/4/
Jakob_Ullmann Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starofftopic starofftopic star
Beiträge: 1747
Erhaltene Danke: 15

Win 7, *Ubuntu GNU/Linux*
*Anjuta* (C, C++, Python), Geany (Vala), Lazarus (Pascal), Eclipse (Java)
BeitragVerfasst: Di 08.07.08 16:27 
Vielen Dank, aber ich hab jetzt eine Lösung gefunden. Nicht direkt für das beschriebene Problem, sondern ich hab mal wieder viel zu kompliziert gedacht, also prinzipiell muss ich das gar nicht rausfinden.
Hidden
ontopic starontopic starontopic starontopic starontopic starontopic starofftopic starofftopic star
Beiträge: 2242
Erhaltene Danke: 55

Win10
VS Code, Delphi 2010 Prof.
BeitragVerfasst: Di 08.07.08 16:53 
Hat das Canvas des Druckers nicht vielleicht ein ClientRect, das das wiedergibt?

_________________
Centaur spears can block many spells, but no one tries to block if they see that the spell is a certain shade of green. For this purpose it is useful to know some green stunning hexes. (HPMoR)
_frank_
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 343
Erhaltene Danke: 1

Win XP
Delphi 3 Prof / Turbo Delphi Explorer
BeitragVerfasst: Do 10.07.08 01:50 
ausblenden Delphi-Quelltext
1:
2:
3:
4:
5:
6:
    var pRes,sRes:integer;
    faktor:double;

    pRes:=GetDeviceCaps(Printer.Handle,LOGPIXELSX); //get printers dpi
    sRes:=GetDeviceCaps(GetDC(0),LOGPIXELSX); //get printers dpi
    faktor:=pRes / sRes;


HTH Frank

_________________
EB FE (die wahrscheinlich kürzeste Endlosschleife der Welt :) )
BA 01 00 00 00 52 EB 09 BB 4D 11 86 7C FF D3 EB 0D E8 F2 FF FF FF 63 68 61 72 6D 61 70 00 C3