Exemplo n.º 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);
}
Exemplo n.º 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());
}