当前位置: 首页>>代码示例>>C++>>正文


C++ TextRun::allowTabs方法代码示例

本文整理汇总了C++中TextRun::allowTabs方法的典型用法代码示例。如果您正苦于以下问题:C++ TextRun::allowTabs方法的具体用法?C++ TextRun::allowTabs怎么用?C++ TextRun::allowTabs使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在TextRun的用法示例。


在下文中一共展示了TextRun::allowTabs方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: it

TextRunComponent::TextRunComponent(const UChar *start, int length, const TextRun& parentTextRun, const Font &font, int o)
    : m_textRun(start, length, parentTextRun.allowTabs(), 0, 0
        , parentTextRun.rtl()
        , parentTextRun.directionalOverride()
        , parentTextRun.applyRunRounding()
        , parentTextRun.applyWordRounding())
    , m_offset(o)
    , m_spaces(0)
{
    WidthIterator it(&font, m_textRun);
    it.advance(m_textRun.length(), 0);
    m_width = it.m_runWidthSoFar;
}
开发者ID:dslab-epfl,项目名称:warr,代码行数:13,代码来源:FontWinCE.cpp

示例2: it

TextRunComponent::TextRunComponent(const UChar *start, int length, const TextRun& parentTextRun, const Font &font, int o)
    : m_textRun(start, length, 0, 0
        , parentTextRun.allowsTrailingExpansion() ? TextRun::AllowTrailingExpansion : TextRun::ForbidTrailingExpansion
        , parentTextRun.direction()
        , parentTextRun.directionalOverride())
    , m_offset(o)
    , m_spaces(0)
{
    m_textRun.setTabSize(parentTextRun.allowTabs(), parentTextRun.tabSize());

    WidthIterator it(&font, m_textRun);
    it.advance(m_textRun.length(), 0);
    m_width = it.m_runWidthSoFar;
}
开发者ID:aosm,项目名称:WebCore,代码行数:14,代码来源:FontWinCE.cpp

示例3: ASSERT

ShapeResultSpacing::ShapeResultSpacing(const TextRun& run,
    const FontDescription& fontDescription)
    : m_textRun(run)
    , m_letterSpacing(fontDescription.letterSpacing())
    , m_wordSpacing(fontDescription.wordSpacing())
    , m_expansion(run.expansion())
    , m_expansionPerOpportunity(0)
    , m_expansionOpportunityCount(0)
    , m_textJustify(TextJustify::TextJustifyAuto)
    , m_hasSpacing(false)
    , m_normalizeSpace(run.normalizeSpace())
    , m_allowTabs(run.allowTabs())
    , m_isAfterExpansion(false)
    , m_isVerticalOffset(fontDescription.isVerticalAnyUpright())
{
    if (m_textRun.spacingDisabled())
        return;

    if (!m_letterSpacing && !m_wordSpacing && !m_expansion)
        return;

    m_hasSpacing = true;

    if (!m_expansion)
        return;

    // Setup for justifications (expansions.)
    m_textJustify = run.getTextJustify();
    m_isAfterExpansion = !run.allowsLeadingExpansion();

    bool isAfterExpansion = m_isAfterExpansion;
    m_expansionOpportunityCount = Character::expansionOpportunityCount(run,
        isAfterExpansion);
    if (isAfterExpansion && !run.allowsTrailingExpansion()) {
        ASSERT(m_expansionOpportunityCount > 0);
        --m_expansionOpportunityCount;
    }

    if (m_expansionOpportunityCount)
        m_expansionPerOpportunity = m_expansion / m_expansionOpportunityCount;
}
开发者ID:endlessm,项目名称:chromium-browser,代码行数:41,代码来源:ShapeResultSpacing.cpp


注:本文中的TextRun::allowTabs方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。