示例#1
0
static VALUE RenderWindow_to_s(VALUE vSelf) {
	// Get C++ object pointer from vSelf
	RenderWindow *pSelf;
	Data_Get_Struct(vSelf, RenderWindow, pSelf);
	char szBuffer[256];
	sprintf(szBuffer, "Height: %d, Width: %d, Depth Bits: %d, Stencil Bits: %d", pSelf->GetWidth(), pSelf->GetHeight(), pSelf->GetDepthBits(), pSelf->GetStencilBits());
	return rb_str_new2(szBuffer);
}
示例#2
0
static VALUE RenderWindow_get_width(VALUE vSelf) {
	// Get C++ object pointer from vSelf
	RenderWindow *pSelf;
	Data_Get_Struct(vSelf, RenderWindow, pSelf);
	return INT2FIX(pSelf->GetWidth());
}