Show CardLocationWith4Corners.cs syntax highlighted
using System;
using System.Drawing;
using Whiteboard.MaseWS;
namespace Whiteboard
{
/// <summary>
/// Summary description for CardLocationWith4Corners.
/// </summary>
public class CardLocationWith4Corners
{
public PointF leftTop;
public PointF rightTop;
public PointF rightBut;
public PointF leftBut;
public CardLocationWith4Corners(PointF center, int cardWidth, int cardHeight)
{
Single adjust_X = 0.5f * Convert.ToSingle(cardWidth);
Single adjust_Y = 0.5f * Convert.ToSingle(cardHeight);
leftTop = new PointF(center.X-adjust_X, center.Y-adjust_Y);
rightTop = new PointF(center.X+adjust_X, center.Y-adjust_Y);
rightBut = new PointF(center.X+adjust_X, center.Y+adjust_Y);
leftBut = new PointF(center.X-adjust_X, center.Y+adjust_Y);
}
}
}
See more files for this project here