gfxcolor_t*data = image->image->data;
int t;
for(t=0;t<size;t++) {
- if(data->a!=255)
+ if(data[t].a!=255)
return Qtrue;
}
return Qfalse;
return Qnil;
}
+static VALUE font_save_eot(VALUE cls, VALUE _filename)
+{
+ Get_Font(font,cls);
+ Check_Type(_filename, T_STRING);
+ const char*filename = StringValuePtr(_filename);
+ gfxfont_save_eot(font->font, filename);
+ return Qnil;
+}
+
static VALUE font_kerning(VALUE cls)
{
Get_Font(font,cls);
HEAD
volatile VALUE v_line = convert_line(line);
volatile VALUE v_action = rb_tainted_str_new2(action);
- forward(v, id_drawlink, v_line, v_action);
+
+ forward(v, id_drawlink, 2, v_line, v_action);
}
void rb_endpage(gfxdevice_t*dev)
{
imagedriver = gfxsource_image_create();
GFX = rb_define_module("GFX");
+ rb_define_const(GFX, "VERSION", INT2FIX(20100309));
rb_define_module_function(GFX, "setparameter", gfx_setparameter, 2);
rb_define_method(Font, "kerning", font_kerning, 0);
rb_define_method(Font, "get_kerning_table", font_kerning, 0);
rb_define_method(Font, "save_ttf", font_save_ttf, 1);
+ rb_define_method(Font, "save_eot", font_save_eot, 1);
Device = rb_define_class_under(GFX, "Device", rb_cObject);
rb_define_method(Device, "startpage", noop, -1);