Ejemplo n.º 1
0
FTBBox FTSimpleLayout::BBox(const wchar_t *string, const int len)
{
    FTBBox tmp;
    int lines;
    WrapTextI(string, len, FTPoint(), &tmp, lines);
    return tmp;
}
Ejemplo n.º 2
0
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;
}
Ejemplo n.º 3
0
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;
}
Ejemplo n.º 4
0
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();
    }
}
Ejemplo n.º 5
0
void FTSimpleLayoutImpl::WrapText(const wchar_t* buf, const int len,
                                  FTPoint position, int renderMode,
                                  FTBBox *bounds)
{
    WrapTextI(buf, len, position, renderMode, bounds);
}