1
0
Fork 0
mirror of https://github.com/ruby-opencv/ruby-opencv synced 2023-03-27 23:22:12 -04:00

refactored some functions to get options

This commit is contained in:
ser1zw 2011-10-31 03:28:06 +09:00
parent 1d1244de0c
commit cd3cd06829
10 changed files with 98 additions and 63 deletions

View file

@ -20,6 +20,19 @@ __NAMESPACE_BEGIN_CVFONT
VALUE rb_klass;
int
rb_font_option_line_type(VALUE font_option)
{
VALUE line_type = LOOKUP_CVMETHOD(font_option, "line_type");
if (FIXNUM_P(line_type)) {
return FIX2INT(line_type);
}
else if (line_type == ID2SYM(rb_intern("aa"))) {
return CV_AA;
}
return 0;
}
VALUE
rb_class()
{