Harline - how do I print one?
- From: Adelle Hartley <adelle@xxxxxxxxxxxx>
- Date: Fri, 30 May 2008 18:28:25 +1000
Hi,
I am trying to print a line which is 1 (device) pixel wide.
I'm using a printer hdc that has had scaling applied, thus:
PageWidth = Printer.ScaleWidth
PageHeight = Printer.ScaleHeight
OldMapMode = SetMapMode(Printer.hDc, MM_ISOTROPIC)
Success = SetViewportOrgEx(mHdc, 0, 0, OldViewOrg)
Success = SetWindowExtEx(mHdc, PageWidth, PageHeight, OldWinExtent)
Success = SetViewportExtEx(mHdc, PageWidth, PageHeight, OldVpExtent)
Success = ScaleViewportExtEx(mHdc, PageWidth, MyForm.ScaleWidth, PageWidth, MyForm.ScaleWidth, OldSize)
The scaling is working, but it means the thickness of a pen created with nWidth=1 is also scaled up.
Is it possible to create a pen which is 1 device-pixel wide?
According to the MSDN entry for CreatePen:
"If the value specified by the nWidth parameter is zero, a line drawn with the created pen always is a single pixel wide regardless of the current transformation"
This statement doesn't appear to be true if the device is a printer.
Adelle.
.
- Prev by Date: RE: Rotating the display using ChangeDisplaySettingsEx
- Next by Date: Re: Font deletion
- Previous by thread: Different A,B,C widths returned in 16-bit and 32-bit OS???
- Next by thread: Re: Font deletion
- Index(es):