Skip to content
Permalink
Browse files

Add support for Color Emoji (WIP) (4)

  • Loading branch information
sdottaka committed Nov 30, 2019
1 parent 51e7d9b commit 38644279f2e61e4c61cb3e16c5f28c3d8e362fc7
@@ -2975,6 +2975,9 @@ OnBeginPrinting (CDC * pdc, CPrintInfo * pInfo)
lf.lfWidth = MulDiv (lf.lfWidth, pdc->GetDeviceCaps (LOGPIXELSX), pDisplayDC->GetDeviceCaps (LOGPIXELSX));
ReleaseDC (pDisplayDC);

m_pCrystalRendererSaved = m_pCrystalRenderer.release();
m_pCrystalRenderer.reset(new CCrystalRendererGDI());

m_pPrintFont = new CFont;
if (!m_pPrintFont->CreateFontIndirect (&lf))
{
@@ -2994,6 +2997,8 @@ OnBeginPrinting (CDC * pdc, CPrintInfo * pInfo)
void CCrystalTextView::
OnEndPrinting (CDC * pdc, CPrintInfo * pInfo)
{
m_pCrystalRenderer.reset(m_pCrystalRendererSaved);

if (m_pPrintFont != nullptr)
{
delete m_pPrintFont;
@@ -3031,8 +3036,11 @@ OnPrint (CDC * pdc, CPrintInfo * pInfo)
TRACE (_T ("Printing page %d of %d, lines %d - %d\n"),
pInfo->m_nCurPage, m_nPrintPages, nTopLine, nEndLine);

pdc->SetTextColor(defaultLineColor);
pdc->SetBkColor(defaultBgColor);
m_pCrystalRenderer->BindDC(*pdc, m_rcPrintArea);
m_pCrystalRenderer->BeginDraw();

m_pCrystalRenderer->SetTextColor(defaultLineColor);
m_pCrystalRenderer->SetBkColor(defaultBgColor);

if (m_bPrintHeader)
{
@@ -3079,9 +3087,6 @@ OnPrint (CDC * pdc, CPrintInfo * pInfo)
rcLine.OffsetRect( 0, nSubLineOffset * nLineHeight );
}

m_pCrystalRenderer->BindDC(*pdc, m_rcPrintArea);
m_pCrystalRenderer->BeginDraw();

int nLineCount = GetLineCount();
int nCurrentLine;
for (nCurrentLine = nTopLine; nCurrentLine <= nEndLine; nCurrentLine++)
@@ -731,6 +731,7 @@ public :
ICUBreakIterator m_iterChar;
ICUBreakIterator m_iterWord;
std::unique_ptr<CCrystalRenderer> m_pCrystalRenderer;
CCrystalRenderer *m_pCrystalRendererSaved;

typedef enum
{

0 comments on commit 3864427

Please sign in to comment.
You can’t perform that action at this time.