コード例 #1
0
ファイル: font.cpp プロジェクト: joaormatos/anaconda
FTBBox FTSimpleLayout::BBox(const wchar_t *string, const int len)
{
    FTBBox tmp;
    int lines;
    WrapTextI(string, len, FTPoint(), &tmp, lines);
    return tmp;
}
コード例 #2
0
ファイル: font.cpp プロジェクト: joaormatos/anaconda
int FTSimpleLayout::get_lines(const char * string, const int len)
{
    int lines;
    FTPoint p(0.0f, 0.0f);
    FTBBox tmp;
    WrapTextI(string, len, p, &tmp, lines);
    return lines;
}
コード例 #3
0
ファイル: font.cpp プロジェクト: joaormatos/anaconda
FTBBox FTSimpleLayout::BBoxL(const char *string, const int len)
{
    FTBBox tmp;
    int lines;
    WrapTextI(string, len, FTPoint(), &tmp, lines);
    double h = lines * currentFont->LineHeight();
    tmp.upper.values[1] = tmp.lower.values[1] + h;
    return tmp;
}
コード例 #4
0
ファイル: font.cpp プロジェクト: joaormatos/anaconda
inline void FTSimpleLayout::RenderI(const T *string, const int len,
                                    FTPoint position)
{
    if (!FTTextureFont::custom_shader) {
        Render::set_effect(Render::FONT);
    }
    pen = FTPoint(0.0f, 0.0f);

    int lines;
    WrapTextI(string, len, position, NULL, lines);

    if (!FTTextureFont::custom_shader) {
        Render::disable_effect();
    }
}
コード例 #5
0
ファイル: FTSimpleLayout.cpp プロジェクト: corngood/ftgl
void FTSimpleLayoutImpl::WrapText(const wchar_t* buf, const int len,
                                  FTPoint position, int renderMode,
                                  FTBBox *bounds)
{
    WrapTextI(buf, len, position, renderMode, bounds);
}