Пример #1
0
int gxjport_get_chars_width(int face, int style, int size,
                            const jchar *charArray, int n) {
    if (!gfFontInit) {
        gfFontInit = 1;
        wince_init_fonts();
    }

    return gx_port_get_charswidth(face, style, size, charArray, n);
}
Пример #2
0
int gxjport_get_font_info(int face, int style, int size,
                          int *ascent, int *descent, int *leading) {
    if (!gfFontInit) {
        gfFontInit = 1;
        wince_init_fonts();
    }

    gx_port_get_fontinfo(face, style, size, ascent, descent, leading);

    return KNI_TRUE;
}                            
Пример #3
0
int gxjport_draw_chars(jint pixel, const jshort *clip,
                       gxj_screen_buffer *sbuf, int dotted,
                       int face, int style, int size,
                       int x, int y, int anchor,
                       const jchar *charArray, int n) {
    if (!gfFontInit) {
        gfFontInit = 1;
        wince_init_fonts();
    }

    gx_port_draw_chars(pixel, clip, sbuf, dotted,
        face, style, size, x, y, (TOP | LEFT), charArray, n);

    return KNI_TRUE;
}                           
Пример #4
0
static void init_DirectDraw() {
    /**
     * Note: if DirectDraw fails to initialize, we will use GDI to
     *  draw to do the screenBuffer->LCD copying.
     */
    HRESULT hRet;
    hRet = DirectDrawCreate(NULL, &g_pDD, NULL);
    if (hRet != DD_OK) {
        return;
    }

    hRet = g_pDD->SetCooperativeLevel(hwndMain, DDSCL_NORMAL);
    if (hRet != DD_OK) {
        g_pDD->Release();
        g_pDD = NULL;
        return;
    }

    wince_init_fonts();
}