Try waiting for one frame before capturing the image: https://github.com/godotengine/godot-demo-projects/blob/master/viewport/screen_capture/screen_capture.gd Author msc509 commented on Jan 3, 2021 Try waiting for one frame before capturing the image: https://github.com/godotengine/godot-demo...
Godot version 3.5 stable, 4.0 Alpha 15 System information Win Issue description In both Godot 3.5 stable and Godot 4 Alpha 15 (and earlier) if you try to get the Rect2 of a Sprite using get_rect(), the resulting Rect2() will have the cor...
RID vp = VS::get_singleton()->viewport_create(); VS::ViewportRect vr; vr.x=0; vr.y=0; vr.width=EditorSettings::get_singleton()->get("grid_map/preview_size"); vr.height=EditorSettings::get_singleton()->get("grid_map/preview_size"); VS::get_singleton()->viewport_set_rect(vp,...
uv_vscroll->set_max(rect.pos.y+rect.size.y); uv_vscroll->set_page(uv_edit_draw->get_size().y); uv_vscroll->set_val(uv_draw_ofs.y); uv_vscroll->set_step(0.001); updating_uv_scroll=false; } 开发者ID:AMG194,项目名称:godot,代码行数:45,代码来源:polygon_2d_editor_plugin.cpp ...
viewport=NULL; }break; } } 开发者ID:0871087123,项目名称:godot,代码行数:56,代码来源:camera_2d.cpp 示例3: _enter_canvas ▲点赞 5▼ voidCanvasItem::_enter_canvas() {if((!get_parent() || !get_parent()->cast_to<CanvasItem>()) || toplevel) { ...
Rect2 r =get_script_instance()->call("_get_item_rect",NULL,0,err);if(err.error==Variant::CallError::CALL_OK)returnr; }returnRect2(Point2(-32,-32),Size2(64,64)); } 開發者ID:Ragar0ck,項目名稱:godot,代碼行數:10,代碼來源:node_2d.cpp ...
get_viewport()->_listener_remove(this); }break; } } 开发者ID:93i,项目名称:godot,代码行数:29,代码来源:listener.cpp 示例2: test_addNodeInTree_NullIn ▲点赞 5▼ staticvoidtest_addNodeInTree_NullIn(){ before(); GNode *tree =NULL; ...
draw_texture_rect(c->get_texture(), Rect2(Vector2(), get_size() * Size2(1,-1)));elsedraw_texture_rect(c->get_texture(), Rect2(Vector2(), c->get_size() * Size2(1,-1))); } } } 开发者ID:93i,项目名称:godot,代码行数:47,代码来源:viewport_container.cpp ...
RID vp = VS::get_singleton()->viewport_create(); VS::ViewportRect vr; vr.x=0; vr.y=0; vr.width=EditorSettings::get_singleton()->get("grid_map/preview_size"); vr.height=EditorSettings::get_singleton()->get("grid_map/preview_size"); ...
开发者ID:icarito,项目名称:godot,代码行数:73,代码来源:rich_text_label.cpp 示例7: options ▲点赞 1▼ staticvoidoptions(void){intch;/* return value from getopt() */intn;/* for CR and LF modes *//* * * Reads and processes the command line options. Added the -P option so arbitrary...