#include <gr_Win32USPGraphics.h>
Public Member Functions | |
virtual | ~GR_Win32USPGraphics () |
virtual UT_uint32 | getClassId () |
virtual GR_Capability | getCapability () |
virtual void | setFont (const GR_Font *pFont) |
virtual void | drawChars (const UT_UCSChar *pChars, int iCharOffset, int iLength, UT_sint32 xoff, UT_sint32 yoff, int *pCharWidth) |
virtual void | drawCharsRelativeToBaseline (const UT_UCSChar *pChars, int iCharOffset, int iLength, UT_sint32 xoff, UT_sint32 yoff, int *pCharWidths=NULL) |
virtual UT_uint32 | getFontHeight () |
virtual UT_uint32 | getFontAscent () |
virtual UT_uint32 | getFontDescent () |
virtual UT_uint32 | getFontAscent (GR_Font *) |
virtual UT_uint32 | getFontDescent (GR_Font *) |
virtual UT_uint32 | getFontHeight (GR_Font *) |
virtual void | setZoomPercentage (UT_uint32 iZoom) |
virtual bool | itemize (UT_TextIterator &text, GR_Itemization &I) |
virtual bool | shape (GR_ShapingInfo &si, GR_RenderInfo *&ri) |
virtual void | prepareToRenderChars (GR_RenderInfo &ri) |
virtual void | renderChars (GR_RenderInfo &ri) |
virtual void | measureRenderedCharWidths (GR_RenderInfo &ri) |
virtual void | appendRenderedCharsToBuff (GR_RenderInfo &ri, UT_GrowBuf &buf) const |
virtual bool | canBreak (GR_RenderInfo &ri, UT_sint32 &iNext, bool bAfter) |
virtual bool | nativeBreakInfoForRightEdge () |
virtual UT_sint32 | resetJustification (GR_RenderInfo &ri, bool bPermanent) |
virtual UT_sint32 | countJustificationPoints (const GR_RenderInfo &ri) const |
virtual void | justify (GR_RenderInfo &ri) |
virtual UT_uint32 | XYToPosition (const GR_RenderInfo &ri, UT_sint32 x, UT_sint32 y) const |
virtual void | positionToXY (const GR_RenderInfo &ri, UT_sint32 &x, UT_sint32 &y, UT_sint32 &x2, UT_sint32 &y2, UT_sint32 &height, bool &bDirection) const |
virtual UT_sint32 | getTextWidth (GR_RenderInfo &ri) |
virtual bool | needsSpecialCaretPositioning (GR_RenderInfo &ri) |
virtual UT_uint32 | adjustCaretPosition (GR_RenderInfo &ri, bool bForward) |
virtual void | adjustDeletePosition (GR_RenderInfo &ri) |
virtual const UT_VersionInfo & | getVersion () const |
virtual void | setPrintDC (HDC dc) |
Static Public Member Functions | |
static UT_uint32 | s_getClassId () |
static const char * | graphicsDescriptor () |
static const char * | getUSPVersion () |
static GR_Graphics * | graphicsAllocator (GR_AllocInfo &) |
Static Public Attributes | |
static tScriptFreeCache | fScriptFreeCache = NULL |
Protected Member Functions | |
bool | _needsSpecialBreaking (GR_Win32USPRenderInfo &ri) |
bool | _needsSpecialCaretPositioning (GR_Win32USPRenderInfo &ri) |
bool | _scriptBreak (GR_Win32USPRenderInfo &ri) |
GR_Win32USPGraphics (HDC, HWND) | |
GR_Win32USPGraphics (HDC, const DOCINFOW *, HGLOBAL hDevMode=NULL) | |
Static Protected Attributes | |
static tScriptItemize | fScriptItemize = NULL |
static tScriptShape | fScriptShape = NULL |
static tScriptStringOut | fScriptStringOut = NULL |
static tScriptStringAnalyse | fScriptStringAnalyse = NULL |
static tScriptStringFree | fScriptStringFree = NULL |
static tScriptTextOut | fScriptTextOut = NULL |
static tScriptPlace | fScriptPlace = NULL |
static tScriptJustify | fScriptJustify = NULL |
static tScriptCPtoX | fScriptCPtoX = NULL |
static tScriptXtoCP | fScriptXtoCP = NULL |
static tScriptBreak | fScriptBreak = NULL |
static tScriptIsComplex | fScriptIsComplex = NULL |
static tScriptGetProperties | fScriptGetProperties = NULL |
static tScriptRecordDigitSubstitution | fScriptRecordDigitSubstitution = NULL |
Private Member Functions | |
bool | _constructorCommonCode () |
virtual GR_Win32Font * | _newFont (LOGFONTW &lf, double fPoints, HDC hdc, HDC printHDC) |
void | _setupFontOnDC (GR_Win32USPFont *pFont, bool bZoomMe) |
void | _drawChars (const UT_UCSChar *pChars, int iCharOffset, int iLength, UT_sint32 xoff, UT_sint32 yoff, int *pCharWidth) |
Private Attributes | |
bool | m_bConstructorSucceeded |
Static Private Attributes | |
static HINSTANCE | s_hUniscribe = NULL |
static UT_uint32 | s_iInstanceCount = 0 |
static UT_VersionInfo | s_Version |
static const SCRIPT_PROPERTIES ** | s_ppScriptProperties = NULL |
static int | s_iMaxScript = 0 |
static UT_UTF8String | s_sDescription |
static UT_UTF8String | s_sUSPVersion |
GR_Win32USPGraphics::~GR_Win32USPGraphics | ( | ) | [virtual] |
References GR_Graphics::_destroyFonts(), GR_Win32Graphics::m_pFontGUI, s_hUniscribe, and s_iInstanceCount.
GR_Win32USPGraphics::GR_Win32USPGraphics | ( | HDC | hdc, | |
HWND | hwnd | |||
) | [protected] |
References _constructorCommonCode(), and m_bConstructorSucceeded.
Referenced by graphicsAllocator().
GR_Win32USPGraphics::GR_Win32USPGraphics | ( | HDC | hdc, | |
const DOCINFOW * | pDI, | |||
HGLOBAL | hDevMode = NULL | |||
) | [protected] |
References _constructorCommonCode(), and m_bConstructorSucceeded.
bool GR_Win32USPGraphics::_constructorCommonCode | ( | ) | [private] |
References UT_String::c_str(), fScriptGetProperties, XAP_App::getApp(), XAP_App::getPrefs(), HRESULT(), loadUSPFunction, XAP_Prefs::log(), LOG_USP_EXCPT, LOG_USP_EXCPT_X, logScript, s, s_hUniscribe, s_iInstanceCount, s_iMaxScript, s_ppScriptProperties, s_sDescription, s_sUSPVersion, s_Version, UT_VersionInfo::set(), UT_DEBUGMSG, and UT_String_sprintf().
Referenced by GR_Win32USPGraphics().
void GR_Win32USPGraphics::_drawChars | ( | const UT_UCSChar * | pChars, | |
int | iCharOffset, | |||
int | iLength, | |||
UT_sint32 | xoff, | |||
UT_sint32 | yoff, | |||
int * | pCharWidth | |||
) | [private] |
References _setupFontOnDC(), GR_Graphics::_tduX(), GR_Graphics::_tduY(), flags, fScriptStringAnalyse, fScriptStringFree, fScriptStringOut, HRESULT(), LOG_USP_EXCPT_X, GR_Win32Graphics::m_fXYRatio, GR_Win32Graphics::m_hdc, GR_Win32Graphics::m_pFont, UT_ASSERT_HARMLESS, and UT_SHOULD_NOT_HAPPEN.
Referenced by drawChars(), and drawCharsRelativeToBaseline().
bool GR_Win32USPGraphics::_needsSpecialBreaking | ( | GR_Win32USPRenderInfo & | ri | ) | [inline, protected] |
References _SCRIPT_PROPERTIES::fNeedsWordBreaking, GR_Item::getType(), GR_Win32USPRenderInfo::m_bShapingFailed, GR_RenderInfo::m_pItem, s_ppScriptProperties, and UT_return_val_if_fail.
Referenced by canBreak().
bool GR_Win32USPGraphics::_needsSpecialCaretPositioning | ( | GR_Win32USPRenderInfo & | ri | ) | [inline, protected] |
GR_Win32Font * GR_Win32USPGraphics::_newFont | ( | LOGFONTW & | lf, | |
double | fPoints, | |||
HDC | hdc, | |||
HDC | printHDC | |||
) | [private, virtual] |
Reimplemented from GR_Win32Graphics.
References GR_Win32USPFont::newFont().
bool GR_Win32USPGraphics::_scriptBreak | ( | GR_Win32USPRenderInfo & | ri | ) | [inline, protected] |
returns true on success
References _SCRIPT_ITEM::a, GR_Win32USPRenderInfo::allocStaticBuffers(), fScriptBreak, UT_TextIterator::getChar(), UT_TextIterator::getPosition(), UT_TextIterator::getStatus(), GR_Win32USPRenderInfo::getType(), UT_TextIterator::getUpperLimit(), GRRI_WIN32_UNISCRIBE, HRESULT(), GR_RenderInfo::m_iLength, GR_RenderInfo::m_pItem, GR_RenderInfo::m_pText, GR_Win32USPItem::m_si, GR_Win32USPRenderInfo::s_iAdvancesSize, GR_Win32USPRenderInfo::s_pChars, GR_Win32USPRenderInfo::s_pLogAttr, GR_Win32USPRenderInfo::s_pOwnerChar, UT_MIN, and UT_return_val_if_fail.
Referenced by adjustCaretPosition(), adjustDeletePosition(), and canBreak().
void GR_Win32USPGraphics::_setupFontOnDC | ( | GR_Win32USPFont * | pFont, | |
bool | bZoomMe | |||
) | [private] |
References GR_Win32Font::fetchFont(), GR_Font::getAllocNumber(), GR_Win32Graphics::getDeviceResolution(), GR_Win32Font::getFontFromCache(), GR_Win32Font::getPointSize(), GR_Win32Graphics::getPrintDC(), GR_Win32Font::getUnscaledHeight(), GR_Graphics::getZoomPercentage(), GR_Win32Font::isFontGUI(), LOG_USP_EXCPT, LOG_USP_EXCPT_SX, GR_Win32Graphics::m_bPrint, GR_Win32Graphics::m_hdc, GR_Win32Graphics::m_iDCFontAllocNo, GR_Win32Graphics::m_iPrintDCFontAllocNo, GR_Win32Graphics::m_nPrintLogPixelsY, UT_ASSERT_HARMLESS, UT_return_if_fail, and UT_SHOULD_NOT_HAPPEN.
Referenced by _drawChars(), getFontAscent(), getFontDescent(), getFontHeight(), measureRenderedCharWidths(), renderChars(), and shape().
UT_uint32 GR_Win32USPGraphics::adjustCaretPosition | ( | GR_RenderInfo & | ri, | |
bool | bForward | |||
) | [virtual] |
Reimplemented from GR_Graphics.
References _needsSpecialCaretPositioning(), _scriptBreak(), GR_RenderInfo::getType(), GR_RenderInfo::m_iLength, GR_RenderInfo::m_iOffset, and UT_return_val_if_fail.
void GR_Win32USPGraphics::adjustDeletePosition | ( | GR_RenderInfo & | ri | ) | [virtual] |
Reimplemented from GR_Graphics.
References _needsSpecialCaretPositioning(), _scriptBreak(), GR_RenderInfo::getType(), GR_RenderInfo::m_iLength, GR_RenderInfo::m_iOffset, and UT_return_if_fail.
void GR_Win32USPGraphics::appendRenderedCharsToBuff | ( | GR_RenderInfo & | ri, | |
UT_GrowBuf & | buf | |||
) | const [virtual] |
Reimplemented from GR_Graphics.
References UT_NOT_IMPLEMENTED, and UT_return_if_fail.
bool GR_Win32USPGraphics::canBreak | ( | GR_RenderInfo & | ri, | |
UT_sint32 & | iNext, | |||
bool | bAfter | |||
) | [virtual] |
this function should return true if break can occur AFTER the character at indicated position; Uniscribe functions indicate if break can occur BEFORE the character
Reimplemented from GR_Graphics.
References _needsSpecialBreaking(), _scriptBreak(), GR_RenderInfo::getType(), GRRI_WIN32_UNISCRIBE, GR_RenderInfo::m_iLength, GR_RenderInfo::m_iOffset, and UT_return_val_if_fail.
UT_sint32 GR_Win32USPGraphics::countJustificationPoints | ( | const GR_RenderInfo & | ri | ) | const [virtual] |
Reimplemented from GR_Graphics.
References _SCRIPT_ITEM::a, _SCRIPT_PROPERTIES::fNeedsCharacterJustify, _SCRIPT_ANALYSIS::fRTL, GR_Item::getType(), GR_RenderInfo::getType(), GRRI_WIN32_UNISCRIBE, GR_RenderInfo::m_bLastOnLine, GR_RenderInfo::m_pItem, GR_Win32USPItem::m_si, s_ppScriptProperties, SCRIPT_JUSTIFY_ARABIC_ALEF, SCRIPT_JUSTIFY_ARABIC_BA, SCRIPT_JUSTIFY_ARABIC_BARA, SCRIPT_JUSTIFY_ARABIC_BLANK, SCRIPT_JUSTIFY_ARABIC_HA, SCRIPT_JUSTIFY_ARABIC_KASHIDA, SCRIPT_JUSTIFY_ARABIC_NORMAL, SCRIPT_JUSTIFY_ARABIC_RA, SCRIPT_JUSTIFY_ARABIC_SEEN, SCRIPT_JUSTIFY_BLANK, SCRIPT_JUSTIFY_CHARACTER, SCRIPT_JUSTIFY_NONE, SCRIPT_JUSTIFY_RESERVED1, SCRIPT_JUSTIFY_RESERVED2, SCRIPT_JUSTIFY_RESERVED3, and UT_return_val_if_fail.
void GR_Win32USPGraphics::drawChars | ( | const UT_UCSChar * | pChars, | |
int | iCharOffset, | |||
int | iLength, | |||
UT_sint32 | xoff, | |||
UT_sint32 | yoff, | |||
int * | pCharWidth | |||
) | [virtual] |
Reimplemented from GR_Win32Graphics.
References _drawChars(), and GR_Win32Graphics::m_hdc.
void GR_Win32USPGraphics::drawCharsRelativeToBaseline | ( | const UT_UCSChar * | pChars, | |
int | iCharOffset, | |||
int | iLength, | |||
UT_sint32 | xoff, | |||
UT_sint32 | yoff, | |||
int * | pCharWidths = NULL | |||
) | [virtual] |
Reimplemented from GR_Graphics.
References _drawChars(), and GR_Win32Graphics::m_hdc.
virtual GR_Capability GR_Win32USPGraphics::getCapability | ( | ) | [inline, virtual] |
Reimplemented from GR_Win32Graphics.
virtual UT_uint32 GR_Win32USPGraphics::getClassId | ( | ) | [inline, virtual] |
Reimplemented from GR_Win32Graphics.
References GR_Win32Graphics::s_getClassId().
UT_uint32 GR_Win32USPGraphics::getFontAscent | ( | ) | [virtual] |
Reimplemented from GR_Win32Graphics.
References _setupFontOnDC(), GR_Win32Font::getAscent(), GR_Win32Graphics::getPrintDC(), GR_Win32Font::getYHDC(), GR_Win32Graphics::m_hdc, GR_Win32Graphics::m_pFont, and UT_return_val_if_fail.
Referenced by getFontAscent().
References getFontAscent(), GR_Win32Graphics::m_pFont, setFont(), and UT_return_val_if_fail.
UT_uint32 GR_Win32USPGraphics::getFontDescent | ( | ) | [virtual] |
Reimplemented from GR_Win32Graphics.
References _setupFontOnDC(), GR_Win32Font::getDescent(), GR_Win32Graphics::getPrintDC(), GR_Win32Font::getYHDC(), GR_Win32Graphics::m_hdc, GR_Win32Graphics::m_pFont, and UT_return_val_if_fail.
Referenced by getFontDescent().
References getFontDescent(), GR_Win32Graphics::m_pFont, setFont(), and UT_return_val_if_fail.
UT_uint32 GR_Win32USPGraphics::getFontHeight | ( | ) | [virtual] |
Reimplemented from GR_Win32Graphics.
References _setupFontOnDC(), GR_Win32Font::getHeight(), GR_Win32Graphics::getPrintDC(), GR_Win32Font::getYHDC(), GR_Win32Graphics::m_hdc, GR_Win32Graphics::m_pFont, and UT_return_val_if_fail.
Referenced by getFontHeight().
References getFontHeight(), GR_Win32Graphics::m_pFont, setFont(), and UT_return_val_if_fail.
UT_sint32 GR_Win32USPGraphics::getTextWidth | ( | GR_RenderInfo & | ri | ) | [virtual] |
Reimplemented from GR_Graphics.
References _SCRIPT_ITEM::a, _SCRIPT_ANALYSIS::fRTL, GR_Win32Graphics::getPrintDC(), GR_Win32USPFont::getPrintDC(), GR_RenderInfo::getType(), GR_RenderInfo::m_iLength, GR_RenderInfo::m_iOffset, GR_RenderInfo::m_pFont, GR_RenderInfo::m_pItem, GR_Win32USPItem::m_si, measureRenderedCharWidths(), and UT_return_val_if_fail.
const char * GR_Win32USPGraphics::getUSPVersion | ( | ) | [static] |
References s_sUSPVersion, and UT_UTF8String::utf8_str().
Referenced by XAP_Win32Dialog_About::runModal().
virtual const UT_VersionInfo& GR_Win32USPGraphics::getVersion | ( | ) | const [inline, virtual] |
Reimplemented from GR_Graphics.
GR_Graphics * GR_Win32USPGraphics::graphicsAllocator | ( | GR_AllocInfo & | info | ) | [static] |
Reimplemented from GR_Win32Graphics.
References GR_AllocInfo::getType(), GR_Win32USPGraphics(), m_bConstructorSucceeded, and UT_return_val_if_fail.
Referenced by XAP_Win32App::XAP_Win32App().
const char * GR_Win32USPGraphics::graphicsDescriptor | ( | ) | [static] |
Reimplemented from GR_Win32Graphics.
References s_sDescription, and UT_UTF8String::utf8_str().
Referenced by XAP_Win32App::XAP_Win32App().
bool GR_Win32USPGraphics::itemize | ( | UT_TextIterator & | text, | |
GR_Itemization & | I | |||
) | [virtual] |
Reimplemented from GR_Graphics.
References GR_Itemization::addItem(), _SCRIPT_CONTROL::fContextDigits, _SCRIPT_CONTROL::fInvertPostBoundDir, _SCRIPT_CONTROL::fInvertPreBoundDir, _SCRIPT_CONTROL::fLegacyBidiClass, _SCRIPT_CONTROL::fLinkStringAfter, _SCRIPT_CONTROL::fLinkStringBefore, _SCRIPT_CONTROL::fNeutralOverride, _SCRIPT_CONTROL::fNumericOverride, _SCRIPT_CONTROL::fReserved, FRIBIDI_TYPE_UNSET, fScriptItemize, UT_TextIterator::getChar(), GR_Itemization::getDirOverride(), GR_Itemization::getEmbedingLevel(), GR_Itemization::getLang(), UT_TextIterator::getPosition(), GR_Itemization::getShowControlChars(), UT_TextIterator::getStatus(), UT_TextIterator::getUpperLimit(), GRScriptType_Void, GRWIN32USP_CHARBUFF_SIZE, GRWIN32USP_ITEMBUFF_SIZE, HRESULT(), _SCRIPT_CONTROL::uDefaultLanguage, UT_DEBUGMSG, UT_return_val_if_fail, and wvLangToLIDConverter().
void GR_Win32USPGraphics::justify | ( | GR_RenderInfo & | ri | ) | [virtual] |
Reimplemented from GR_Graphics.
References _SCRIPT_ITEM::a, _SCRIPT_ANALYSIS::fRTL, GR_RenderInfo::getType(), GRRI_WIN32_UNISCRIBE, GR_RenderInfo::m_pItem, GR_Win32USPItem::m_si, SCRIPT_JUSTIFY_ARABIC_KASHIDA, UT_ASSERT_HARMLESS, and UT_return_if_fail.
void GR_Win32USPGraphics::measureRenderedCharWidths | ( | GR_RenderInfo & | ri | ) | [virtual] |
Reimplemented from GR_Graphics.
References _setupFontOnDC(), fScriptFreeCache, fScriptPlace, GR_Win32Graphics::getDeviceResolution(), GR_Win32Font::getPointSize(), GR_Win32Graphics::getPrintDC(), GR_Win32USPFont::getPrintDC(), GR_Graphics::getResolution(), GR_Win32USPFont::getScriptCache(), GR_RenderInfo::getType(), GR_Graphics::getZoomPercentage(), GR_WIN32_USP_FONT_SCALING, GRRI_WIN32_UNISCRIBE, HRESULT(), LOG_USP_EXCPT_X, GR_Win32Graphics::m_bPrint, GR_Win32Graphics::m_fXYRatio, GR_Win32Graphics::m_fXYRatioPrint, GR_Win32Graphics::m_hdc, GR_Win32Graphics::m_nPrintLogPixelsY, GR_RenderInfo::m_pFont, GR_Win32Graphics::m_printHDC, GR_Win32Font::setAscent(), GR_Win32Font::setDescent(), GR_Win32Font::setHeight(), GR_Win32USPFont::setPrintDC(), UT_ASSERT_HARMLESS, UT_GetDefaultPrinterDC(), UT_return_if_fail, and UT_SHOULD_NOT_HAPPEN.
Referenced by getTextWidth(), and prepareToRenderChars().
virtual bool GR_Win32USPGraphics::nativeBreakInfoForRightEdge | ( | ) | [inline, virtual] |
Reimplemented from GR_Graphics.
bool GR_Win32USPGraphics::needsSpecialCaretPositioning | ( | GR_RenderInfo & | ri | ) | [virtual] |
Reimplemented from GR_Graphics.
References _needsSpecialCaretPositioning(), GR_RenderInfo::getType(), and UT_return_val_if_fail.
void GR_Win32USPGraphics::positionToXY | ( | const GR_RenderInfo & | ri, | |
UT_sint32 & | x, | |||
UT_sint32 & | y, | |||
UT_sint32 & | x2, | |||
UT_sint32 & | y2, | |||
UT_sint32 & | height, | |||
bool & | bDirection | |||
) | const [virtual] |
Reimplemented from GR_Graphics.
References _SCRIPT_ITEM::a, fScriptCPtoX, GR_RenderInfo::getType(), HRESULT(), LOG_USP_EXCPT_X, GR_RenderInfo::m_pItem, GR_Win32USPItem::m_si, UT_ASSERT_HARMLESS, UT_return_if_fail, and UT_SHOULD_NOT_HAPPEN.
void GR_Win32USPGraphics::prepareToRenderChars | ( | GR_RenderInfo & | ri | ) | [virtual] |
Reimplemented from GR_Graphics.
References GR_Graphics::_tduX(), GR_Win32Font::getPointSize(), GR_Win32Graphics::getPrintDC(), GR_Win32USPFont::getPrintDC(), GR_RenderInfo::getType(), GR_Graphics::getZoomPercentage(), GR_Win32Graphics::m_fXYRatio, measureRenderedCharWidths(), GR_Win32USPFont::setScreenAscent(), GR_Graphics::tdu(), and UT_return_if_fail.
void GR_Win32USPGraphics::renderChars | ( | GR_RenderInfo & | ri | ) | [virtual] |
The offset passed to us as part of ri is a visual offset
Reimplemented from GR_Graphics.
References _setupFontOnDC(), GR_Graphics::_tduX(), GR_Graphics::_tduY(), _SCRIPT_ITEM::a, _SCRIPT_ANALYSIS::fRTL, fScriptFreeCache, fScriptTextOut, GR_Win32Graphics::getDeviceResolution(), GR_Graphics::getResolution(), GR_Win32USPFont::getScreenAscent(), GR_Win32USPFont::getScriptCache(), GR_Win32Font::getTextMetric(), GR_RenderInfo::getType(), GR_Graphics::getZoomPercentage(), HRESULT(), LOG_USP_EXCPT_X, GR_Win32Graphics::m_bPrint, GR_Win32Graphics::m_fXYRatio, GR_Win32Graphics::m_hdc, GR_RenderInfo::m_pFont, GR_RenderInfo::m_pItem, GR_Win32USPItem::m_si, GR_Win32USPFont::setScreenAscent(), UT_ASSERT_HARMLESS, UT_return_if_fail, and UT_SHOULD_NOT_HAPPEN.
UT_sint32 GR_Win32USPGraphics::resetJustification | ( | GR_RenderInfo & | ri, | |
bool | bPermanent | |||
) | [virtual] |
Reimplemented from GR_Graphics.
References GR_RenderInfo::getType(), and UT_return_val_if_fail.
static UT_uint32 GR_Win32USPGraphics::s_getClassId | ( | ) | [inline, static] |
Reimplemented from GR_Win32Graphics.
Referenced by XAP_Win32App::XAP_Win32App().
void GR_Win32USPGraphics::setFont | ( | const GR_Font * | pFont | ) | [virtual] |
The USP library maintains an internal font cache, which allows it to avoid accessing the DC for things like measuring fonts, etc. This means that often it is not necessary to have the font selected into the DC, and as SelectObject() is very time consuming, we will not be calling it from here at all, instead, we will only note which font is being set and call SelectObject() from inside the functions that access the DC only if that is necessary.
Reimplemented from GR_Win32Graphics.
References GR_Font::getAllocNumber(), GR_Graphics::m_iFontAllocNo, GR_Win32Graphics::m_pFont, and UT_ASSERT_HARMLESS.
Referenced by getFontAscent(), getFontDescent(), and getFontHeight().
void GR_Win32USPGraphics::setPrintDC | ( | HDC | dc | ) | [virtual] |
Reimplemented from GR_Win32Graphics.
References AV_View::fontMetricsChange(), XAP_App::getApp(), XAP_Frame::getCurrentView(), XAP_App::getFrame(), XAP_App::getFrameCount(), AV_View::getGraphics(), GR_Win32Graphics::getPrintDC(), GR_Win32Graphics::m_bPrint, GR_Win32Graphics::m_defPrintHDC, GR_Win32Graphics::m_fXYRatioPrint, GR_Win32Graphics::m_nPrintLogPixelsY, GR_Win32Graphics::m_printHDC, UT_ASSERT_HARMLESS, UT_return_if_fail, and UT_SHOULD_NOT_HAPPEN.
void GR_Win32USPGraphics::setZoomPercentage | ( | UT_uint32 | iZoom | ) | [virtual] |
bool GR_Win32USPGraphics::shape | ( | GR_ShapingInfo & | si, | |
GR_RenderInfo *& | ri | |||
) | [virtual] |
Reimplemented from GR_Graphics.
References _setupFontOnDC(), _SCRIPT_DIGITSUBSTITUTE::DigitSubstitute, fScriptIsComplex, fScriptRecordDigitSubstitution, fScriptShape, UT_TextIterator::getChar(), GR_Item::getClassId(), UT_TextIterator::getStatus(), GR_RenderInfo::getType(), GRRI_WIN32_UNISCRIBE, GRWIN32USP_CHARBUFF_SIZE, HRESULT(), GR_Win32USPRenderInfo::m_bNeedsReshaping, GR_Win32USPRenderInfo::m_bShapingFailed, GR_RenderInfo::m_eShapingResult, GR_Win32Graphics::m_hdc, GR_Win32USPRenderInfo::m_iCharCount, GR_Win32USPRenderInfo::m_iClustSize, GR_Win32USPRenderInfo::m_iIndicesCount, GR_Win32USPRenderInfo::m_iIndicesSize, GR_RenderInfo::m_iLength, GR_ShapingInfo::m_iLength, GR_ShapingInfo::m_iVisDir, GR_Win32USPRenderInfo::m_pAdvances, GR_Win32USPRenderInfo::m_pClust, GR_RenderInfo::m_pFont, GR_ShapingInfo::m_pFont, GR_Win32USPRenderInfo::m_pGoffsets, GR_Win32USPRenderInfo::m_pIndices, GR_RenderInfo::m_pItem, GR_ShapingInfo::m_pItem, GR_Win32USPRenderInfo::m_pJustify, GR_Win32Graphics::m_printHDC, GR_Win32USPRenderInfo::m_pVisAttr, GR_ShapingInfo::m_Text, GR_Win32USPRenderInfo::s_pOwnerChar, GR_Win32USPRenderInfo::s_pOwnerDraw, SCRIPT_DIGITSUBSTITUTE_NONE, UT_ASSERT_HARMLESS, UT_BIDI_RTL, UT_DEBUGMSG, UT_return_val_if_fail, and UT_SHOULD_NOT_HAPPEN.
UT_uint32 GR_Win32USPGraphics::XYToPosition | ( | const GR_RenderInfo & | ri, | |
UT_sint32 | x, | |||
UT_sint32 | y | |||
) | const [virtual] |
Reimplemented from GR_Graphics.
References _SCRIPT_ITEM::a, fScriptXtoCP, GR_RenderInfo::getType(), HRESULT(), LOG_USP_EXCPT_X, GR_RenderInfo::m_pItem, GR_Win32USPItem::m_si, UT_ASSERT_HARMLESS, UT_return_val_if_fail, and UT_SHOULD_NOT_HAPPEN.
tScriptBreak GR_Win32USPGraphics::fScriptBreak = NULL [static, protected] |
Referenced by _scriptBreak().
tScriptCPtoX GR_Win32USPGraphics::fScriptCPtoX = NULL [static, protected] |
Referenced by positionToXY().
tScriptFreeCache GR_Win32USPGraphics::fScriptFreeCache = NULL [static] |
tScriptGetProperties GR_Win32USPGraphics::fScriptGetProperties = NULL [static, protected] |
Referenced by _constructorCommonCode().
tScriptIsComplex GR_Win32USPGraphics::fScriptIsComplex = NULL [static, protected] |
Referenced by shape().
tScriptItemize GR_Win32USPGraphics::fScriptItemize = NULL [static, protected] |
Referenced by itemize().
tScriptJustify GR_Win32USPGraphics::fScriptJustify = NULL [static, protected] |
tScriptPlace GR_Win32USPGraphics::fScriptPlace = NULL [static, protected] |
Referenced by measureRenderedCharWidths().
tScriptRecordDigitSubstitution GR_Win32USPGraphics::fScriptRecordDigitSubstitution = NULL [static, protected] |
Referenced by shape().
tScriptShape GR_Win32USPGraphics::fScriptShape = NULL [static, protected] |
Referenced by shape().
tScriptStringAnalyse GR_Win32USPGraphics::fScriptStringAnalyse = NULL [static, protected] |
Referenced by _drawChars().
tScriptStringFree GR_Win32USPGraphics::fScriptStringFree = NULL [static, protected] |
Referenced by _drawChars().
tScriptStringOut GR_Win32USPGraphics::fScriptStringOut = NULL [static, protected] |
Referenced by _drawChars().
tScriptTextOut GR_Win32USPGraphics::fScriptTextOut = NULL [static, protected] |
Referenced by renderChars().
tScriptXtoCP GR_Win32USPGraphics::fScriptXtoCP = NULL [static, protected] |
Referenced by XYToPosition().
bool GR_Win32USPGraphics::m_bConstructorSucceeded [private] |
Referenced by GR_Win32USPGraphics(), and graphicsAllocator().
HINSTANCE GR_Win32USPGraphics::s_hUniscribe = NULL [static, private] |
Referenced by _constructorCommonCode(), and ~GR_Win32USPGraphics().
UT_uint32 GR_Win32USPGraphics::s_iInstanceCount = 0 [static, private] |
Reimplemented from GR_Win32Graphics.
Referenced by _constructorCommonCode(), and ~GR_Win32USPGraphics().
int GR_Win32USPGraphics::s_iMaxScript = 0 [static, private] |
Referenced by _constructorCommonCode().
const SCRIPT_PROPERTIES ** GR_Win32USPGraphics::s_ppScriptProperties = NULL [static, private] |
UT_UTF8String GR_Win32USPGraphics::s_sDescription [static, private] |
Referenced by _constructorCommonCode(), and graphicsDescriptor().
UT_UTF8String GR_Win32USPGraphics::s_sUSPVersion [static, private] |
Referenced by _constructorCommonCode(), and getUSPVersion().
UT_VersionInfo GR_Win32USPGraphics::s_Version [static, private] |
Reimplemented from GR_Graphics.
Referenced by _constructorCommonCode().