MCPcopy Create free account
hub / github.com/FlaxEngine/FlaxEngine / OnClipScissors

Function OnClipScissors

Source/Engine/Render2D/Render2D.cpp:856–869  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

854}
855
856void OnClipScissors()
857{
858 if (!IsScissorsRectEnabled)
859 return;
860
861 const auto& mask = ClipLayersStack.Peek();
862
863 Render2DDrawCall& drawCall = DrawCalls.AddOne();
864 drawCall.Type = DrawCallType::ClipScissors;
865 drawCall.AsClipScissors.X = mask.Bounds.GetX();
866 drawCall.AsClipScissors.Y = mask.Bounds.GetY();
867 drawCall.AsClipScissors.Width = mask.Bounds.GetWidth();
868 drawCall.AsClipScissors.Height = mask.Bounds.GetHeight();
869}
870
871void Render2D::PushClip(const Rectangle& clipRect)
872{

Callers 2

PushClipMethod · 0.85
PopClipMethod · 0.85

Calls 6

AddOneMethod · 0.80
GetXMethod · 0.80
GetYMethod · 0.80
GetWidthMethod · 0.80
PeekMethod · 0.45
GetHeightMethod · 0.45

Tested by

no test coverage detected