encapsulates output of GR_Graphics::shape() which is passed as input to GR_Graphics::renderChars(). More...
#include <gr_RenderInfo.h>
Public Member Functions | |
GR_RenderInfo (GR_ScriptType type) | |
virtual | ~GR_RenderInfo () |
virtual GRRI_Type | getType () const =0 |
virtual bool | append (GR_RenderInfo &ri, bool bReverse=false)=0 |
virtual bool | split (GR_RenderInfo *&pri, bool bReverse=false)=0 |
virtual bool | cut (UT_uint32 offset, UT_uint32 len, bool bReverse=false)=0 |
virtual bool | canAppend (GR_RenderInfo &ri) const |
virtual bool | isJustified () const =0 |
Public Attributes | |
UT_sint32 | m_iOffset |
UT_sint32 | m_iLength |
GRShapingResult | m_eShapingResult |
GRShapingResult | m_eState |
GR_ScriptType | m_eScriptType |
UT_TextIterator * | m_pText |
UT_BidiCharType | m_iVisDir |
UT_sint32 | m_xoff |
UT_sint32 | m_yoff |
const GR_Graphics * | m_pGraphics |
const GR_Font * | m_pFont |
UT_sint32 | m_iJustificationPoints |
UT_sint32 | m_iJustificationAmount |
bool | m_bLastOnLine |
const GR_Item * | m_pItem |
bool | m_bInvalidateFontCache |
Private Member Functions | |
GR_RenderInfo () | |
never to be implemented (constructor always has to set m_eScriptType to actual value) |
encapsulates output of GR_Graphics::shape() which is passed as input to GR_Graphics::renderChars().
This is abstract class and suitable functionality is to be provided by platform code.
Notes on append(), split() and cut()
These functions allow our fp_TextRun to merge with next or to split into two without having to know about various platform dependent chaches that speed up shaping and drawing; append() joins all such chaches, while split() splits them into two. Before spliting, split() must allocate appropriate GR_FERenderInfo into pri.
cut() attempts to remove a section of length iLen starting at offset without re-shaping the whole buffer; if it succeeds it returns true; if it fails and the chaches need to be re-calculated it return false (it should not carry out the reshaping per se)
m_iOffset and m_iLength contain offset and length pertinent to the current operation and their state is undefined: the user should always set them if the function to which GR_RenderInfo is passed is going to use them
GR_RenderInfo::GR_RenderInfo | ( | GR_ScriptType | type | ) | [inline] |
virtual GR_RenderInfo::~GR_RenderInfo | ( | ) | [inline, virtual] |
GR_RenderInfo::GR_RenderInfo | ( | ) | [inline, private] |
never to be implemented (constructor always has to set m_eScriptType to actual value)
virtual bool GR_RenderInfo::append | ( | GR_RenderInfo & | ri, | |
bool | bReverse = false | |||
) | [pure virtual] |
Implemented in GR_Win32USPRenderInfo, GR_PangoRenderInfo, and GR_XPRenderInfo.
virtual bool GR_RenderInfo::canAppend | ( | GR_RenderInfo & | ri | ) | const [inline, virtual] |
Reimplemented in GR_PangoRenderInfo.
References m_eScriptType.
Referenced by fp_TextRun::canMergeWithNext().
virtual bool GR_RenderInfo::cut | ( | UT_uint32 | offset, | |
UT_uint32 | len, | |||
bool | bReverse = false | |||
) | [pure virtual] |
Implemented in GR_Win32USPRenderInfo, GR_PangoRenderInfo, and GR_XPRenderInfo.
Referenced by fp_TextRun::updateOnDelete().
virtual GRRI_Type GR_RenderInfo::getType | ( | ) | const [pure virtual] |
Implemented in GR_Win32USPRenderInfo, GR_PangoRenderInfo, and GR_XPRenderInfo.
Referenced by fp_TextRun::_draw(), fp_TextRun::_refreshDrawBuffer(), GR_Win32USPGraphics::adjustCaretPosition(), GR_CairoGraphics::adjustCaretPosition(), GR_Win32USPGraphics::adjustDeletePosition(), GR_CairoGraphics::adjustDeletePosition(), GR_Graphics::appendRenderedCharsToBuff(), GR_Win32USPGraphics::canBreak(), GR_CairoGraphics::canBreak(), GR_Win32USPGraphics::countJustificationPoints(), GR_Graphics::countJustificationPoints(), GR_CairoGraphics::countJustificationPoints(), fp_TextRun::findPointCoords(), GR_Win32USPGraphics::getTextWidth(), GR_Graphics::getTextWidth(), GR_CairoGraphics::getTextWidth(), GR_Win32USPGraphics::justify(), GR_Graphics::justify(), GR_CairoGraphics::justify(), fp_TextRun::mapXYToPosition(), GR_Win32USPGraphics::measureRenderedCharWidths(), GR_Graphics::measureRenderedCharWidths(), GR_CairoGraphics::measureRenderedCharWidths(), GR_Win32USPGraphics::needsSpecialCaretPositioning(), GR_Win32USPGraphics::positionToXY(), GR_Graphics::positionToXY(), GR_CairoGraphics::positionToXY(), GR_Win32USPGraphics::prepareToRenderChars(), GR_Graphics::prepareToRenderChars(), GR_CairoGraphics::prepareToRenderChars(), GR_Win32USPGraphics::renderChars(), GR_Graphics::renderChars(), GR_CairoGraphics::renderChars(), GR_Win32USPGraphics::resetJustification(), GR_Graphics::resetJustification(), GR_CairoGraphics::resetJustification(), GR_Win32USPGraphics::shape(), GR_CairoGraphics::shape(), GR_Win32USPGraphics::XYToPosition(), GR_Graphics::XYToPosition(), and GR_CairoGraphics::XYToPosition().
virtual bool GR_RenderInfo::isJustified | ( | ) | const [pure virtual] |
Implemented in GR_Win32USPRenderInfo, GR_PangoRenderInfo, and GR_XPRenderInfo.
virtual bool GR_RenderInfo::split | ( | GR_RenderInfo *& | pri, | |
bool | bReverse = false | |||
) | [pure virtual] |
Implemented in GR_Win32USPRenderInfo, GR_PangoRenderInfo, and GR_XPRenderInfo.
Referenced by GR_XPRenderInfo::cut(), GR_Graphics::shape(), GR_Win32USPRenderInfo::split(), and fp_TextRun::updateOnDelete().
Referenced by fp_TextRun::_addupCharWidths(), GR_XPRenderInfo::_calculateCharAdvances(), GR_XPRenderInfo::_checkAndFixStaticBuffers(), fp_TextRun::_draw(), fp_TextRun::_drawFirstChar(), fp_TextRun::_drawInvisibleSpaces(), fp_TextRun::_drawLastChar(), fp_TextRun::_getPartRect(), GR_Win32USPGraphics::_scriptBreak(), GR_XPRenderInfo::_stripLigaturePlaceHolders(), GR_Win32USPGraphics::adjustCaretPosition(), fp_TextRun::adjustCaretPosition(), GR_Win32USPGraphics::adjustDeletePosition(), GR_CairoGraphics::adjustDeletePosition(), fp_TextRun::adjustDeletePosition(), GR_XPRenderInfo::append(), GR_Win32USPGraphics::canBreak(), GR_CairoGraphics::canBreak(), fp_TextRun::canBreakAfter(), fp_TextRun::canBreakBefore(), fp_TextRun::countJustificationPoints(), GR_XPRenderInfo::cut(), fp_TextRun::findMaxLeftFitSplitPoint(), fp_TextRun::findPointCoords(), fp_TextRun::findTrailingSpaceDistance(), GR_Win32USPGraphics::getTextWidth(), GR_Graphics::getTextWidth(), fp_TextRun::justify(), fp_TextRun::mapXYToPosition(), fp_TextRun::measureCharWidths(), GR_CairoGraphics::needsSpecialCaretPositioning(), fp_TextRun::resetJustification(), GR_Win32USPGraphics::shape(), GR_Graphics::shape(), GR_CairoGraphics::shape(), fp_TextRun::simpleRecalcWidth(), GR_XPRenderInfo::split(), and fp_TextRun::updateOnDelete().
Referenced by fp_TextRun::_addupCharWidths(), fp_TextRun::_draw(), fp_TextRun::_drawFirstChar(), fp_TextRun::_drawInvisibleSpaces(), fp_TextRun::_drawLastChar(), fp_TextRun::_getPartRect(), GR_Win32USPGraphics::adjustCaretPosition(), GR_Graphics::adjustCaretPosition(), GR_CairoGraphics::adjustCaretPosition(), fp_TextRun::adjustCaretPosition(), GR_Win32USPGraphics::adjustDeletePosition(), GR_CairoGraphics::adjustDeletePosition(), fp_TextRun::adjustDeletePosition(), GR_Win32USPGraphics::canBreak(), GR_Graphics::canBreak(), GR_CairoGraphics::canBreak(), fp_TextRun::canBreakAfter(), fp_TextRun::canBreakBefore(), fp_TextRun::findMaxLeftFitSplitPoint(), fp_TextRun::findPointCoords(), fp_TextRun::findTrailingSpaceDistance(), GR_Win32USPGraphics::getTextWidth(), GR_Graphics::getTextWidth(), fp_TextRun::measureCharWidths(), fp_TextRun::simpleRecalcWidth(), GR_Win32USPRenderInfo::split(), and GR_XPRenderInfo::split().
const GR_Font* GR_RenderInfo::m_pFont |
Referenced by fp_TextRun::_addupCharWidths(), fp_TextRun::_draw(), fp_TextRun::_drawFirstChar(), fp_TextRun::_drawLastChar(), GR_Win32USPGraphics::getTextWidth(), fp_TextRun::measureCharWidths(), GR_Win32USPGraphics::measureRenderedCharWidths(), GR_Win32USPGraphics::renderChars(), GR_Win32USPGraphics::shape(), GR_CairoGraphics::shape(), GR_Win32USPRenderInfo::split(), and GR_PangoRenderInfo::split().
const GR_Item* GR_RenderInfo::m_pItem |
Referenced by GR_Win32USPGraphics::_needsSpecialBreaking(), GR_Win32USPGraphics::_needsSpecialCaretPositioning(), GR_Win32USPGraphics::_scriptBreak(), GR_CairoGraphics::_scriptBreak(), GR_PangoRenderInfo::canAppend(), GR_Win32USPGraphics::countJustificationPoints(), GR_Win32USPGraphics::getTextWidth(), GR_Win32USPGraphics::justify(), GR_Win32USPGraphics::positionToXY(), GR_CairoGraphics::positionToXY(), GR_Win32USPGraphics::renderChars(), fp_TextRun::setItem(), GR_Win32USPGraphics::shape(), GR_Graphics::shape(), GR_CairoGraphics::shape(), GR_Win32USPRenderInfo::split(), GR_XPRenderInfo::split(), GR_PangoRenderInfo::split(), and GR_Win32USPGraphics::XYToPosition().
Referenced by fp_TextRun::_draw(), fp_TextRun::_drawFirstChar(), fp_TextRun::_drawLastChar(), GR_Win32USPGraphics::_scriptBreak(), GR_CairoGraphics::_scriptBreak(), GR_XPRenderInfo::_stripLigaturePlaceHolders(), fp_TextRun::adjustCaretPosition(), fp_TextRun::adjustDeletePosition(), GR_Graphics::canBreak(), fp_TextRun::canBreakAfter(), fp_TextRun::canBreakBefore(), fp_TextRun::countJustificationPoints(), GR_XPRenderInfo::cut(), fp_TextRun::findMaxLeftFitSplitPoint(), fp_TextRun::findPointCoords(), GR_PangoRenderInfo::getUTF8Text(), fp_TextRun::justify(), fp_TextRun::mapXYToPosition(), GR_CairoGraphics::needsSpecialCaretPositioning(), and fp_TextRun::updateOnDelete().
Referenced by GR_XPRenderInfo::_calculateCharAdvances(), fp_TextRun::_draw(), and fp_TextRun::_drawLastChar().
Referenced by fp_TextRun::_draw().