/* Returns an array containing all the shape's colors. */ VALUE Shape_getColors(VALUE self) { Shape &ref = getRef<Shape>(self); int size = ref.getColorsNumber(); VALUE ret = rb_ary_new(); OSL_COLOR *col = ref.getColors(); for (int i = 0; i < size; ++i) rb_ary_push(ret, col2hash(col[i])); return ret; }
/* Return the shape's first color. */ VALUE Shape_getColor(VALUE self) { Shape &ref = getRef<Shape>(self); return col2hash(ref.getColor()); }
/* Returns the title's color. */ VALUE MsgConfig_titleColor(VALUE self) { MsgConfig &ref = getRef<MsgConfig>(self); return col2hash(ref.titleColor); }
/* Returns the border's color. */ VALUE MsgConfig_borderColor(VALUE self) { MsgConfig &ref = getRef<MsgConfig>(self); return col2hash(ref.borderColor); }
/* call-seq: [x, y] Returns the color of a pixel. */ VALUE Buffer_getPixel(VALUE self, VALUE x, VALUE y) { Buffer &ref = getRef<Buffer>(self); return col2hash(ref.getPixel(FIX2INT(x), FIX2INT(y))); }