public void DrawRect(Box2 rect, Color color, bool filled = true)
 {
     CheckDisposed();
     if (filled)
     {
         VS.CanvasItemAddRect(Item, rect.Convert(), color.Convert());
     }
     else
     {
         DrawLine(rect.TopLeft, rect.TopRight, color);
         DrawLine(rect.TopRight, rect.BottomRight, color);
         DrawLine(rect.BottomRight, rect.BottomLeft, color);
         DrawLine(rect.BottomLeft, rect.TopLeft, color);
     }
 }
 public void DrawTextureRect(Texture texture, Box2 rect, bool tile, Color?modulate = null, bool transpose = false, Texture normalMap = null)
 {
     CheckDisposed();
     texture.GodotTexture.DrawRect(Item, rect.Convert(), tile, modulate?.Convert(), transpose, normalMap);
 }
示例#3
0
 public View(Box2 box)
 {
     SFMLView = new SView(box.Convert());
 }
 public void DrawStyleBox(StyleBox styleBox, Box2 box)
 {
     CheckDisposed();
     styleBox.GodotStyleBox.Draw(Item, box.Convert());
 }
示例#5
0
 public void SetItemIconRegion(int idx, Box2 region)
 {
     SceneControl.SetItemIconRegion(idx, region.Convert());
 }