Pen questions
Posted: Tue Sep 21, 2004 2:09 pm
I'm using wxWidgets (or rather wxWindows 2.4.2) to print plans (not sure if that's the correct term, but it's meant to be something you cut out and fold). There are no problems on my printer (and as far as I know it also works on at least a few other printers), but it doesn't work on a Brother HL1250 (and probably also on a DeskJet connected to the same system, so it may have something to do with the system and not the printer). What goes wrong is that the lines are always drawn solid (some of them should be dotted or dashed). I've tried the following pen styles:
It's on a Windows system btw. (don't know the Windows version yet, but it's probably Windows XP).
Has anyone ever seen similar behaviour or has any clue where I could start looking for a solution.
On a side-note, I was wondering whether in the following section of code in pen.cpp (also in the current CVS version) the #ifndef should be replaced by #ifdef:
- wxSOLID
- wxDOT
- wxLONG_DASH
- wxSHORT_DASH
- wxDOT_DASH
- wxUSER_DASH
It's on a Windows system btw. (don't know the Windows version yet, but it's probably Windows XP).
Has anyone ever seen similar behaviour or has any clue where I could start looking for a solution.
On a side-note, I was wondering whether in the following section of code in pen.cpp (also in the current CVS version) the #ifndef should be replaced by #ifdef:
Code: Select all
#ifndef __WIN32__
// In Windows, only a pen of width = 1 can be dotted or dashed!
if ((Style == wxDOT) || (Style == wxLONG_DASH) ||
(Style == wxSHORT_DASH) || (Style == wxDOT_DASH) ||
(Style == wxUSER_DASH))
M_PENDATA->m_width = 1;
#else
/***
DWORD vers = GetVersion() ;
WORD high = HIWORD(vers) ; // high bit=0 for NT, 1 for Win32s
// Win32s doesn't support wide dashed pens
if ((high&0x8000)!=0)
***/
if (wxGetOsVersion()==wxWIN32S)
{
// In Windows, only a pen of width = 1 can be dotted or dashed!
if ((Style == wxDOT) || (Style == wxLONG_DASH) ||
(Style == wxSHORT_DASH) || (Style == wxDOT_DASH) ||
(Style == wxUSER_DASH))
M_PENDATA->m_width = 1;
}
#endif