예제 #1
0
static VALUE Drawable_to_s(VALUE vSelf) {
	// Get C++ object pointer from vSelf
	Drawable *pSelf;
	Data_Get_Struct(vSelf, Drawable, pSelf);
	char szBuffer[256];
	sprintf(szBuffer, "Left=%f, Top=%f, Scale=[%f,%f], Rotation=%f", pSelf->GetLeft(), pSelf->GetTop(), pSelf->GetScaleX(), pSelf->GetScaleX(), pSelf->GetRotation());
	return rb_str_new2(szBuffer);
}
예제 #2
0
static VALUE Drawable_get_left(VALUE vSelf) {
	// Get C++ object pointer from vSelf
	Drawable *pSelf;
	Data_Get_Struct(vSelf, Drawable, pSelf);
	return rb_float_new(pSelf->GetLeft());
}