Patch level : 4.0
Files correlati : xvaga.dll Ricompilazione Demo : [ ] Commento : Piccola pezza per gestire font con dimensioni piccole in PDF git-svn-id: svn://10.65.10.50/trunk@14230 c028cbd2-c16b-5b4b-a496-9718f37d4682
This commit is contained in:
parent
efc5268bc8
commit
66879a3cef
@ -181,13 +181,12 @@ wxDC* TwxPrintOut::CreateDC(const TPRINT_RCD* prcd, const char* title)
|
|||||||
{
|
{
|
||||||
wxPrintData data;
|
wxPrintData data;
|
||||||
RCD2data(prcd, data);
|
RCD2data(prcd, data);
|
||||||
|
// E' assolutamente necessario risalire al nome "lungo" della stampante
|
||||||
char strName[MAX_PATH];
|
char strName[MAX_PATH];
|
||||||
xvt_print_get_name(prcd, strName, sizeof(strName));
|
xvt_print_get_name(prcd, strName, sizeof(strName));
|
||||||
data.SetPrinterName(strName);
|
data.SetPrinterName(strName);
|
||||||
const bool ispdf = (xvt_str_compare_ignoring_case(strName, XVT_PDF_PRINTER_NAME) == 0);
|
const bool ispdf = (xvt_str_compare_ignoring_case(strName, XVT_PDF_PRINTER_NAME) == 0);
|
||||||
|
|
||||||
// E' assolutamente necessario risalire al nome "lungo" della stampante
|
|
||||||
|
|
||||||
if (ispdf)
|
if (ispdf)
|
||||||
dc = new TwxPDFDC(data, title);
|
dc = new TwxPDFDC(data, title);
|
||||||
else
|
else
|
||||||
|
@ -1,8 +1,6 @@
|
|||||||
#include "wxinc.h"
|
#include "wxinc.h"
|
||||||
#include "xvtpdf.h"
|
#include "xvtpdf.h"
|
||||||
|
|
||||||
#include "math.h"
|
|
||||||
|
|
||||||
#include "wx/log.h"
|
#include "wx/log.h"
|
||||||
#include "wx/icon.h"
|
#include "wx/icon.h"
|
||||||
#include "wx/image.h"
|
#include "wx/image.h"
|
||||||
@ -11,6 +9,7 @@
|
|||||||
#include "wx/dcmemory.h"
|
#include "wx/dcmemory.h"
|
||||||
|
|
||||||
#include "XFont.h"
|
#include "XFont.h"
|
||||||
|
#include <math.h>
|
||||||
|
|
||||||
#define RAD2DEG 57.29577951308
|
#define RAD2DEG 57.29577951308
|
||||||
#define BEZIERK 0.55228475
|
#define BEZIERK 0.55228475
|
||||||
@ -857,6 +856,8 @@ void TwxPDFDC::SetFont( const wxFont& font )
|
|||||||
{
|
{
|
||||||
m_PDFlib->PDF_set_parameter(m_p, "FontOutline", strParameter);
|
m_PDFlib->PDF_set_parameter(m_p, "FontOutline", strParameter);
|
||||||
m_fontsize = font.GetPointSize();
|
m_fontsize = font.GetPointSize();
|
||||||
|
if (m_fontsize < 36) // Warning: bullshit in progress...
|
||||||
|
m_fontsize *= 9;
|
||||||
m_font = font;
|
m_font = font;
|
||||||
m_fontnr = m_PDFlib->PDF_load_font(m_p, strFamily, 0, "host", "");
|
m_fontnr = m_PDFlib->PDF_load_font(m_p, strFamily, 0, "host", "");
|
||||||
|
|
||||||
@ -1017,10 +1018,10 @@ void TwxPDFDC::SetBrush( const wxBrush& brush )
|
|||||||
}
|
}
|
||||||
m_PDFlib->PDF_end_pattern(m_p);
|
m_PDFlib->PDF_end_pattern(m_p);
|
||||||
}
|
}
|
||||||
m_PDFlib->PDF_setcolor(m_p, "fill", "rgb", redPDF, greenPDF, bluePDF, 0);
|
|
||||||
if (!solid)
|
|
||||||
m_PDFlib->PDF_setcolor(m_p, "fill", "pattern", intPatHandle, 0, 0, 0);
|
|
||||||
}
|
}
|
||||||
|
m_PDFlib->PDF_setcolor(m_p, "fill", "rgb", redPDF, greenPDF, bluePDF, 0);
|
||||||
|
if (!solid)
|
||||||
|
m_PDFlib->PDF_setcolor(m_p, "fill", "pattern", intPatHandle, 0, 0, 0);
|
||||||
}
|
}
|
||||||
PDF_CATCH_DL(m_PDFlib, m_p)
|
PDF_CATCH_DL(m_PDFlib, m_p)
|
||||||
{
|
{
|
||||||
|
Loading…
x
Reference in New Issue
Block a user