Files
stgsharp/源代码/StgSharp/Controlling/Controls/DecorationBox.cs
T

32 lines
760 B
C#

using StgSharp.Controls;
using StgSharp.Geometries;
using StgSharp.Graphics;
using StgSharp.Math;
using System;
using System.Collections.Generic;
using System.Text;
namespace StgSharp.Controls
{
public class DecorationBox : ControllingItem
{
private PlainGeometryMesh renderMesh;
public override ReadOnlySpan<vec4d> TextureBox
{
get => renderMesh.TextureCoord;
}
public override IEnumerator<PlainGeometryMesh> GetEnumerator()
{
yield return renderMesh;
}
public DecorationBox(Rectangle bound, Image texture, vec2d[] texCoord)
{
renderMesh = new PlainGeometryMesh(BoundingBox, new TextureProvider(texture, texCoord));
}
}
}