Пример #1
0
epx_backend_t* none_init(epx_dict_t* param)
{
    none_backend_t* be;

    (void) param;

    if (!(be = (none_backend_t*) malloc(sizeof(none_backend_t))))
	return 0;
    EPX_OBJECT_INIT((epx_backend_t*)be, EPX_BACKEND_TYPE);
    be->b.name = "none";
    be->b.on_heap = 1;
    be->b.refc = 1;
    be->b.pending = 0;
    be->b.opengl = 0;
    be->b.use_opengl = 0;
    be->b.width = 0;
    be->b.height = 0;
    be->b.nformats = 0;
    be->b.cb = &none_callbacks;
    epx_object_list_init(&be->b.pixmap_list);
    epx_object_list_init(&be->b.window_list);
    be->b.event = EPX_INVALID_HANDLE;

    return (epx_backend_t*) &(be->b);
}
Пример #2
0
void epx_gc_init(epx_gc_t* gc)
{
    EPX_OBJECT_INIT(gc, EPX_GC_TYPE);

    gc->fill_style        = EPX_FILL_STYLE_SOLID;
    gc->fill_color        = epx_pixel_red;
    gc->fill_texture      = 0;

    gc->line_style        = EPX_LINE_STYLE_SOLID;
    gc->line_join_style   = EPX_JOIN_STYLE_MITER;
    gc->line_cap_style    = EPX_CAP_STYLE_NONE;
    gc->line_width        = 1;
    gc->line_texture      = 0;

    gc->border_style      = EPX_BORDER_STYLE_SOLID;
    gc->border_join_style = EPX_JOIN_STYLE_MITER;
    gc->border_cap_style  = EPX_CAP_STYLE_NONE;
    gc->border_color      = epx_pixel_black;
    gc->border_width      = 0;
    gc->border_texture    = 0;

    gc->foreground_color = epx_pixel_blue;
    gc->background_color = epx_pixel_green;

    gc->fader_value      = ALPHA_FACTOR_1;  // 1.0

    gc->font = 0;

    gc->glyph_delta_x     = 0;
    gc->glyph_delta_y     = 0;
    gc->glyph_fixed_width = 0;
    gc->glyph_dot_kern    = 0;
}
Пример #3
0
void epx_anim_init(epx_animation_t* anim)
{
    EPX_OBJECT_INIT(anim, EPX_ANIM_TYPE);

    memset(&anim->hdr, 0, sizeof(epx_animation_header_t));
    anim->file_name = NULL;
    anim->offset_array = NULL;
    anim->mapped_data = NULL;
    anim->mapped_size = 0;
}