MCPcopy Create free account
hub / github.com/9chu/LuaSTGPlus / RenderRect

Method RenderRect

LuaSTGPlus/AppFrame.h:410–433  ·  view source on GitHub ↗

@brief ��Ⱦͼ��

Source from the content-addressed store, hash-verified

408
409 /// @brief ��Ⱦͼ��
410 bool RenderRect(const char* name, float x1, float y1, float x2, float y2)LNOEXCEPT
411 {
412 if (m_GraphType != GraphicsType::Graph2D)
413 {
414 LERROR("RenderRect: ֻ��2D��Ⱦ������ִ�и÷���");
415 return false;
416 }
417
418 fcyRefPointer<ResSprite> p = m_ResourceMgr.FindSprite(name);
419 if (!p)
420 {
421 LERROR("RenderRect: �Ҳ���ͼ����Դ'%m'", name);
422 return false;
423 }
424
425 // ���û��
426 updateGraph2DBlendMode(p->GetBlendMode());
427
428 // ��Ⱦ
429 f2dSprite* pSprite = p->GetSprite();
430 pSprite->SetZ(0.5f);
431 pSprite->Draw(m_Graph2D, fcyRect(x1, y1, x2, y2), false);
432 return true;
433 }
434
435 /// @brief ��Ⱦͼ��
436 bool Render4V(const char* name, float x1, float y1, float z1, float x2, float y2, float z2,

Callers

nothing calls this directly

Calls 3

FindSpriteMethod · 0.80
GetBlendModeMethod · 0.45
GetSpriteMethod · 0.45

Tested by

no test coverage detected