Patch level : 10.0 656

Files correlati     : xvaga.dll
Ricompilazione Demo : [ ]
Commento            :
0001540: Diversa spaziatura tra la stampa e l'esportazione in "PDF"
(modulo Preventivo personalizzato Presscolor)

Tra una riga e l'altra del documento viene lasciata una riga vuota nell'esportazione del "PDF", cosa che non avviene nella stampa normale. Si tratta del modulo personalizzato del Preventivo che si chiama "prvbmp_n.rep". L'area dati completa del cliente per poter fare delle prove si trova in www.aga.it/Ilaria/Presscolor/DATIEPresscolor.zip


git-svn-id: svn://10.65.10.50/trunk@20163 c028cbd2-c16b-5b4b-a496-9718f37d4682
This commit is contained in:
guy 2010-02-25 16:08:50 +00:00
parent ab2bf61625
commit 484306c79b
2 changed files with 17 additions and 20 deletions

View File

@ -740,15 +740,16 @@ void TwxPDFDC::DoDrawRotatedText( const wxString& text, wxCoord x, wxCoord y, do
wxCoord TwxPDFDC::GetCharHeight() const wxCoord TwxPDFDC::GetCharHeight() const
{ {
if (m_font.Ok()) wxCoord y = 0;
return m_fontsize; DoGetTextExtent("M", NULL, &y, NULL, NULL, NULL);
else return y;
return (12 * PDF_DPI) / 72;
} }
wxCoord TwxPDFDC::GetCharWidth() const wxCoord TwxPDFDC::GetCharWidth() const
{ {
return (wxCoord) (GetCharHeight() * 72.0 / 120.0); wxCoord x = 0;
DoGetTextExtent("M", &x, NULL, NULL, NULL, NULL);
return x;
} }
void TwxPDFDC::DoGetTextExtent(const wxString& text, void TwxPDFDC::DoGetTextExtent(const wxString& text,
@ -758,12 +759,13 @@ void TwxPDFDC::DoGetTextExtent(const wxString& text,
{ {
PDF_TRY_DL(m_PDFlib, m_p) PDF_TRY_DL(m_PDFlib, m_p)
{ {
if ((theFont==NULL&&m_font.Ok()) || (m_font.Ok()&&(*theFont==m_font))) if (d) *d = 0;
if (e) *e = 0;
if (m_font.Ok() && (theFont==NULL || *theFont==m_font))
{ {
if (x) if (x) *x = m_PDFlib->PDF_stringwidth(m_p, text, m_fontnr, m_fontsize);
*x = m_PDFlib->PDF_stringwidth(m_p, text, m_fontnr, m_fontsize); if (y) *y = 5*m_fontsize/4;
if (y) if (d) *d = m_fontsize/4;
*y = m_fontsize;
} }
else else
{ {
@ -774,17 +776,12 @@ void TwxPDFDC::DoGetTextExtent(const wxString& text,
wxString strFamily = theFont->GetFaceName(); wxString strFamily = theFont->GetFaceName();
double fontsize = theFont->GetPointSize(); double fontsize = theFont->GetPointSize();
int fontnr = m_PDFlib->PDF_load_font(m_p, strFamily, 0, "auto", "fontstyle {" + strStyle + "}"); int fontnr = m_PDFlib->PDF_load_font(m_p, strFamily, 0, "auto", "fontstyle {" + strStyle + "}");
if (x) if (x) *x = m_PDFlib->PDF_stringwidth(m_p, text, fontnr, fontsize);
*x = m_PDFlib->PDF_stringwidth(m_p, text, fontnr, fontsize); if (y) *y = 5*fontsize/4;
if (y) if (d) *d = fontsize/4;
*y = fontsize;
} }
} }
if (d)
*d = 0;
if (e)
*e = 0;
} }
PDF_CATCH_DL(m_PDFlib, m_p) PDF_CATCH_DL(m_PDFlib, m_p)
{ {

View File

@ -193,9 +193,9 @@ static int PatternToStyle(PAT_STYLE pat)
case PAT_BDIAG: style = wxBDIAGONAL_HATCH; break; case PAT_BDIAG: style = wxBDIAGONAL_HATCH; break;
case PAT_CROSS: style = wxCROSS_HATCH; break; case PAT_CROSS: style = wxCROSS_HATCH; break;
case PAT_DIAGCROSS: style = wxCROSSDIAG_HATCH; break; case PAT_DIAGCROSS: style = wxCROSSDIAG_HATCH; break;
case PAT_SPECIAL: style = wxSOLID; break; // Used for gradient
case PAT_RUBBER: case PAT_RUBBER:
case PAT_SPECIAL: default: style = wxSOLID; SORRY_BOX(); break;
default: SORRY_BOX(); break;
} }
return style; return style;
} }