Files
stgsharp/源代码/StgSharp/Graphics/Form.cs
T

65 lines
1.3 KiB
C#

using StgSharp.Math;
using System;
using System.Runtime.InteropServices;
namespace StgSharp.Graphics
{
[StructLayout(LayoutKind.Sequential)]
internal struct formInfo
{
public int width;
public int height;
public M128 color;
public byte[] name;
}
public unsafe class Form
{
internal long windowID; //pointer to the form
internal formInfo info = new formInfo() ;
internal IntPtr shader;
internal LinkedList<Pool> allControl;
public Vec2d Size
{
get { return new Vec2d(info.width, info.height); }
set
{
info.width = (int)value.X;
info.height = (int)value.Y;
}
}
public int Width
{
get => info.width;
set => info.width = value;
}
public int Height
{
get => info.height;
set => info.height = value;
}
/*
public M128 Color
{
get => info.color;
set => info.color = value;
}
/**/
/// <summary>
/// Constructor of a Form, creats an instance of a form and
/// initilize all the customizing operations.
/// </summary>
public Form()
{
}
}
}